Rework much of options UI

This commit is contained in:
2023-04-13 20:05:55 -04:00
parent ace251fd4f
commit 5c0c84a068
18 changed files with 322 additions and 331 deletions

View File

@@ -1,5 +1,6 @@
using System.Windows;
using ChrisKaczor.ApplicationUpdate;
using ChrisKaczor.ApplicationUpdate;
using FeedCenter.Properties;
using System.Windows;
namespace FeedCenter.Options;
@@ -12,25 +13,20 @@ public partial class UpdateOptionsPanel
public override string CategoryName => Properties.Resources.optionCategoryUpdate;
public override void LoadPanel()
{
base.LoadPanel();
CheckVersionOnStartupCheckBox.IsChecked = Properties.Settings.Default.CheckVersionAtStartup;
MarkLoaded();
}
private void HandleCheckVersionNowButtonClick(object sender, System.Windows.RoutedEventArgs e)
private void HandleCheckVersionNowButtonClick(object sender, RoutedEventArgs e)
{
UpdateCheck.DisplayUpdateInformation(true);
}
private void CheckVersionOnStartupCheckBox_Click(object sender, System.Windows.RoutedEventArgs e)
private void OnSaveSettings(object sender, RoutedEventArgs e)
{
SaveSettings();
}
private void SaveSettings()
{
if (!HasLoaded) return;
if (CheckVersionOnStartupCheckBox.IsChecked.HasValue && Properties.Settings.Default.CheckVersionAtStartup != CheckVersionOnStartupCheckBox.IsChecked.Value)
Properties.Settings.Default.CheckVersionAtStartup = CheckVersionOnStartupCheckBox.IsChecked.Value;
Settings.Default.Save();
}
}