[mapguide-commits] r4764 -
trunk/Tools/Maestro/Maestro/PackageManager
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Wed Apr 7 22:48:11 EDT 2010
Author: jng
Date: 2010-04-07 22:48:10 -0400 (Wed, 07 Apr 2010)
New Revision: 4764
Modified:
trunk/Tools/Maestro/Maestro/PackageManager/CreatePackage.Designer.cs
trunk/Tools/Maestro/Maestro/PackageManager/CreatePackage.cs
Log:
Fix #1310: Check and auto-append the '/' to the resource path if none exists. This is done in two areas:
1) When the "Starting Point" field loses focus.
2) When the user clicks "OK"
Modified: trunk/Tools/Maestro/Maestro/PackageManager/CreatePackage.Designer.cs
===================================================================
--- trunk/Tools/Maestro/Maestro/PackageManager/CreatePackage.Designer.cs 2010-04-08 00:41:08 UTC (rev 4763)
+++ trunk/Tools/Maestro/Maestro/PackageManager/CreatePackage.Designer.cs 2010-04-08 02:48:10 UTC (rev 4764)
@@ -57,6 +57,7 @@
//
resources.ApplyResources(this.ResourcePath, "ResourcePath");
this.ResourcePath.Name = "ResourcePath";
+ this.ResourcePath.Leave += new System.EventHandler(this.ResourcePath_Leave);
//
// BrowseResourcePath
//
Modified: trunk/Tools/Maestro/Maestro/PackageManager/CreatePackage.cs
===================================================================
--- trunk/Tools/Maestro/Maestro/PackageManager/CreatePackage.cs 2010-04-08 00:41:08 UTC (rev 4763)
+++ trunk/Tools/Maestro/Maestro/PackageManager/CreatePackage.cs 2010-04-08 02:48:10 UTC (rev 4764)
@@ -60,6 +60,8 @@
private void OKBtn_Click(object sender, EventArgs e)
{
+ FixResourcePath();
+
if (AllowedTypes.CheckedItems.Count == 0)
{
MessageBox.Show(this, Strings.CreatePackage.NoTypesSelected, Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Information);
@@ -198,5 +200,16 @@
PackageFilename.Text = saveFileDialog.FileName;
}
+ private void ResourcePath_Leave(object sender, EventArgs e)
+ {
+ FixResourcePath();
+ }
+
+ private void FixResourcePath()
+ {
+ //The resource id to be packaged must be a folder so check for trailing slash
+ if (!ResourcePath.Text.EndsWith("/"))
+ ResourcePath.Text += "/";
+ }
}
}
\ No newline at end of file
More information about the mapguide-commits
mailing list