private void NoItem_CM_ItemClicked(object sender, ToolStripItemClickedEventArgs e) { if (e.ClickedItem.Text == "Paste") { Editor_TextBox.SelectionStart = CharIndex_UnderMouse; Editor_TextBox.Paste(); } if (e.ClickedItem.Text == "Find Subtask") { FindSubtask_Button_Event(); } if (e.ClickedItem.Text == "Get this subtask number") { GetSubtaskNum(); } }
private void jsonContextClicked(object sender, ToolStripItemClickedEventArgs e) { if (e.ClickedItem.Text == "Paste") { try { Editor_TextBox.SelectionStart = CharIndex_UnderMouse; Editor_TextBox.Paste(); } catch (Exception) { } } if (e.ClickedItem.Text == "Find subtask") { try { ConsoleHandler.force_append_Notice("Please enter the subtask numbers you are looking for in the \"Find\" text box above.\n>> Example: 0,0,1"); searchSubtask = true; ShowFindMenu(); } catch (Exception) { } } if (e.ClickedItem.Text == "Get current subtask number") { if (jsonError == false) { try { //func here GetSubtaskNum(); } catch (Exception) { } } else { ConsoleHandler.append_Force("JSON error detected... You need to fix the JSON error before you can get the subtask"); } } }
private void ItemHighlighted_CM_ItemClicked(object sender, ToolStripItemClickedEventArgs e) { if (e.ClickedItem.Text == "Copy") { if (Editor_TextBox.SelectedText.Length > 0) { Clipboard.SetText(Editor_TextBox.SelectedText); } } if (e.ClickedItem.Text == "Paste") { Editor_TextBox.Paste(); } if (e.ClickedItem.Text == "Find") { Find_TB.Text = Editor_TextBox.SelectedText; if (!Find_Panel.Visible) { ShowSearchMenu("find"); } Option1_CB.Checked = false; } if (e.ClickedItem.Text == "Replace") { ShowSearchMenu("replace"); if (!Replace_TB.Visible) { ShowSearchMenu("replace"); } Find_TB.Text = Editor_TextBox.SelectedText; Option1_CB.Checked = false; } if (e.ClickedItem.Text == "Find subtask") { FindSubtask_Button_Event(); } if (e.ClickedItem.Text == "Get current subtask number") { GetSubtaskNum(); } }