Index: src/Common/DelftTools.Controls.Swf/WizardPages/SelectFileWizardPage.cs
===================================================================
diff -u -r8f6ae890fed8e8eae3a32f9c0498a10f82e0ddf9 -r5fc71a385897af92ccb092f2f969b5709afab85a
--- src/Common/DelftTools.Controls.Swf/WizardPages/SelectFileWizardPage.cs (.../SelectFileWizardPage.cs) (revision 8f6ae890fed8e8eae3a32f9c0498a10f82e0ddf9)
+++ src/Common/DelftTools.Controls.Swf/WizardPages/SelectFileWizardPage.cs (.../SelectFileWizardPage.cs) (revision 5fc71a385897af92ccb092f2f969b5709afab85a)
@@ -8,31 +8,54 @@
///
public partial class SelectFileWizardPage : UserControl, IWizardPage
{
+ public event EventHandler FileSelected;
private string fileName;
- public event EventHandler FileSelected;
-
///
///
public SelectFileWizardPage()
{
InitializeComponent();
}
+
///
/// File used in the openFileDialog
///
public virtual string Filter
{
- get { return openFileDialog.Filter; }
- set { openFileDialog.Filter = value; }
+ get
+ {
+ return openFileDialog.Filter;
+ }
+ set
+ {
+ openFileDialog.Filter = value;
+ }
}
- public virtual string FileName
+ public virtual string FileName
{
- get { return fileName; }
+ get
+ {
+ return fileName;
+ }
set {}
}
-
+
+ ///
+ ///
+ public string FileDescription
+ {
+ get
+ {
+ return lblDescription.Text;
+ }
+ set
+ {
+ lblDescription.Text = value;
+ }
+ }
+
public bool CanFinish()
{
return CanDoNext();
@@ -43,20 +66,19 @@
return textBox1.Text != string.Empty && labelErrorMessage.Text == string.Empty;
}
- ///
- ///
- public string FileDescription
+ public bool CanDoPrevious()
{
- get { return lblDescription.Text; }
- set { lblDescription.Text = value; }
+ return true;
}
- public bool CanDoPrevious()
+ protected virtual void OnFileSelected()
{
- return true;
+ if (FileSelected != null)
+ {
+ FileSelected(this, new EventArgs());
+ }
}
-
-
+
private void buttonOpenFile_Click(object sender, EventArgs e)
{
if (openFileDialog.ShowDialog() == DialogResult.OK)
@@ -72,18 +94,9 @@
fileName = "";
textBox1.Text = "";
labelErrorMessage.Text = exception.Message;
-
}
OnFileSelected();
}
}
-
- protected virtual void OnFileSelected()
- {
- if (FileSelected != null)
- {
- FileSelected(this, new EventArgs());
- }
- }
}
}
\ No newline at end of file