public void SetKey(KeyModulesItemViewModel viewModel) { ModulesList.SelectedItem = viewModel; ShowKeySettingGrid = true; SelectKeyType = viewModel.KeyModulesItem.KeySetting.Type; temp_Key = viewModel.KeyModulesItem.KeySetting.Key; temp_ModifierKeys = viewModel.KeyModulesItem.KeySetting.ModifierKeys; UpdateHotKey_KeyText(); }
private List <KeyModulesItemViewModel> GetModulesList() { var list = new List <KeyModulesItemViewModel>(); foreach (var item in Modules.KeysModules.Current.CurrentPublicModules) { var keyModulesItem = Modules.KeysModules.Current.GetKeyModulesItem(item); var vmKeyModulesItem = new KeyModulesItemViewModel(keyModulesItem); vmKeyModulesItem.SetKeyAction = SetKey; list.Add(vmKeyModulesItem); } return(list); }