Esempio n. 1
0
        // -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -



        // -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
        private void btnAddCommand_Click(object sender, EventArgs e)
        {
            t.log("\n\n\nFormMain.btnAddCommand_Click()");

            speechRecognizer.stopListening();
            this.Hide();

            formCommandEditor = new FormCommandEditor();
            formCommandEditor.Show();
        }
Esempio n. 2
0
        // -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -


        // -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
        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();
        }
        // -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -


        // -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
        private void btnCancel_Click(object sender, EventArgs e)
        {
            formCommandEditor.Show();
            this.Close();
        }
        // -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -



        // -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
        private void FormNewKeyCommand_FormClosing(object sender, FormClosingEventArgs e)
        {
            fce.Show();
        }