Skip to content

Commit 2d7e062

Browse files
committed
Clean up refactoring dialogs better
1 parent cad4f22 commit 2d7e062

11 files changed

+208
-312
lines changed

RetailCoder.VBE/UI/Refactorings/ExtractMethodDialog.Designer.cs

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

RetailCoder.VBE/UI/Refactorings/ExtractMethodDialog.cs

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ private void Localize()
3131
{
3232
Text = RubberduckUI.ExtractMethod_Caption;
3333
OkButton.Text = RubberduckUI.OK;
34-
CancelButton.Text = RubberduckUI.CancelButtonText;
34+
CancelDialogButton.Text = RubberduckUI.CancelButtonText;
3535

3636
TitleLabel.Text = RubberduckUI.ExtractMethod_TitleText;
3737
InstructionsLabel.Text = RubberduckUI.ExtractMethod_InstructionsText;
@@ -152,18 +152,6 @@ private void OnViewEvent(EventHandler target, EventArgs args = null)
152152
handler(this, args ?? EventArgs.Empty);
153153
}
154154

155-
public event EventHandler CancelButtonClicked;
156-
public void OnCancelButtonClicked(object sender, EventArgs e)
157-
{
158-
OnViewEvent(CancelButtonClicked);
159-
}
160-
161-
public event EventHandler OkButtonClicked;
162-
public void OnOkButtonClicked(object sender, EventArgs e)
163-
{
164-
OnViewEvent(OkButtonClicked);
165-
}
166-
167155
private string _preview;
168156
public string Preview
169157
{

RetailCoder.VBE/UI/Refactorings/ExtractMethodDialog.resx

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -117,26 +117,4 @@
117117
<resheader name="writer">
118118
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
119119
</resheader>
120-
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
121-
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
122-
<value>
123-
AAABAAEAEA4AAAEAIADgAwAAFgAAACgAAAAQAAAAHAAAAAEAIAAAAAAAuAMAAAAAAAAAAAAAAAAAAAAA
124-
AAAAAAAAAAAAAAAAAB4AAABxAAEBtQEYGOMCLCz3AzEx/AIhIewABwfFAAAAiQAAADYAAAABAAAAAAAA
125-
AAAAAAAAAAAAAQAAAJIDODj5CJqa/wzh4f8O/f3/Dv///w7///8O////De/v/wq0tP8ES0v/AAAAewAA
126-
AAAAAAAAAAAAAAAAAEcFWlr/Dv///w7///8O////Dv///w7///8O////Dv///w7///8O////Dvv7/wMw
127-
MPkAAAAgAAAAAAAAAAAAAQGpC8zM/w7///8O////Dv///w7///8O////Dv///w7///8O////Dv///w7/
128-
//8JoKD/AAAAfAAAAAAAAAAAARMT4g78/P8O////Dv///w7///8O////Dv///w7///8O////Dv///w7/
129-
//8O////DNzc/wAAALAAAAAAAAAAAAImJvcO////Dv///w7///8O////Dv///w7///8O////Dv///w7/
130-
//8O////Dv///w3o6P8AAAC8AAAAAAAAAAACHh7vDv///w7///8O////Dv///w7///8O////Dv///w7/
131-
//8O////Dv///w7///8LxMT/AAAAngAAAAAAAAAAAAQExg3o6P8O////Dv///wmnp/8GZ2f/B3l5/wZ1
132-
df8Kr6//Dv///w7///8O////Bmxs/wAAAFIAAAAAAAAAAAAAAGwHgoL/Dv///wq+vv8BDAzTAAAAOQAA
133-
AE8BDQ3yDNLS/w7///8O////Dv///wZlZf8AABS4AAAPgQAAAA0AAAAIAQwM1AVjY/8ABwfEAAAAGAAA
134-
AAAAAABNBnJy/w7///8O////Dv///w7///8N5ub/AAM+/wAA4P8AAC62AAAAAAAAACAAAABLAAAAAgAA
135-
AAAAAAAAAAAAaAiUlP8O////Dv///wvKyv8Lvr7/Dvv7/wEQMf8AAP//AACF/wAAAAAAAAAAAAAAAAAA
136-
AAAAAAAAAAAAAAAAADkFV1f/Dv///w7///8HdHT/Blxc/wvMzP8AAAXWAAAoogAAF58AAAAAAAAAAAAA
137-
AAAAAAAAAAAAAAAAAAAAAAAAAAEBrwiQkP8O+/v/Dv///wzY2P8CLCz1AAAAMQAAAAAAAAAAAAAAAAAA
138-
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAACHARkZ4wIpKfQABga8AAAANgAAAAAAAAAAAAAAAMAH
139-
AAAABwAAAAMAAAADAAAAAwAAAAMAAAADAAAAAwAAAAAAAAQAAACMAAAA/AAAAP4DAAD+BwAA
140-
</value>
141-
</data>
142120
</root>

RetailCoder.VBE/UI/Refactorings/RemoveParametersDialog.Designer.cs

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

RetailCoder.VBE/UI/Refactorings/RemoveParametersDialog.cs

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public RemoveParametersDialog()
2424
private void InitializeCaptions()
2525
{
2626
OkButton.Text = RubberduckUI.OK;
27-
CancelButton.Text = RubberduckUI.CancelButtonText;
27+
CancelDialogButton.Text = RubberduckUI.CancelButtonText;
2828
Text = RubberduckUI.RemoveParamsDialog_Caption;
2929
TitleLabel.Text = RubberduckUI.RemoveParamsDialog_TitleText;
3030
InstructionsLabel.Text = RubberduckUI.RemoveParamsDialog_InstructionsLabelText;
@@ -60,26 +60,6 @@ public void InitializeParameterGrid()
6060
MethodParametersGrid.Columns.Add(column);
6161
}
6262

63-
public event EventHandler CancelButtonClicked;
64-
public void OnCancelButtonClicked(object sender, EventArgs e)
65-
{
66-
var handler = CancelButtonClicked;
67-
if (handler != null)
68-
{
69-
handler(this, EventArgs.Empty);
70-
}
71-
}
72-
73-
public event EventHandler OkButtonClicked;
74-
public void OnOkButtonClicked(object sender, EventArgs e)
75-
{
76-
var handler = OkButtonClicked;
77-
if (handler != null)
78-
{
79-
handler(this, EventArgs.Empty);
80-
}
81-
}
82-
8363
private void MarkAsRemovedParam()
8464
{
8565
if (_selectedItem != null)

0 commit comments

Comments
 (0)