mirror of
https://github.com/ckaczor/WorkIndicator.git
synced 2026-01-15 17:25:43 -05:00
Switch to submodules, support multiple patterns, add options dialog, add license and initial readme
This commit is contained in:
39
Options/GeneralOptionsPanel.xaml.cs
Normal file
39
Options/GeneralOptionsPanel.xaml.cs
Normal file
@@ -0,0 +1,39 @@
|
||||
using Common.Wpf.Extensions;
|
||||
using System.Windows;
|
||||
|
||||
namespace WorkIndicator.Options
|
||||
{
|
||||
public partial class GeneralOptionsPanel
|
||||
{
|
||||
public GeneralOptionsPanel()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public override void LoadPanel(object data)
|
||||
{
|
||||
base.LoadPanel(data);
|
||||
|
||||
var settings = Properties.Settings.Default;
|
||||
|
||||
StartWithWindows.IsChecked = settings.StartWithWindows;
|
||||
}
|
||||
|
||||
public override bool ValidatePanel()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void SavePanel()
|
||||
{
|
||||
var settings = Properties.Settings.Default;
|
||||
|
||||
if (StartWithWindows.IsChecked.HasValue && settings.StartWithWindows != StartWithWindows.IsChecked.Value)
|
||||
settings.StartWithWindows = StartWithWindows.IsChecked.Value;
|
||||
|
||||
Application.Current.SetStartWithWindows(settings.StartWithWindows);
|
||||
}
|
||||
|
||||
public override string CategoryName => Properties.Resources.OptionCategory_General;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user