2015-01-03 15:20:34 +08:00
|
|
|
|
using System.Windows;
|
2014-07-04 15:34:31 +08:00
|
|
|
|
using System.Windows.Controls;
|
|
|
|
|
|
2015-01-03 15:20:34 +08:00
|
|
|
|
namespace Wox.Plugin.CMD
|
2014-07-04 15:34:31 +08:00
|
|
|
|
{
|
|
|
|
|
public partial class CMDSetting : UserControl
|
|
|
|
|
{
|
2016-04-21 08:53:21 +08:00
|
|
|
|
private readonly CMDHistory _settings;
|
2016-03-28 10:09:57 +08:00
|
|
|
|
|
2016-04-21 08:53:21 +08:00
|
|
|
|
public CMDSetting(CMDHistory settings)
|
2014-07-04 15:34:31 +08:00
|
|
|
|
{
|
|
|
|
|
InitializeComponent();
|
2016-03-28 10:09:57 +08:00
|
|
|
|
_settings = settings;
|
2014-07-04 15:34:31 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void CMDSetting_OnLoaded(object sender, RoutedEventArgs re)
|
|
|
|
|
{
|
2016-03-28 10:09:57 +08:00
|
|
|
|
cbReplaceWinR.IsChecked = _settings.ReplaceWinR;
|
|
|
|
|
cbLeaveCmdOpen.IsChecked = _settings.LeaveCmdOpen;
|
2014-07-04 15:34:31 +08:00
|
|
|
|
|
|
|
|
|
cbLeaveCmdOpen.Checked += (o, e) =>
|
|
|
|
|
{
|
2016-03-28 10:09:57 +08:00
|
|
|
|
_settings.LeaveCmdOpen = true;
|
2014-07-04 15:34:31 +08:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
cbLeaveCmdOpen.Unchecked += (o, e) =>
|
|
|
|
|
{
|
2016-03-28 10:09:57 +08:00
|
|
|
|
_settings.LeaveCmdOpen = false;
|
2014-07-04 15:34:31 +08:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
cbReplaceWinR.Checked += (o, e) =>
|
|
|
|
|
{
|
2016-03-28 10:09:57 +08:00
|
|
|
|
_settings.ReplaceWinR = true;
|
2014-07-04 15:34:31 +08:00
|
|
|
|
};
|
|
|
|
|
cbReplaceWinR.Unchecked += (o, e) =>
|
|
|
|
|
{
|
2016-03-28 10:09:57 +08:00
|
|
|
|
_settings.ReplaceWinR = false;
|
2014-07-04 15:34:31 +08:00
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|