From 2f28645c461e0d34ceed3d0cccc837baee5f4c45 Mon Sep 17 00:00:00 2001 From: Alexander Date: Fri, 18 Oct 2019 13:37:33 +0300 Subject: [PATCH] Changed event type for "Find Next" button --- Crypto Notepad/MainForm.Designer.cs | 2 +- Crypto Notepad/MainForm.cs | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Crypto Notepad/MainForm.Designer.cs b/Crypto Notepad/MainForm.Designer.cs index 7e135d8..43eae90 100644 --- a/Crypto Notepad/MainForm.Designer.cs +++ b/Crypto Notepad/MainForm.Designer.cs @@ -712,7 +712,7 @@ public void InitializeComponent() this.searchFindNextButton.TabIndex = 17; this.searchFindNextButton.Text = "Find Next"; this.searchFindNextButton.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - this.searchFindNextButton.Click += new System.EventHandler(this.SearchFindNextButton_Click); + this.searchFindNextButton.MouseUp += new System.Windows.Forms.MouseEventHandler(this.SearchFindNextButton_MouseUp); // // toolbarPanel // diff --git a/Crypto Notepad/MainForm.cs b/Crypto Notepad/MainForm.cs index 2fa7736..bfc9569 100644 --- a/Crypto Notepad/MainForm.cs +++ b/Crypto Notepad/MainForm.cs @@ -818,7 +818,7 @@ private void RichTextBox_KeyDown(object sender, KeyEventArgs e) } if (e.KeyCode == Keys.Enter & searchPanel.Visible & !string.IsNullOrEmpty(searchTextBox.Text)) { - SearchFindNextButton_Click(this, new EventArgs()); + SearchFindNextButton_MouseUp(null, null); e.Handled = e.SuppressKeyPress = true; } } @@ -1521,7 +1521,7 @@ private void SearchTextBox_KeyDown(object sender, KeyEventArgs e) } if (e.KeyCode == Keys.Enter & searchPanel.Visible & !string.IsNullOrEmpty(searchTextBox.Text)) { - SearchFindNextButton_Click(this, new EventArgs()); + SearchFindNextButton_MouseUp(null, null); e.Handled = e.SuppressKeyPress = true; } } @@ -1569,7 +1569,7 @@ private void FindText(string text, RichTextBoxFinds findOptions) } } - private void SearchFindNextButton_Click(object sender, EventArgs e) + private void SearchFindNextButton_MouseUp(object sender, MouseEventArgs e) { if ((!searchWholeWordCheckBox.Checked) & (!searchCaseSensitiveCheckBox.Checked)) { @@ -1741,6 +1741,7 @@ private void VariablesMainMenu_Click(object sender, EventArgs e) Debug.WriteLine("EditorMenuStrip: " + contextMenu.Enabled); #endif } + #endregion