// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - public FormCommandEditorListController(FormCommandEditor formCommandEditor, ListView listView) { // Class specific debug t = new T(true); t.log("FormCommandEditorListController()"); fce = formCommandEditor; lvCommands = listView; }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - public FormNewApplicationCommand(FormCommandEditor formCommandEditor) { InitializeComponent(); // Class specific debug t = new T(true); t.log("FormNewApplicationCommand()"); this.formCommandEditor = formCommandEditor; }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - private void btnAddCommand_Click(object sender, EventArgs e) { t.log("\n\n\nFormMain.btnAddCommand_Click()"); speechRecognizer.stopListening(); this.Hide(); formCommandEditor = new FormCommandEditor(); formCommandEditor.Show(); }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - public FormCommandEditorCommandManager(FormCommandEditor formCommandEditor) { // Class specific debug t = new T(true); t.log("FormCommandEditorCommandManager()"); fce = formCommandEditor; if (fce.cvoToEdit == null) { cvo = new CommandVO(); } else { cvo = fce.cvoToEdit; } }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - public FormNewKeyCommand(FormCommandEditor formCommandEditor, CommandItemVO commandItemVOToEdit = null) { InitializeComponent(); t = new T(true); t.log("FormNewKeyCommand()"); this.fce = formCommandEditor; this.commandItemVOToEdit = commandItemVOToEdit; populateKeySelectionDropDown(); if (commandItemVOToEdit != null) { cbCtrl.Checked = commandItemVOToEdit.ctrlPressed; cbAlt.Checked = commandItemVOToEdit.altPressed; cbShift.Checked = commandItemVOToEdit.shiftPressed; tbKey.Text = commandItemVOToEdit.key; } }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - private void btnEditCommand_Click(object sender, EventArgs e) { t.log("\n\n\nFormMain.btnEditCommand_Click()"); if (lvCommands.SelectedItems.Count < 1) { MessageBox.Show("Please select a command to edit first!"); return; } speechRecognizer.stopListening(); this.Hide(); CommandVO selectedCommandVO = commandManager.getCommand(lvCommands.SelectedItems[0].Text); CommandVO cvoToEdit = selectedCommandVO.clone(); //int selectedCommandVOIndex = lvCommands.SelectedIndices[0]; formCommandEditor = new FormCommandEditor(cvoToEdit); formCommandEditor.Show(); }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - public FormNewClipboardCommand(FormCommandEditor formCommandEditor, CommandItemVO commandItemVOToEdit = null) { InitializeComponent(); // Class specific debug t = new T(true); t.log("FormNewClipboardCommand()"); this.formCommandEditor = formCommandEditor; this.commandItemVOToEdit = commandItemVOToEdit; if (commandItemVOToEdit != null) { rtClipboard.Text = commandItemVOToEdit.clipboard; if (commandItemVOToEdit.clipboardAutoPaste) { cbAutoPaste.Checked = true; } else { cbAutoPaste.Checked = false; } } }