private HotkeyEditor(AbstractHotkeyAction hotkey) { InitializeComponent(); Icon = Icon.ExtractAssociatedIcon(@"plugins\patrick\resource\icon.ico"); this.hotkey = hotkey; LoadExistingHotkey(); }
public static bool EditHotkeyAction(AbstractHotkeyAction hotkey) { var hotkeyEditor = new HotkeyEditor(hotkey) { Text = "HotkeyEditor - " + hotkey.action }; hotkeyEditor.ShowDialog(); return(hotkeyEditor.modified); }
private void updateHotkey(HotkeyPopup.MyKeyEvent keyEvent, AbstractHotkeyAction hotkey) { if (keyEvent is null) { return; } var iKeyEvent = keyEvent.toIKeyEvent(Hud.Input); hotkey.SetKeyEvent(keyEvent, iKeyEvent); ConfigPersistence.SaveHotkeys(Hotkeys); }