mirror of
https://github.com/ckaczor/FeedCenter.git
synced 2026-01-14 01:25:38 -05:00
40 lines
1.1 KiB
C#
40 lines
1.1 KiB
C#
using System.Windows;
|
|
using Common.Wpf.Extensions;
|
|
|
|
namespace FeedCenter.Options
|
|
{
|
|
public partial class GeneralOptionsPanel
|
|
{
|
|
public GeneralOptionsPanel()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
public override void LoadPanel(FeedCenterEntities database)
|
|
{
|
|
base.LoadPanel(database);
|
|
|
|
var settings = Properties.Settings.Default;
|
|
|
|
StartWithWindowsCheckBox.IsChecked = settings.StartWithWindows;
|
|
}
|
|
|
|
public override bool ValidatePanel()
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public override void SavePanel()
|
|
{
|
|
var settings = Properties.Settings.Default;
|
|
|
|
if (StartWithWindowsCheckBox.IsChecked.HasValue && settings.StartWithWindows != StartWithWindowsCheckBox.IsChecked.Value)
|
|
settings.StartWithWindows = StartWithWindowsCheckBox.IsChecked.Value;
|
|
|
|
Application.Current.SetStartWithWindows(settings.StartWithWindows);
|
|
}
|
|
|
|
public override string CategoryName => Properties.Resources.optionCategoryGeneral;
|
|
}
|
|
}
|