Skip to content
Browse files

2008-08-19 Ivan N. Zlatev <contact@i-nz.net>

	* Make the file path textbox readonly in the New File dialog.
	[Fixes bug #417617]


svn path=/trunk/mwf-designer/; revision=110870
  • Loading branch information...
1 parent 4cd2699 commit 097d7ea321b8db56d2b32dbb89b5c981f8b1d807 @ivanz ivanz committed Aug 18, 2008
Showing with 20 additions and 2 deletions.
  1. +5 −0 ChangeLog
  2. +2 −0 src/UI/NewFileDialog.Designer.cs
  3. +13 −2 src/UI/NewFileDialog.cs
View
5 ChangeLog
@@ -1,3 +1,8 @@
+2008-08-19 Ivan N. Zlatev <contact@i-nz.net>
+
+ * Make the file path textbox readonly in the New File dialog.
+ [Fixes bug #417617]
+
2008-07-28 Ivan N. Zlatev <contact@i-nz.net>
* Misc fixes and improvements.
View
2 src/UI/NewFileDialog.Designer.cs
@@ -96,6 +96,8 @@ private void InitializeComponent()
this.filenameTextbox.Name = "filenameTextbox";
this.filenameTextbox.Size = new System.Drawing.Size(178, 20);
this.filenameTextbox.TabIndex = 6;
+ this.filenameTextbox.ReadOnly = true;
+ this.filenameTextbox.Click += new System.EventHandler(this.filenameTextbox_Click);
//
// label3
//
View
15 src/UI/NewFileDialog.cs
@@ -79,11 +79,22 @@ private void cancelButton_Click(object sender, EventArgs e)
private void browseButton_Click(object sender, EventArgs e)
{
+ filenameTextbox.Text = SelectSaveLocation ();
+ }
+
+ private void filenameTextbox_Click (object sender, EventArgs e)
+ {
+ filenameTextbox.Text = SelectSaveLocation ();
+ }
+
+ private string SelectSaveLocation ()
+ {
SaveFileDialog dialog = new SaveFileDialog();
- dialog.OverwritePrompt = true;
+ dialog.OverwritePrompt = true;
dialog.Filter = "C# Source Code (*.cs)|*.cs| VB.NET Source Code (*.vb)|*.vb|Other|*.*";
if (dialog.ShowDialog() == DialogResult.OK)
- filenameTextbox.Text = dialog.FileName;
+ return dialog.FileName;
+ return null;
}
private void doneButton_Click(object sender, EventArgs e)

0 comments on commit 097d7ea

Please sign in to comment.
Something went wrong with that request. Please try again.