private void OnClearStateClick(object sender, RoutedEventArgs e) { hotkeys.DisableAllHotkeys(); ButtonListenModal buttonListenModal = new ButtonListenModal(); buttonListenModal.Owner = this; if (buttonListenModal.ShowDialog() == true) { hotkeys.RemoveMapping( buttonListenModal.Modifiers, buttonListenModal.PressedKey ); } hotkeys.EnableAllHotkeys(); UpdateUserSettings(); }
private void OnSetStateClick(object sender, RoutedEventArgs e) { hotkeys.DisableAllHotkeys(); ButtonListenModal buttonListenModal = new ButtonListenModal(); buttonListenModal.Owner = this; if (buttonListenModal.ShowDialog() == true) { hotkeys.SetKeyPerState( buttonListenModal.Modifiers, buttonListenModal.PressedKey, CurrentAudioReflection.ToStatus() ); } hotkeys.EnableAllHotkeys(); UpdateUserSettings(); }