[mapguide-commits] r5316 - sandbox/maestro-3.0/Maestro.Base/UI

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Thu Oct 21 07:29:14 EDT 2010


Author: jng
Date: 2010-10-21 04:29:14 -0700 (Thu, 21 Oct 2010)
New Revision: 5316

Modified:
   sandbox/maestro-3.0/Maestro.Base/UI/NewResourceDialog.Designer.cs
   sandbox/maestro-3.0/Maestro.Base/UI/NewResourceDialog.cs
Log:
Fix #1484: When user double clicks a template in the New Resource Dialog, make it the selected template to create a new item from.

Modified: sandbox/maestro-3.0/Maestro.Base/UI/NewResourceDialog.Designer.cs
===================================================================
--- sandbox/maestro-3.0/Maestro.Base/UI/NewResourceDialog.Designer.cs	2010-10-21 11:13:17 UTC (rev 5315)
+++ sandbox/maestro-3.0/Maestro.Base/UI/NewResourceDialog.Designer.cs	2010-10-21 11:29:14 UTC (rev 5316)
@@ -49,6 +49,7 @@
             this.lstTemplates.TabIndex = 0;
             this.lstTemplates.UseCompatibleStateImageBehavior = false;
             this.lstTemplates.View = System.Windows.Forms.View.Tile;
+            this.lstTemplates.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.lstTemplates_MouseDoubleClick);
             this.lstTemplates.SelectedIndexChanged += new System.EventHandler(this.lstTemplates_SelectedIndexChanged);
             // 
             // lstCategories

Modified: sandbox/maestro-3.0/Maestro.Base/UI/NewResourceDialog.cs
===================================================================
--- sandbox/maestro-3.0/Maestro.Base/UI/NewResourceDialog.cs	2010-10-21 11:13:17 UTC (rev 5315)
+++ sandbox/maestro-3.0/Maestro.Base/UI/NewResourceDialog.cs	2010-10-21 11:29:14 UTC (rev 5316)
@@ -153,5 +153,17 @@
                 return null;
             }
         }
+
+        private void lstTemplates_MouseDoubleClick(object sender, MouseEventArgs e)
+        {
+            var item = lstTemplates.GetItemAt(e.X, e.Y);
+            if (item != null)
+            {
+                lstTemplates.SelectedItems.Clear();
+                item.Selected = true;
+
+                this.DialogResult = DialogResult.OK;
+            }
+        }
     }
 }



More information about the mapguide-commits mailing list