@@ -49,8 +49,8 @@ public Form1()
4949 label4 . Text = WinFormStrings . str_CodingQuickCompare ;
5050 label5 . Text = WinFormStrings . str_coding1 ;
5151 label6 . Text = WinFormStrings . str_coding2 ;
52- button2 . Text = WinFormStrings . str_btnCompare ;
53- button3 . Text = WinFormStrings . str_contextMenue ;
52+ OpenCodingCompareBtn . Text = WinFormStrings . str_btnCompare ;
53+ EnableContexMenuBtn . Text = WinFormStrings . str_contextMenue ;
5454
5555
5656 this . BackColor = ColorTranslator . FromHtml ( "#CDE1E2" ) ;
@@ -125,14 +125,22 @@ private void richTextBox2_TextChanged(object sender, EventArgs e)
125125 }
126126 }
127127
128- private void button1_Click ( object sender , EventArgs e )
128+ private void RunAutoscanCompareBtn_Click ( object sender , EventArgs e )
129129 {
130130 sourceSTGs . Clear ( ) ;
131131 destSTGs . Clear ( ) ;
132132 mergedSTGs . Clear ( ) ;
133- treeView1 . Nodes . Clear ( ) ;
133+ treeView1 . Nodes . Clear ( ) ;
134+
135+
136+
137+ if ( richTextBox1 . Text == "" || richTextBox2 . Text == "" )
138+ {
139+ MessageBox . Show ( WinFormStrings . str_autoscanNotSelected , WinFormStrings . str_Error , MessageBoxButtons . OK , MessageBoxIcon . Error ) ;
140+ return ;
141+ }
134142
135- if ( richTextBox1 . BackColor != Color . LightGreen || richTextBox2 . BackColor != Color . LightGreen || richTextBox1 . Text == "" || richTextBox2 . Text == "" )
143+ if ( richTextBox1 . BackColor != Color . LightGreen || richTextBox2 . BackColor != Color . LightGreen )
136144 {
137145 MessageBox . Show ( WinFormStrings . str_autoscanNotValid , WinFormStrings . str_Error , MessageBoxButtons . OK , MessageBoxIcon . Error ) ;
138146 return ;
@@ -336,7 +344,7 @@ private void treeView1_NodeMouseDoubleClick(object sender, TreeNodeMouseClickEve
336344 }
337345 }
338346
339- private void button2_Click ( object sender , EventArgs e )
347+ private void OpenCodingCompareBtn_Click ( object sender , EventArgs e )
340348 {
341349 if ( Regex . IsMatch ( textBox1 . Text , "^[0-9a-fA-F]+$" ) && Regex . IsMatch ( textBox2 . Text , "^[0-9a-fA-F]+$" ) && textBox1 . Text . Length == textBox2 . Text . Length )
342350 {
@@ -426,7 +434,7 @@ protected bool GetFilename(out string filename, DragEventArgs e)
426434 return ret ;
427435 }
428436
429- private void button3_Click ( object sender , EventArgs e )
437+ private void EnableContexMenuBtn_Click ( object sender , EventArgs e )
430438 {
431439 Helper . RegisterContextMenu ( ) ;
432440 }
0 commit comments