public static void ResetHotKeys(HotKeyCommands hkc) { hkc.ClearAll(); hkc.breakControl.Add(Keys.LControlKey); hkc.breakControl.Add(Keys.Oemtilde); hkc.nextPC.Add(Keys.LShiftKey); hkc.nextPC.Add(Keys.PageDown); hkc.previousPC.Add(Keys.LShiftKey); hkc.previousPC.Add(Keys.PageUp); hkc._1PC.Add(Keys.LControlKey); hkc._2PC.Add(Keys.LControlKey); hkc._3PC.Add(Keys.LControlKey); hkc._4PC.Add(Keys.LControlKey); hkc._5PC.Add(Keys.LControlKey); hkc._1PC.Add(Keys.D1); hkc._2PC.Add(Keys.D2); hkc._3PC.Add(Keys.D3); hkc._4PC.Add(Keys.D4); hkc._5PC.Add(Keys.D5); }
public void Assign(HotKeyCommands other) { this._1PC = new SortedSet <Keys>(other._1PC); this._2PC = new SortedSet <Keys>(other._2PC); this._3PC = new SortedSet <Keys>(other._3PC); this._4PC = new SortedSet <Keys>(other._4PC); this._5PC = new SortedSet <Keys>(other._5PC); this.breakControl = new SortedSet <Keys>(other.breakControl); this.nextPC = new SortedSet <Keys>(other.nextPC); this.previousPC = new SortedSet <Keys>(other.previousPC); }
private void hotKeyComboChecker() { //hotKeyCombos if ((!controledByPanel.Visible) && hotKeyForm == null) { if (HotKeyCommands.pressedContainsCombo(pressedKeys, hotKeyCommands.breakControl)) { breakControl(); notifyIcon.BalloonTipTitle = "Break remoute control."; notifyIcon.BalloonTipText = "Now you control your own computer."; notifyIcon.ShowBalloonTip(3000); } if (HotKeyCommands.pressedContainsCombo(pressedKeys, hotKeyCommands.nextPC)) { nextPC(); } if (HotKeyCommands.pressedContainsCombo(pressedKeys, hotKeyCommands.previousPC)) { prevuiousPC(); } if (HotKeyCommands.pressedContainsCombo(pressedKeys, hotKeyCommands._1PC)) { _1PC(); } if (HotKeyCommands.pressedContainsCombo(pressedKeys, hotKeyCommands._2PC)) { _2PC(); } if (HotKeyCommands.pressedContainsCombo(pressedKeys, hotKeyCommands._3PC)) { _3PC(); } if (HotKeyCommands.pressedContainsCombo(pressedKeys, hotKeyCommands._4PC)) { _4PC(); } if (HotKeyCommands.pressedContainsCombo(pressedKeys, hotKeyCommands._5PC)) { _5PC(); } } }