fix check boxes

This commit is contained in:
Florian Stinglmayr 2024-11-08 09:16:30 +01:00
parent 582d663baa
commit 043808fe0a

View File

@ -59,9 +59,9 @@ public partial class MainWindow : Window {
LogType.SelectedIndex = 0; LogType.SelectedIndex = 0;
} }
this.NoInfluenceSupport.IsOn = Config.Global.IgnoreInfluenceSupport; this.NoInfluenceSupport.IsChecked = Config.Global.IgnoreInfluenceSupport;
this.NoMarketBuy.IsOn = Config.Global.IgnoreMarketBuy; this.NoMarketBuy.IsChecked = Config.Global.IgnoreMarketBuy;
this.NoFleetCarrier.IsOn = Config.Global.IgnoreFleetCarrier; this.NoFleetCarrier.IsChecked = Config.Global.IgnoreFleetCarrier;
/* /*
// Apply theme // Apply theme
@ -539,12 +539,12 @@ public partial class MainWindow : Window {
} }
private void UpdateTheme() { private void UpdateTheme() {
ThemeManager.Current.ChangeTheme(this, Config.Global.FullTheme); //ThemeManager.Current.ChangeTheme(this, Config.Global.FullTheme);
} }
private void SwitchTheme_Toggled(object sender, RoutedEventArgs e) { private void SwitchTheme_Toggled(object sender, RoutedEventArgs e) {
ToggleSwitch toggle = sender as ToggleSwitch; ToggleSwitch toggle = sender as ToggleSwitch;
if (toggle.IsOn) { if ((bool)toggle.IsChecked) {
Config.Global.Theme = "Dark"; Config.Global.Theme = "Dark";
} else { } else {
Config.Global.Theme = "Light"; Config.Global.Theme = "Light";
@ -572,15 +572,15 @@ public partial class MainWindow : Window {
*/ */
private void NoInfluenceSupport_Toggled(object sender, RoutedEventArgs e) { private void NoInfluenceSupport_Toggled(object sender, RoutedEventArgs e) {
Config.Global.IgnoreInfluenceSupport = this.NoInfluenceSupport.IsOn; Config.Global.IgnoreInfluenceSupport = (bool)this.NoInfluenceSupport.IsChecked;
} }
private void NoMarketBuy_Toggled(object sender, RoutedEventArgs e) { private void NoMarketBuy_Toggled(object sender, RoutedEventArgs e) {
Config.Global.IgnoreMarketBuy = this.NoMarketBuy.IsOn; Config.Global.IgnoreMarketBuy = (bool)this.NoMarketBuy.IsChecked;
} }
private void NoFleetCarrier_Toggled(object sender, RoutedEventArgs e) { private void NoFleetCarrier_Toggled(object sender, RoutedEventArgs e) {
Config.Global.IgnoreFleetCarrier = this.NoFleetCarrier.IsOn; Config.Global.IgnoreFleetCarrier = (bool)this.NoFleetCarrier.IsChecked;
} }
private void OpenInExplorer_Click(object sender, RoutedEventArgs e) { private void OpenInExplorer_Click(object sender, RoutedEventArgs e) {