mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-12-14 19:49:15 +08:00
8d10c9aa41
1. part of #389 2. huge refactoring
42 lines
1.0 KiB
C#
42 lines
1.0 KiB
C#
using System.Windows;
|
|
using System.Windows.Controls;
|
|
|
|
namespace Wox.Plugin.CMD
|
|
{
|
|
public partial class CMDSetting : UserControl
|
|
{
|
|
private readonly CMDHistory _settings;
|
|
|
|
public CMDSetting(CMDHistory settings)
|
|
{
|
|
InitializeComponent();
|
|
_settings = settings;
|
|
}
|
|
|
|
private void CMDSetting_OnLoaded(object sender, RoutedEventArgs re)
|
|
{
|
|
cbReplaceWinR.IsChecked = _settings.ReplaceWinR;
|
|
cbLeaveCmdOpen.IsChecked = _settings.LeaveCmdOpen;
|
|
|
|
cbLeaveCmdOpen.Checked += (o, e) =>
|
|
{
|
|
_settings.LeaveCmdOpen = true;
|
|
};
|
|
|
|
cbLeaveCmdOpen.Unchecked += (o, e) =>
|
|
{
|
|
_settings.LeaveCmdOpen = false;
|
|
};
|
|
|
|
cbReplaceWinR.Checked += (o, e) =>
|
|
{
|
|
_settings.ReplaceWinR = true;
|
|
};
|
|
cbReplaceWinR.Unchecked += (o, e) =>
|
|
{
|
|
_settings.ReplaceWinR = false;
|
|
};
|
|
}
|
|
}
|
|
}
|