/// <summary> /// 打开设置窗口 /// </summary> private void OpenSettingMethod() { var win = new SettingWindow(); var vm = new SettingViewModel(win); win.DataContext = vm; win.Show(); }
public SettingViewModel(SettingWindow win) { SettingWin = win; Datas = ProgramData.Instance; ShowAllHotKey = ProgramData.Instance.ShowAllHotKey; IsTopMostChangedCommand = new RelayCommand <bool>(IsTopMostChangedMethod); IsStartUpWithSystemChangedCommand = new RelayCommand <bool>(IsStartUpWithSystemChangedMethod); SelectionChangedCommand = new RelayCommand <SelectionChangedEventArgs>(SelectionChangedMethod); ShowAllHotKeyChangedCommand = new RelayCommand <KeyEventArgs>(ShowAllShortCutChangedMethod); }
public SettingViewModel(SettingWindow win) { SettingWin = win; Datas = ProgramData.Instance; // ShowAllHotKey = ProgramData.Instance.ShowAllHotKey; ShowAllHotKey = new HotKeyModel() { Name = EHotKeySetting.ShowAllWindow.ToString(), SelectKey = EKey.Q, IsSelectAlt = false, IsSelectCtrl = true, IsSelectShift = false, IsUsable = true }; IsTopMostChangedCommand = new RelayCommand <bool>(IsTopMostChangedMethod); IsStartUpWithSystemChangedCommand = new RelayCommand <bool>(IsStartUpWithSystemChangedMethod); SelectionChangedCommand = new RelayCommand <SelectionChangedEventArgs>(SelectionChangedMethod); ShowAllHotKeyChangedCommand = new RelayCommand <KeyEventArgs>(ShowAllShortCutChangedMethod); }
/// <summary> /// 打开设置窗口 /// </summary> private void OpenSettingMethod() { var win = new SettingWindow(); win.Show(); }