Cast sender to Control instead of Button because it could be either a Button or a TextBox

This commit is contained in:
Michael Becker 2015-04-20 11:22:13 -04:00
parent 6877fd6899
commit 28de1d16c0

View File

@ -169,7 +169,7 @@ namespace UniversalEditor.UserInterface.WindowsForms.Dialogs
private void cmdFileBrowse_Click(object sender, EventArgs e)
{
Button cmd = (sender as Button);
Control cmd = (sender as Control);
CustomOptionFile eo = (cmd.Tag as CustomOptionFile);
if (eo.DialogMode == CustomOptionFileDialogMode.Open)