private void OnActionComplete(Actions.MyActions action, dynamic optional = null) { /* * Modify the Form after the Action is Completed. * Use myAction to determine what action occurred. * Use Optional for additional information sent from Actions. */ if (action == Actions.MyActions.Copy) { GenericMenuFunctions.CopyFromListToCombo(comboBox1, label2); } else if (action == Actions.MyActions.Paste) { label3.Text = "Last Paste: " + (string)optional; try { comboBox1.SelectedIndex++; } catch { // Ignore } Program.MyIndex = comboBox1.SelectedIndex; if (Program.EndOfListPasted) { label2.Text = "End/" + comboBox1.Items.Count; } } else if (action == Actions.MyActions.Esc) { Actions.DblClick(); } }
private void UseToolStripMenuItem_Click(object sender, EventArgs e) { GenericMenuFunctions.UseToolStripMenuItem(sender); }
private void UseEscToDblClickToolStripMenuItem_Click(object sender, EventArgs e) { GenericMenuFunctions.UseEscToDblClickToolStripMenuItem(sender, HotkeyComm, label1); }
private void TrimWhitespaceToolStripMenuItem_Click(object sender, EventArgs e) { GenericMenuFunctions.TrimWhitespaceToolStripMenuItem(sender, comboBox1, label2); }
private void SortListToolStripMenuItem_Click(object sender, EventArgs e) { GenericMenuFunctions.SortListToolStripMenuItem(sender, comboBox1, label2); }
private void SaveToolStripMenuItem1_Click(object sender, EventArgs e) { GenericMenuFunctions.SaveToolStripMenu(this); }
private void RemoveItemToolStripMenuItem_Click(object sender, EventArgs e) { GenericMenuFunctions.RemoveItemToolStripMenuItem(comboBox1, label2); }
private void PauseToolStripMenuItem_Click(object sender, EventArgs e) { GenericMenuFunctions.PauseToolStripMenuItem(sender, HotkeyComm); }
private void NewToolStripMenuItem_Click(object sender, EventArgs e) { GenericMenuFunctions.NewToolStripMenuItem(this, comboBox1, label2, label3); }
private void ModeToolStripMenuItem_Click(object sender, EventArgs e) { GenericMenuFunctions.ModeToolStripMenuItem(sender, this); }
private void DisableHotkeyErrorsToolStripMenuItem_Click(object sender, EventArgs e) { GenericMenuFunctions.DisableHotkeyErrorsToolStripMenuItem(sender); }
private void AboutToolStripMenuItem1_Click(object sender, EventArgs e) { GenericMenuFunctions.AboutToolStripMenuItem(); }
private void OnActionComplete(Actions.MyActions action, dynamic optional = null) { /* * Modify the Form after the Action is Completed. * Use myAction to determine what action occurred. * Use Optional for additional information sent from Actions. */ if (action == Actions.MyActions.Copy) { GenericMenuFunctions.CopyFromListToCombo(comboBox1, label2); } else if (action == Actions.MyActions.Paste) { label3.Text = "Last Paste: " + (string)optional; try { comboBox1.SelectedIndex++; } catch { // Ignore } Program.MyIndex = comboBox1.SelectedIndex; if (Program.EndOfListPasted) { label2.Text = "End/" + comboBox1.Items.Count; } } else if (action == Actions.MyActions.Run) { string s = ""; if ((string)optional == "F4") { s = textBox1.Text; } if ((string)optional == "F5") { s = textBox2.Text; } if ((string)optional == "F6") { s = textBox3.Text; } if ((string)optional == "F7") { s = textBox4.Text; } if ((string)optional == "F8") { s = textBox5.Text; } string[] a = null; if (s.Contains('"')) { string args = s.Split('"')[1]; s = s.Replace($"\"{args}\"", "").Trim(); a = args.Split(',').Select(x => x.Trim()).ToArray(); } Actions.RunProcess(s, a); } else if (action == Actions.MyActions.Esc) { Actions.DblClick(); } }