Changed path text box to editable on save
This commit is contained in:
@@ -360,7 +360,7 @@ namespace OpenRA.Editor
|
|||||||
nms.txtNew.ReadOnly = false;
|
nms.txtNew.ReadOnly = false;
|
||||||
nms.btnOk.Text = "Save";
|
nms.btnOk.Text = "Save";
|
||||||
nms.txtNew.Text = "unnamed";
|
nms.txtNew.Text = "unnamed";
|
||||||
|
nms.txtPathOut.ReadOnly = false;
|
||||||
|
|
||||||
if (DialogResult.OK == nms.ShowDialog())
|
if (DialogResult.OK == nms.ShowDialog())
|
||||||
{
|
{
|
||||||
@@ -411,6 +411,7 @@ namespace OpenRA.Editor
|
|||||||
.Aggregate(Path.Combine);
|
.Aggregate(Path.Combine);
|
||||||
|
|
||||||
nms.txtNew.ReadOnly = true;
|
nms.txtNew.ReadOnly = true;
|
||||||
|
nms.txtPathOut.ReadOnly = true;
|
||||||
nms.btnOk.Text = "Open";
|
nms.btnOk.Text = "Open";
|
||||||
|
|
||||||
if (DialogResult.OK == nms.ShowDialog())
|
if (DialogResult.OK == nms.ShowDialog())
|
||||||
|
|||||||
13
OpenRA.Editor/MapSelect.Designer.cs
generated
13
OpenRA.Editor/MapSelect.Designer.cs
generated
@@ -52,6 +52,7 @@
|
|||||||
this.txtTitle = new System.Windows.Forms.TextBox();
|
this.txtTitle = new System.Windows.Forms.TextBox();
|
||||||
this.lblMapName = new System.Windows.Forms.Label();
|
this.lblMapName = new System.Windows.Forms.Label();
|
||||||
this.lblMinimap = 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();
|
((System.ComponentModel.ISupportInitialize)(this.pbMinimap)).BeginInit();
|
||||||
this.pnlBottom.SuspendLayout();
|
this.pnlBottom.SuspendLayout();
|
||||||
this.splitContainer1.Panel1.SuspendLayout();
|
this.splitContainer1.Panel1.SuspendLayout();
|
||||||
@@ -141,6 +142,7 @@
|
|||||||
//
|
//
|
||||||
// pnlBottom
|
// pnlBottom
|
||||||
//
|
//
|
||||||
|
this.pnlBottom.Controls.Add(this.txtPathOut);
|
||||||
this.pnlBottom.Controls.Add(this.lblPathOut);
|
this.pnlBottom.Controls.Add(this.lblPathOut);
|
||||||
this.pnlBottom.Controls.Add(this.lblPath);
|
this.pnlBottom.Controls.Add(this.lblPath);
|
||||||
this.pnlBottom.Controls.Add(this.btnCancel);
|
this.pnlBottom.Controls.Add(this.btnCancel);
|
||||||
@@ -294,6 +296,16 @@
|
|||||||
this.lblMinimap.TabIndex = 6;
|
this.lblMinimap.TabIndex = 6;
|
||||||
this.lblMinimap.Text = "Map preview:";
|
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
|
// MapSelect
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
@@ -346,5 +358,6 @@
|
|||||||
public System.Windows.Forms.Label lblMapList;
|
public System.Windows.Forms.Label lblMapList;
|
||||||
public System.Windows.Forms.Label lblPathOut;
|
public System.Windows.Forms.Label lblPathOut;
|
||||||
public System.Windows.Forms.Label lblPath;
|
public System.Windows.Forms.Label lblPath;
|
||||||
|
public System.Windows.Forms.TextBox txtPathOut;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -26,7 +26,7 @@ namespace OpenRA.Editor
|
|||||||
DirectoryInfo directory = new DirectoryInfo(MapFolderPath);
|
DirectoryInfo directory = new DirectoryInfo(MapFolderPath);
|
||||||
DirectoryInfo[] directories = directory.GetDirectories();
|
DirectoryInfo[] directories = directory.GetDirectories();
|
||||||
MapList.Items.Clear();
|
MapList.Items.Clear();
|
||||||
lblPathOut.Text = MapFolderPath;
|
txtPathOut.Text = MapFolderPath;
|
||||||
foreach (DirectoryInfo subDirectory in directories)
|
foreach (DirectoryInfo subDirectory in directories)
|
||||||
{
|
{
|
||||||
ListViewItem map1 = new ListViewItem(subDirectory.Name);
|
ListViewItem map1 = new ListViewItem(subDirectory.Name);
|
||||||
@@ -68,5 +68,10 @@ namespace OpenRA.Editor
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void txtPathOut_TextChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
MapFolderPath = txtPathOut.Text;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user