[mapguide-commits] r7921 - trunk/Tools/Maestro/Maestro.Base/UI/Packaging
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Sun Nov 24 07:09:09 PST 2013
Author: jng
Date: 2013-11-24 07:09:09 -0800 (Sun, 24 Nov 2013)
New Revision: 7921
Modified:
trunk/Tools/Maestro/Maestro.Base/UI/Packaging/CreatePackageDialog.Designer.cs
trunk/Tools/Maestro/Maestro.Base/UI/Packaging/CreatePackageDialog.cs
trunk/Tools/Maestro/Maestro.Base/UI/Packaging/CreatePackageDialog.resx
Log:
#2373: Add button to read all resource ids from a file in the Create Package dialog
Modified: trunk/Tools/Maestro/Maestro.Base/UI/Packaging/CreatePackageDialog.Designer.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Base/UI/Packaging/CreatePackageDialog.Designer.cs 2013-11-22 15:28:37 UTC (rev 7920)
+++ trunk/Tools/Maestro/Maestro.Base/UI/Packaging/CreatePackageDialog.Designer.cs 2013-11-24 15:09:09 UTC (rev 7921)
@@ -30,31 +30,33 @@
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CreatePackageDialog));
this.panel1 = new System.Windows.Forms.Panel();
+ this.groupBox2 = new System.Windows.Forms.GroupBox();
+ this.btnReadFromFile = new System.Windows.Forms.Button();
+ this.label1 = new System.Windows.Forms.Label();
+ this.txtResourcePath = new System.Windows.Forms.TextBox();
+ this.txtResourceIdList = new System.Windows.Forms.TextBox();
+ this.BrowseResourcePath = new System.Windows.Forms.Button();
+ this.rdResourceList = new System.Windows.Forms.RadioButton();
+ this.rdPackageFolder = new System.Windows.Forms.RadioButton();
+ this.groupBox1 = new System.Windows.Forms.GroupBox();
+ this.txtPackageFilename = new System.Windows.Forms.TextBox();
this.btnBrowseRestorePath = new System.Windows.Forms.Button();
+ this.chkRemoveTargetFolderOnRestore = new System.Windows.Forms.CheckBox();
this.lnkAll = new System.Windows.Forms.LinkLabel();
+ this.chkRestorePath = new System.Windows.Forms.CheckBox();
this.BrowseTargetFilename = new System.Windows.Forms.Button();
- this.txtPackageFilename = new System.Windows.Forms.TextBox();
+ this.txtRestorePath = new System.Windows.Forms.TextBox();
+ this.label2 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.chkAllowedTypes = new System.Windows.Forms.CheckedListBox();
- this.label2 = new System.Windows.Forms.Label();
- this.txtRestorePath = new System.Windows.Forms.TextBox();
- this.chkRestorePath = new System.Windows.Forms.CheckBox();
- this.chkRemoveTargetFolderOnRestore = new System.Windows.Forms.CheckBox();
- this.BrowseResourcePath = new System.Windows.Forms.Button();
- this.txtResourcePath = new System.Windows.Forms.TextBox();
this.panel2 = new System.Windows.Forms.Panel();
this.btnCancel = new System.Windows.Forms.Button();
this.btnOK = new System.Windows.Forms.Button();
- this.groupBox1 = new System.Windows.Forms.GroupBox();
- this.rdPackageFolder = new System.Windows.Forms.RadioButton();
- this.rdResourceList = new System.Windows.Forms.RadioButton();
- this.txtResourceIdList = new System.Windows.Forms.TextBox();
- this.groupBox2 = new System.Windows.Forms.GroupBox();
- this.label1 = new System.Windows.Forms.Label();
+ this.openFileDialog = new System.Windows.Forms.OpenFileDialog();
this.panel1.SuspendLayout();
+ this.groupBox2.SuspendLayout();
+ this.groupBox1.SuspendLayout();
this.panel2.SuspendLayout();
- this.groupBox1.SuspendLayout();
- this.groupBox2.SuspendLayout();
this.SuspendLayout();
//
// panel1
@@ -64,6 +66,86 @@
resources.ApplyResources(this.panel1, "panel1");
this.panel1.Name = "panel1";
//
+ // groupBox2
+ //
+ resources.ApplyResources(this.groupBox2, "groupBox2");
+ this.groupBox2.Controls.Add(this.btnReadFromFile);
+ this.groupBox2.Controls.Add(this.label1);
+ this.groupBox2.Controls.Add(this.txtResourcePath);
+ this.groupBox2.Controls.Add(this.txtResourceIdList);
+ this.groupBox2.Controls.Add(this.BrowseResourcePath);
+ this.groupBox2.Controls.Add(this.rdResourceList);
+ this.groupBox2.Controls.Add(this.rdPackageFolder);
+ this.groupBox2.Name = "groupBox2";
+ this.groupBox2.TabStop = false;
+ //
+ // btnReadFromFile
+ //
+ resources.ApplyResources(this.btnReadFromFile, "btnReadFromFile");
+ this.btnReadFromFile.Name = "btnReadFromFile";
+ this.btnReadFromFile.UseVisualStyleBackColor = true;
+ this.btnReadFromFile.Click += new System.EventHandler(this.btnReadFromFile_Click);
+ //
+ // label1
+ //
+ resources.ApplyResources(this.label1, "label1");
+ this.label1.Name = "label1";
+ //
+ // txtResourcePath
+ //
+ resources.ApplyResources(this.txtResourcePath, "txtResourcePath");
+ this.txtResourcePath.Name = "txtResourcePath";
+ this.txtResourcePath.ReadOnly = true;
+ //
+ // txtResourceIdList
+ //
+ resources.ApplyResources(this.txtResourceIdList, "txtResourceIdList");
+ this.txtResourceIdList.Name = "txtResourceIdList";
+ //
+ // BrowseResourcePath
+ //
+ resources.ApplyResources(this.BrowseResourcePath, "BrowseResourcePath");
+ this.BrowseResourcePath.Name = "BrowseResourcePath";
+ this.BrowseResourcePath.UseVisualStyleBackColor = true;
+ this.BrowseResourcePath.Click += new System.EventHandler(this.BrowseResourcePath_Click);
+ //
+ // rdResourceList
+ //
+ resources.ApplyResources(this.rdResourceList, "rdResourceList");
+ this.rdResourceList.Name = "rdResourceList";
+ this.rdResourceList.UseVisualStyleBackColor = true;
+ this.rdResourceList.CheckedChanged += new System.EventHandler(this.rdResourceList_CheckedChanged);
+ //
+ // rdPackageFolder
+ //
+ resources.ApplyResources(this.rdPackageFolder, "rdPackageFolder");
+ this.rdPackageFolder.Checked = true;
+ this.rdPackageFolder.Name = "rdPackageFolder";
+ this.rdPackageFolder.TabStop = true;
+ this.rdPackageFolder.UseVisualStyleBackColor = true;
+ this.rdPackageFolder.CheckedChanged += new System.EventHandler(this.rdPackageFolder_CheckedChanged);
+ //
+ // groupBox1
+ //
+ resources.ApplyResources(this.groupBox1, "groupBox1");
+ this.groupBox1.Controls.Add(this.txtPackageFilename);
+ this.groupBox1.Controls.Add(this.btnBrowseRestorePath);
+ this.groupBox1.Controls.Add(this.chkRemoveTargetFolderOnRestore);
+ this.groupBox1.Controls.Add(this.lnkAll);
+ this.groupBox1.Controls.Add(this.chkRestorePath);
+ this.groupBox1.Controls.Add(this.BrowseTargetFilename);
+ this.groupBox1.Controls.Add(this.txtRestorePath);
+ this.groupBox1.Controls.Add(this.label2);
+ this.groupBox1.Controls.Add(this.label3);
+ this.groupBox1.Controls.Add(this.chkAllowedTypes);
+ this.groupBox1.Name = "groupBox1";
+ this.groupBox1.TabStop = false;
+ //
+ // txtPackageFilename
+ //
+ resources.ApplyResources(this.txtPackageFilename, "txtPackageFilename");
+ this.txtPackageFilename.Name = "txtPackageFilename";
+ //
// btnBrowseRestorePath
//
resources.ApplyResources(this.btnBrowseRestorePath, "btnBrowseRestorePath");
@@ -71,6 +153,12 @@
this.btnBrowseRestorePath.UseVisualStyleBackColor = true;
this.btnBrowseRestorePath.Click += new System.EventHandler(this.btnBrowseRestorePath_Click);
//
+ // chkRemoveTargetFolderOnRestore
+ //
+ resources.ApplyResources(this.chkRemoveTargetFolderOnRestore, "chkRemoveTargetFolderOnRestore");
+ this.chkRemoveTargetFolderOnRestore.Name = "chkRemoveTargetFolderOnRestore";
+ this.chkRemoveTargetFolderOnRestore.UseVisualStyleBackColor = true;
+ //
// lnkAll
//
resources.ApplyResources(this.lnkAll, "lnkAll");
@@ -78,6 +166,13 @@
this.lnkAll.TabStop = true;
this.lnkAll.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.lnkAll_LinkClicked);
//
+ // chkRestorePath
+ //
+ resources.ApplyResources(this.chkRestorePath, "chkRestorePath");
+ this.chkRestorePath.Name = "chkRestorePath";
+ this.chkRestorePath.UseVisualStyleBackColor = true;
+ this.chkRestorePath.CheckedChanged += new System.EventHandler(this.chkRestorePath_CheckedChanged);
+ //
// BrowseTargetFilename
//
resources.ApplyResources(this.BrowseTargetFilename, "BrowseTargetFilename");
@@ -85,11 +180,16 @@
this.BrowseTargetFilename.UseVisualStyleBackColor = true;
this.BrowseTargetFilename.Click += new System.EventHandler(this.BrowseTargetFilename_Click);
//
- // txtPackageFilename
+ // txtRestorePath
//
- resources.ApplyResources(this.txtPackageFilename, "txtPackageFilename");
- this.txtPackageFilename.Name = "txtPackageFilename";
+ resources.ApplyResources(this.txtRestorePath, "txtRestorePath");
+ this.txtRestorePath.Name = "txtRestorePath";
//
+ // label2
+ //
+ resources.ApplyResources(this.label2, "label2");
+ this.label2.Name = "label2";
+ //
// label3
//
resources.ApplyResources(this.label3, "label3");
@@ -102,42 +202,6 @@
this.chkAllowedTypes.FormattingEnabled = true;
this.chkAllowedTypes.Name = "chkAllowedTypes";
//
- // label2
- //
- resources.ApplyResources(this.label2, "label2");
- this.label2.Name = "label2";
- //
- // txtRestorePath
- //
- resources.ApplyResources(this.txtRestorePath, "txtRestorePath");
- this.txtRestorePath.Name = "txtRestorePath";
- //
- // chkRestorePath
- //
- resources.ApplyResources(this.chkRestorePath, "chkRestorePath");
- this.chkRestorePath.Name = "chkRestorePath";
- this.chkRestorePath.UseVisualStyleBackColor = true;
- this.chkRestorePath.CheckedChanged += new System.EventHandler(this.chkRestorePath_CheckedChanged);
- //
- // chkRemoveTargetFolderOnRestore
- //
- resources.ApplyResources(this.chkRemoveTargetFolderOnRestore, "chkRemoveTargetFolderOnRestore");
- this.chkRemoveTargetFolderOnRestore.Name = "chkRemoveTargetFolderOnRestore";
- this.chkRemoveTargetFolderOnRestore.UseVisualStyleBackColor = true;
- //
- // BrowseResourcePath
- //
- resources.ApplyResources(this.BrowseResourcePath, "BrowseResourcePath");
- this.BrowseResourcePath.Name = "BrowseResourcePath";
- this.BrowseResourcePath.UseVisualStyleBackColor = true;
- this.BrowseResourcePath.Click += new System.EventHandler(this.BrowseResourcePath_Click);
- //
- // txtResourcePath
- //
- resources.ApplyResources(this.txtResourcePath, "txtResourcePath");
- this.txtResourcePath.Name = "txtResourcePath";
- this.txtResourcePath.ReadOnly = true;
- //
// panel2
//
this.panel2.Controls.Add(this.btnCancel);
@@ -160,58 +224,6 @@
this.btnOK.UseVisualStyleBackColor = true;
this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
//
- // groupBox1
- //
- resources.ApplyResources(this.groupBox1, "groupBox1");
- this.groupBox1.Controls.Add(this.txtPackageFilename);
- this.groupBox1.Controls.Add(this.btnBrowseRestorePath);
- this.groupBox1.Controls.Add(this.chkRemoveTargetFolderOnRestore);
- this.groupBox1.Controls.Add(this.lnkAll);
- this.groupBox1.Controls.Add(this.chkRestorePath);
- this.groupBox1.Controls.Add(this.BrowseTargetFilename);
- this.groupBox1.Controls.Add(this.txtRestorePath);
- this.groupBox1.Controls.Add(this.label2);
- this.groupBox1.Controls.Add(this.label3);
- this.groupBox1.Controls.Add(this.chkAllowedTypes);
- this.groupBox1.Name = "groupBox1";
- this.groupBox1.TabStop = false;
- //
- // rdPackageFolder
- //
- resources.ApplyResources(this.rdPackageFolder, "rdPackageFolder");
- this.rdPackageFolder.Checked = true;
- this.rdPackageFolder.Name = "rdPackageFolder";
- this.rdPackageFolder.TabStop = true;
- this.rdPackageFolder.UseVisualStyleBackColor = true;
- //
- // rdResourceList
- //
- resources.ApplyResources(this.rdResourceList, "rdResourceList");
- this.rdResourceList.Name = "rdResourceList";
- this.rdResourceList.UseVisualStyleBackColor = true;
- //
- // txtResourceIdList
- //
- resources.ApplyResources(this.txtResourceIdList, "txtResourceIdList");
- this.txtResourceIdList.Name = "txtResourceIdList";
- //
- // groupBox2
- //
- resources.ApplyResources(this.groupBox2, "groupBox2");
- this.groupBox2.Controls.Add(this.label1);
- this.groupBox2.Controls.Add(this.txtResourcePath);
- this.groupBox2.Controls.Add(this.txtResourceIdList);
- this.groupBox2.Controls.Add(this.BrowseResourcePath);
- this.groupBox2.Controls.Add(this.rdResourceList);
- this.groupBox2.Controls.Add(this.rdPackageFolder);
- this.groupBox2.Name = "groupBox2";
- this.groupBox2.TabStop = false;
- //
- // label1
- //
- resources.ApplyResources(this.label1, "label1");
- this.label1.Name = "label1";
- //
// CreatePackageDialog
//
this.AcceptButton = this.btnOK;
@@ -223,11 +235,11 @@
this.Controls.Add(this.panel2);
this.Name = "CreatePackageDialog";
this.panel1.ResumeLayout(false);
- this.panel2.ResumeLayout(false);
+ this.groupBox2.ResumeLayout(false);
+ this.groupBox2.PerformLayout();
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
- this.groupBox2.ResumeLayout(false);
- this.groupBox2.PerformLayout();
+ this.panel2.ResumeLayout(false);
this.ResumeLayout(false);
}
@@ -256,5 +268,7 @@
private System.Windows.Forms.RadioButton rdPackageFolder;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.Label label1;
+ private System.Windows.Forms.Button btnReadFromFile;
+ private System.Windows.Forms.OpenFileDialog openFileDialog;
}
}
\ No newline at end of file
Modified: trunk/Tools/Maestro/Maestro.Base/UI/Packaging/CreatePackageDialog.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Base/UI/Packaging/CreatePackageDialog.cs 2013-11-22 15:28:37 UTC (rev 7920)
+++ trunk/Tools/Maestro/Maestro.Base/UI/Packaging/CreatePackageDialog.cs 2013-11-24 15:09:09 UTC (rev 7921)
@@ -29,6 +29,7 @@
using Maestro.Editors.Generic;
using Maestro.Shared.UI;
using OSGeo.MapGuide.MaestroAPI.Resource;
+using System.IO;
namespace Maestro.Base.UI.Packaging
{
@@ -231,5 +232,26 @@
}
}
}
+
+ private void btnReadFromFile_Click(object sender, EventArgs e)
+ {
+ if (openFileDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
+ {
+ string[] lines = File.ReadAllLines(openFileDialog.FileName)
+ .Where(s => ResourceIdentifier.Validate(s))
+ .ToArray();
+ txtResourceIdList.Lines = lines;
+ }
+ }
+
+ private void rdResourceList_CheckedChanged(object sender, EventArgs e)
+ {
+ btnReadFromFile.Enabled = rdResourceList.Checked;
+ }
+
+ private void rdPackageFolder_CheckedChanged(object sender, EventArgs e)
+ {
+ btnReadFromFile.Enabled = rdResourceList.Checked;
+ }
}
}
Modified: trunk/Tools/Maestro/Maestro.Base/UI/Packaging/CreatePackageDialog.resx
===================================================================
--- trunk/Tools/Maestro/Maestro.Base/UI/Packaging/CreatePackageDialog.resx 2013-11-22 15:28:37 UTC (rev 7920)
+++ trunk/Tools/Maestro/Maestro.Base/UI/Packaging/CreatePackageDialog.resx 2013-11-24 15:09:09 UTC (rev 7921)
@@ -121,11 +121,41 @@
<data name="groupBox2.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Left, Right</value>
</data>
+ <data name="btnReadFromFile.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
+ <value>Bottom, Left</value>
+ </data>
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+ <data name="btnReadFromFile.Enabled" type="System.Boolean, mscorlib">
+ <value>False</value>
+ </data>
+ <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+ <data name="btnReadFromFile.Location" type="System.Drawing.Point, System.Drawing">
+ <value>10, 139</value>
+ </data>
+ <data name="btnReadFromFile.Size" type="System.Drawing.Size, System.Drawing">
+ <value>99, 23</value>
+ </data>
+ <data name="btnReadFromFile.TabIndex" type="System.Int32, mscorlib">
+ <value>44</value>
+ </data>
+ <data name="btnReadFromFile.Text" xml:space="preserve">
+ <value>Read from File</value>
+ </data>
+ <data name=">>btnReadFromFile.Name" xml:space="preserve">
+ <value>btnReadFromFile</value>
+ </data>
+ <data name=">>btnReadFromFile.Type" xml:space="preserve">
+ <value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </data>
+ <data name=">>btnReadFromFile.Parent" xml:space="preserve">
+ <value>groupBox2</value>
+ </data>
+ <data name=">>btnReadFromFile.ZOrder" xml:space="preserve">
+ <value>0</value>
+ </data>
<data name="label1.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
- <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="label1.Location" type="System.Drawing.Point, System.Drawing">
<value>32, 64</value>
</data>
@@ -148,7 +178,7 @@
<value>groupBox2</value>
</data>
<data name=">>label1.ZOrder" xml:space="preserve">
- <value>0</value>
+ <value>1</value>
</data>
<data name="txtResourcePath.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Left, Right</value>
@@ -172,7 +202,7 @@
<value>groupBox2</value>
</data>
<data name=">>txtResourcePath.ZOrder" xml:space="preserve">
- <value>1</value>
+ <value>2</value>
</data>
<data name="txtResourceIdList.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Bottom, Left, Right</value>
@@ -199,7 +229,7 @@
<value>groupBox2</value>
</data>
<data name=">>txtResourceIdList.ZOrder" xml:space="preserve">
- <value>2</value>
+ <value>3</value>
</data>
<data name="BrowseResourcePath.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Right</value>
@@ -229,7 +259,7 @@
<value>groupBox2</value>
</data>
<data name=">>BrowseResourcePath.ZOrder" xml:space="preserve">
- <value>3</value>
+ <value>4</value>
</data>
<data name="rdResourceList.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@@ -256,7 +286,7 @@
<value>groupBox2</value>
</data>
<data name=">>rdResourceList.ZOrder" xml:space="preserve">
- <value>4</value>
+ <value>5</value>
</data>
<data name="rdPackageFolder.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@@ -283,7 +313,7 @@
<value>groupBox2</value>
</data>
<data name=">>rdPackageFolder.ZOrder" xml:space="preserve">
- <value>5</value>
+ <value>6</value>
</data>
<data name="groupBox2.Location" type="System.Drawing.Point, System.Drawing">
<value>12, 12</value>
@@ -720,21 +750,27 @@
<data name=">>panel2.ZOrder" xml:space="preserve">
<value>1</value>
</data>
+ <metadata name="openFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>17, 17</value>
+ </metadata>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
<value>435, 496</value>
</data>
- <data name="$this.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
- <value>NoControl</value>
- </data>
<data name="$this.StartPosition" type="System.Windows.Forms.FormStartPosition, System.Windows.Forms">
<value>CenterParent</value>
</data>
<data name="$this.Text" xml:space="preserve">
<value>Create Package</value>
</data>
+ <data name=">>openFileDialog.Name" xml:space="preserve">
+ <value>openFileDialog</value>
+ </data>
+ <data name=">>openFileDialog.Type" xml:space="preserve">
+ <value>System.Windows.Forms.OpenFileDialog, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </data>
<data name=">>$this.Name" xml:space="preserve">
<value>CreatePackageDialog</value>
</data>
More information about the mapguide-commits
mailing list