// ショートカットキーの設定 private void ListViewShortcut_KeyUp(object sender, KeyEventArgs e) { if (ListViewShortcut.SelectedItems.Count <= 0) { return; } if (e.KeyCode == Keys.Enter) { if (IsEntered) { IsEntered = false; } else { ListViewHitInfo = ListViewShortcut.HitTest(ListViewShortcut.SelectedItems[0].Position); if (ListViewHitInfo.SubItem != null) { Dll.SetKeyboardHook(true); HotKey = new HotKeyInfo(); ListViewInput = new ListViewInputBox(ListViewShortcut, ListViewHitInfo.Item, 1); ListViewInput.FinishInput += new ListViewInputBox.InputEventHandler(Input_FinishInput); ListViewInput.Disposed += new EventHandler(Input_Disposed); ListViewInput.Show(); } } } else if (e.KeyCode == Keys.Delete) { ListViewShortcut.SelectedItems[0].SubItems[1].Text = ""; GHManager.TempSettings.Hotkey.HotKeys[(int)ListViewShortcut.SelectedItems[0].Tag].SetKeys(0, 0); } }
// ショートカットキーの設定 private void ListViewShortcut_MouseDoubleClick(object sender, MouseEventArgs e) { ListViewHitInfo = ListViewShortcut.HitTest(e.X, e.Y); if (ListViewHitInfo.SubItem != null && e.Button == MouseButtons.Left) { Dll.SetKeyboardHook(true); HotKey = new HotKeyInfo(); ListViewInput = new ListViewInputBox(ListViewShortcut, ListViewHitInfo.Item, 1); ListViewInput.FinishInput += new ListViewInputBox.InputEventHandler(Input_FinishInput); ListViewInput.Disposed += new EventHandler(Input_Disposed); ListViewInput.Show(); } }