mirror of
https://github.com/ckaczor/FeedCenter.git
synced 2026-01-14 01:25:38 -05:00
Move application files to sub-folder
This commit is contained in:
44
Application/Options/GeneralOptionsPanel.xaml.cs
Normal file
44
Application/Options/GeneralOptionsPanel.xaml.cs
Normal file
@@ -0,0 +1,44 @@
|
||||
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;
|
||||
registerAsDefaultFeedReaderCheckBox.IsChecked = settings.RegisterAsDefaultFeedReader;
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
if (registerAsDefaultFeedReaderCheckBox.IsChecked.HasValue && settings.RegisterAsDefaultFeedReader != registerAsDefaultFeedReaderCheckBox.IsChecked.Value)
|
||||
settings.RegisterAsDefaultFeedReader = registerAsDefaultFeedReaderCheckBox.IsChecked.Value;
|
||||
|
||||
App.SetStartWithWindows(settings.StartWithWindows);
|
||||
App.SetDefaultFeedReader(settings.RegisterAsDefaultFeedReader);
|
||||
}
|
||||
|
||||
public override string CategoryName
|
||||
{
|
||||
get { return Properties.Resources.optionCategoryGeneral; }
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user