Skip to content

Commit 51e8dfb

Browse files
author
Stephanos
authored
Merge pull request #15 from online-VCDS/sb/refactor-btns
Sb/refactor btns
2 parents e6d5bca + 3808daa commit 51e8dfb

File tree

12 files changed

+4037
-4008
lines changed

12 files changed

+4037
-4008
lines changed

AutoScanCompare/CodingCompare.Designer.cs

Lines changed: 415 additions & 414 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

AutoScanCompare/CodingCompare.cs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public CodingCompare(TreeNode node, string parentText, string coding1 = "", stri
2929
this.Text = parentTitle;
3030

3131
label15.Text = WinFormStrings.str_lblCodeForum;
32-
button1.Text = WinFormStrings.str_copyClipboard;
32+
CopyToClipboardBtn.Text = WinFormStrings.str_copyClipboard;
3333

3434
if(node == null)
3535
{
@@ -196,9 +196,14 @@ private void tbClick(object sender, EventArgs e)
196196

197197
}
198198

199-
private void button1_Click(object sender, EventArgs e)
199+
private void CopyToClipboardBtn_Click(object sender, EventArgs e)
200200
{
201201
Clipboard.SetText(richTextBox1.Text);
202-
}
203-
}
202+
}
203+
204+
private void CodingCompare_Load(object sender, EventArgs e)
205+
{
206+
207+
}
208+
}
204209
}

AutoScanCompare/CodingCompare.resx

Lines changed: 658 additions & 658 deletions
Large diffs are not rendered by default.

AutoScanCompare/Form1.Designer.cs

Lines changed: 190 additions & 190 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

AutoScanCompare/Form1.cs

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)