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
|
|
|
|
|
{
|
|
|
|
|
public CMDSetting()
|
|
|
|
|
{
|
|
|
|
|
InitializeComponent();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void CMDSetting_OnLoaded(object sender, RoutedEventArgs re)
|
|
|
|
|
{
|
2015-01-05 22:41:17 +08:00
|
|
|
|
cbReplaceWinR.IsChecked = CMDStorage.Instance.ReplaceWinR;
|
|
|
|
|
cbLeaveCmdOpen.IsChecked = CMDStorage.Instance.LeaveCmdOpen;
|
2014-07-04 15:34:31 +08:00
|
|
|
|
|
|
|
|
|
cbLeaveCmdOpen.Checked += (o, e) =>
|
|
|
|
|
{
|
2015-01-05 22:41:17 +08:00
|
|
|
|
CMDStorage.Instance.LeaveCmdOpen = true;
|
|
|
|
|
CMDStorage.Instance.Save();
|
2014-07-04 15:34:31 +08:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
cbLeaveCmdOpen.Unchecked += (o, e) =>
|
|
|
|
|
{
|
2015-01-05 22:41:17 +08:00
|
|
|
|
CMDStorage.Instance.LeaveCmdOpen = false;
|
|
|
|
|
CMDStorage.Instance.Save();
|
2014-07-04 15:34:31 +08:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
cbReplaceWinR.Checked += (o, e) =>
|
|
|
|
|
{
|
2015-01-05 22:41:17 +08:00
|
|
|
|
CMDStorage.Instance.ReplaceWinR = true;
|
|
|
|
|
CMDStorage.Instance.Save();
|
2014-07-04 15:34:31 +08:00
|
|
|
|
};
|
|
|
|
|
cbReplaceWinR.Unchecked += (o, e) =>
|
|
|
|
|
{
|
2015-01-05 22:41:17 +08:00
|
|
|
|
CMDStorage.Instance.ReplaceWinR = false;
|
|
|
|
|
CMDStorage.Instance.Save();
|
2014-07-04 15:34:31 +08:00
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|