Changed path text box to editable on save

This commit is contained in:
katzsmile
2010-09-16 14:27:05 +04:00
committed by Paul Chote
parent f549e7e5a8
commit 366cd02761
3 changed files with 21 additions and 2 deletions

View File

@@ -360,7 +360,7 @@ namespace OpenRA.Editor
nms.txtNew.ReadOnly = false;
nms.btnOk.Text = "Save";
nms.txtNew.Text = "unnamed";
nms.txtPathOut.ReadOnly = false;
if (DialogResult.OK == nms.ShowDialog())
{
@@ -411,6 +411,7 @@ namespace OpenRA.Editor
.Aggregate(Path.Combine);
nms.txtNew.ReadOnly = true;
nms.txtPathOut.ReadOnly = true;
nms.btnOk.Text = "Open";
if (DialogResult.OK == nms.ShowDialog())

View File

@@ -52,6 +52,7 @@
this.txtTitle = new System.Windows.Forms.TextBox();
this.lblMapName = new System.Windows.Forms.Label();
this.lblMinimap = new System.Windows.Forms.Label();
this.txtPathOut = new System.Windows.Forms.TextBox();
((System.ComponentModel.ISupportInitialize)(this.pbMinimap)).BeginInit();
this.pnlBottom.SuspendLayout();
this.splitContainer1.Panel1.SuspendLayout();
@@ -141,6 +142,7 @@
//
// pnlBottom
//
this.pnlBottom.Controls.Add(this.txtPathOut);
this.pnlBottom.Controls.Add(this.lblPathOut);
this.pnlBottom.Controls.Add(this.lblPath);
this.pnlBottom.Controls.Add(this.btnCancel);
@@ -294,6 +296,16 @@
this.lblMinimap.TabIndex = 6;
this.lblMinimap.Text = "Map preview:";
//
// txtPathOut
//
this.txtPathOut.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.txtPathOut.Location = new System.Drawing.Point(55, 10);
this.txtPathOut.Name = "txtPathOut";
this.txtPathOut.ReadOnly = true;
this.txtPathOut.Size = new System.Drawing.Size(265, 20);
this.txtPathOut.TabIndex = 7;
this.txtPathOut.TextChanged += new System.EventHandler(this.txtPathOut_TextChanged);
//
// MapSelect
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@@ -346,5 +358,6 @@
public System.Windows.Forms.Label lblMapList;
public System.Windows.Forms.Label lblPathOut;
public System.Windows.Forms.Label lblPath;
public System.Windows.Forms.TextBox txtPathOut;
}
}

View File

@@ -26,7 +26,7 @@ namespace OpenRA.Editor
DirectoryInfo directory = new DirectoryInfo(MapFolderPath);
DirectoryInfo[] directories = directory.GetDirectories();
MapList.Items.Clear();
lblPathOut.Text = MapFolderPath;
txtPathOut.Text = MapFolderPath;
foreach (DirectoryInfo subDirectory in directories)
{
ListViewItem map1 = new ListViewItem(subDirectory.Name);
@@ -68,5 +68,10 @@ namespace OpenRA.Editor
}
}
private void txtPathOut_TextChanged(object sender, EventArgs e)
{
MapFolderPath = txtPathOut.Text;
}
}
}