// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - private void btnInsertIntoClipboard_Click(object sender, EventArgs e) { t.log("FormCommandEditor.btnInsertIntoClipboard_Click()"); if (lvCommands.SelectedItems.Count < 1) { MessageBox.Show("Please select a command to add first!"); return; } String selectedCommandToAdd = lvCommands.SelectedItems[0].Text; t.log(selectedCommandToAdd); switch (selectedCommandToAdd) { case "1. Insert text into clipboard": formNewClipboardCommand = new FormNewClipboardCommand(this); this.Hide(); formNewClipboardCommand.Show(); break; case "2. Combination key": formNewKeyCommand = new FormNewKeyCommand(this); this.Hide(); formNewKeyCommand.Show(); break; case "3. Open application": formNewApplicationCommand = new FormNewApplicationCommand(this); this.Hide(); formNewApplicationCommand.Show(); break; } }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - private void btnEdit_Click(object sender, EventArgs e) { t.log("FormCommandEditor.btnEdit_Click()"); if (lvCommandSequence.SelectedItems.Count < 1) { MessageBox.Show("Please select a command to edit first!"); return; } int commandItemIndexToEdit = lvCommandSequence.SelectedIndices[0]; t.log("commandItemIndexToEdit = " + commandItemIndexToEdit); CommandItemVO civo = fceCommandManager.getCommandItem(commandItemIndexToEdit); t.log("civo.type = " + civo.type); //return; switch (civo.type) { case "clipboard": formNewClipboardCommand = new FormNewClipboardCommand(this, civo); this.Hide(); formNewClipboardCommand.Show(); break; case "key": formNewKeyCommand = new FormNewKeyCommand(this, civo); this.Hide(); formNewKeyCommand.Show(); break; case "run application": formNewApplicationCommand = new FormNewApplicationCommand(this); this.Hide(); formNewApplicationCommand.Show(); break; } }