Save on select

This commit is contained in:
sirhamsteralot
2018-03-25 23:56:16 +02:00
committed by John Gross
parent 18af85c4d7
commit 6b3cc6c421
2 changed files with 5 additions and 6 deletions

View File

@@ -46,11 +46,6 @@ namespace Torch.Server.Views
_themes["Light theme animated"] = new ResourceDictionary() { Source = new Uri(@"/Themes/Light Theme Animated.xaml", UriKind.Relative) }; _themes["Light theme animated"] = new ResourceDictionary() { Source = new Uri(@"/Themes/Light Theme Animated.xaml", UriKind.Relative) };
_themes["Torch Theme"] = new ResourceDictionary() { Source = new Uri(@"/Views/Resources.xaml", UriKind.Relative) }; _themes["Torch Theme"] = new ResourceDictionary() { Source = new Uri(@"/Views/Resources.xaml", UriKind.Relative) };
if (null == System.Windows.Application.Current)
{
new System.Windows.Application();
}
} }
public void Selector_OnSelectionChanged(object sender, SelectionChangedEventArgs e) public void Selector_OnSelectionChanged(object sender, SelectionChangedEventArgs e)
@@ -61,7 +56,11 @@ namespace Torch.Server.Views
ChangeTheme(_themes[boxText].Source); ChangeTheme(_themes[boxText].Source);
if (_torchConfig != null) if (_torchConfig != null)
{
_torchConfig.LastUsedTheme = boxText; _torchConfig.LastUsedTheme = boxText;
_torchConfig.Save();
}
} }
public void ChangeTheme(Uri uri) public void ChangeTheme(Uri uri)