[mapguide-commits] r4436 - in trunk/Tools/Maestro/Maestro: . ResourceEditors ResourceEditors/Templates Strings

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Mon Dec 14 17:07:25 EST 2009


Author: ksgeograf
Date: 2009-12-14 17:07:25 -0500 (Mon, 14 Dec 2009)
New Revision: 4436

Added:
   trunk/Tools/Maestro/Maestro/ResourceEditors/Templates/Compound Symbol.SymbolDefinition
Modified:
   trunk/Tools/Maestro/Maestro/FormExpression.cs
   trunk/Tools/Maestro/Maestro/FormExpression.resx
   trunk/Tools/Maestro/Maestro/FormMain.cs
   trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourceEditorBase.cs
   trunk/Tools/Maestro/Maestro/ResourceEditors/SelectDataProvider.cs
   trunk/Tools/Maestro/Maestro/ResourceEditors/Templates/Dataconnection.FeatureSource
   trunk/Tools/Maestro/Maestro/ResourceEditors/Templates/Layer.LayerDefinition
   trunk/Tools/Maestro/Maestro/ResourceEditors/Templates/Symbol Definition.SymbolDefinition
   trunk/Tools/Maestro/Maestro/ResourceEditors/ThemeCreator.cs
   trunk/Tools/Maestro/Maestro/Strings/TemplateNames.Designer.cs
   trunk/Tools/Maestro/Maestro/Strings/TemplateNames.resx
Log:
Maestro:
Fixed issue #1198.
Fixed issue #1199.
Fixed issue #1182.
Fixed issue #1151.

Modified: trunk/Tools/Maestro/Maestro/FormExpression.cs
===================================================================
--- trunk/Tools/Maestro/Maestro/FormExpression.cs	2009-12-14 07:59:27 UTC (rev 4435)
+++ trunk/Tools/Maestro/Maestro/FormExpression.cs	2009-12-14 22:07:25 UTC (rev 4436)
@@ -748,7 +748,7 @@
                         try
                         {
                             retry = false;
-                            using (FeatureSetReader rd = m_connection.QueryFeatureSource(m_featureSource, m_schema.FullnameDecoded, null, new string[] { ColumnName.Text }))
+                            using (FeatureSetReader rd = m_connection.QueryFeatureSource(m_featureSource, m_schema.FullnameDecoded, filter, new string[] { ColumnName.Text }))
                                 while (rd.Read())
                                     if (rd.Row.IsValueNull(ColumnName.Text))
                                         hasNull = true;
@@ -759,6 +759,7 @@
                         {
                             if (filter == null && ex.Message.IndexOf("MgNullPropertyValueException") >= 0)
                             {
+                                hasNull = true;
                                 rawEx = ex;
                                 retry = true;
                                 filter = ColumnName.Text + " != NULL";

Modified: trunk/Tools/Maestro/Maestro/FormExpression.resx
===================================================================
--- trunk/Tools/Maestro/Maestro/FormExpression.resx	2009-12-14 07:59:27 UTC (rev 4435)
+++ trunk/Tools/Maestro/Maestro/FormExpression.resx	2009-12-14 22:07:25 UTC (rev 4436)
@@ -123,7 +123,7 @@
   </data>
   <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
   <data name="OKBtn.Location" type="System.Drawing.Point, System.Drawing">
-    <value>289, 6</value>
+    <value>309, 6</value>
   </data>
   <data name="OKBtn.Size" type="System.Drawing.Size, System.Drawing">
     <value>75, 23</value>
@@ -151,7 +151,7 @@
     <value>Bottom, Right</value>
   </data>
   <data name="CancelBtn.Location" type="System.Drawing.Point, System.Drawing">
-    <value>377, 6</value>
+    <value>397, 6</value>
   </data>
   <data name="CancelBtn.Size" type="System.Drawing.Size, System.Drawing">
     <value>75, 23</value>
@@ -205,10 +205,10 @@
     <value>Bottom</value>
   </data>
   <data name="panel1.Location" type="System.Drawing.Point, System.Drawing">
-    <value>0, 231</value>
+    <value>0, 222</value>
   </data>
   <data name="panel1.Size" type="System.Drawing.Size, System.Drawing">
-    <value>464, 40</value>
+    <value>484, 40</value>
   </data>
   <data name="panel1.TabIndex" type="System.Int32, mscorlib">
     <value>4</value>
@@ -226,7 +226,7 @@
     <value>2</value>
   </data>
   <metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>17, 17</value>
+    <value>0, 0</value>
   </metadata>
   <data name="btnProperties.ImageTransparentColor" type="System.Drawing.Color, System.Drawing">
     <value>Magenta</value>
@@ -304,7 +304,7 @@
     <value>0, 0</value>
   </data>
   <data name="toolStrip1.Size" type="System.Drawing.Size, System.Drawing">
-    <value>464, 25</value>
+    <value>484, 25</value>
   </data>
   <data name="toolStrip1.TabIndex" type="System.Int32, mscorlib">
     <value>5</value>
@@ -337,7 +337,7 @@
     <value>True</value>
   </data>
   <data name="ExpressionText.Size" type="System.Drawing.Size, System.Drawing">
-    <value>464, 206</value>
+    <value>484, 197</value>
   </data>
   <data name="ExpressionText.TabIndex" type="System.Int32, mscorlib">
     <value>6</value>
@@ -364,8 +364,11 @@
     <value>6, 13</value>
   </data>
   <data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
-    <value>464, 271</value>
+    <value>484, 262</value>
   </data>
+  <data name="$this.MinimumSize" type="System.Drawing.Size, System.Drawing">
+    <value>500, 300</value>
+  </data>
   <data name="$this.StartPosition" type="System.Windows.Forms.FormStartPosition, System.Windows.Forms">
     <value>CenterParent</value>
   </data>

Modified: trunk/Tools/Maestro/Maestro/FormMain.cs
===================================================================
--- trunk/Tools/Maestro/Maestro/FormMain.cs	2009-12-14 07:59:27 UTC (rev 4435)
+++ trunk/Tools/Maestro/Maestro/FormMain.cs	2009-12-14 22:07:25 UTC (rev 4436)
@@ -1166,12 +1166,24 @@
 				if (ClassDef == null)
 					ClassDef = typeof(ResourceEditors.XmlEditorControl);
 
-				if (ClassDef != null)
-					try { AddEditTab(ClassDef, resourceID, resourceID.StartsWith("Library://")); }
-					catch (System.Reflection.TargetInvocationException tex) { MessageBox.Show(this, string.Format(Strings.FormMain.OpenFailedError, resourceID, tex.InnerException.Message), Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error); }
-					catch (Exception ex) { MessageBox.Show(this, string.Format(Strings.FormMain.OpenFailedError, resourceID, ex.ToString()), Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error); }
-				else
-					MessageBox.Show(this, string.Format(Strings.FormMain.UnknownResourceTypeError, resourceID), Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
+                if (ClassDef != null)
+                {
+                    try
+                    {
+                        AddEditTab(ClassDef, resourceID, resourceID.StartsWith("Library://"));
+                    }
+                    catch (Exception ex)
+                    {
+                        LastException = ex;
+                        Exception iex = ex;
+                        while (iex is System.Reflection.TargetInvocationException && iex.InnerException != null)
+                            iex = iex.InnerException;
+                        if (!(iex is CancelException))
+                            MessageBox.Show(this, string.Format(Strings.FormMain.OpenFailedError, resourceID, iex.ToString()), Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
+                    }
+                }
+                else
+                    MessageBox.Show(this, string.Format(Strings.FormMain.UnknownResourceTypeError, resourceID), Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
 				
 			}
 			

Modified: trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourceEditorBase.cs
===================================================================
--- trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourceEditorBase.cs	2009-12-14 07:59:27 UTC (rev 4435)
+++ trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourceEditorBase.cs	2009-12-14 22:07:25 UTC (rev 4436)
@@ -139,11 +139,26 @@
 		{
 			m_editor = editor;
 			m_feature = editor.CurrentConnection.GetFeatureSource(resourceID);
+
+            if (string.IsNullOrEmpty(m_feature.Provider))
+            {
+                SelectDataProvider sdp = new SelectDataProvider(editor.CurrentConnection);
+                if (sdp.ShowDialog(this) != DialogResult.Cancel && sdp.SelectedProvider != null)
+                {
+                    m_feature.Provider = sdp.SelectedProvider.Name;
+                    m_feature.Parameter = new OSGeo.MapGuide.MaestroAPI.NameValuePairTypeCollection();
+                    foreach (OSGeo.MapGuide.MaestroAPI.FeatureProviderRegistryFeatureProviderConnectionProperty property in sdp.SelectedProvider.ConnectionProperties)
+                        m_feature.Parameter[property.Name] = property.DefaultValue;
+                }
+                else
+                    throw new CancelException();
+            }
+
 			CreateLayout(editor, m_feature);
 
-			if (m_child == null)
-				throw new Exception(Strings.FeatureSourceEditorBase.FeatureSourceCreationError);
-		}
+            if (m_child == null)
+                throw new Exception(Strings.FeatureSourceEditorBase.FeatureSourceCreationError);
+        }
 
 		private System.Type ResolveSpecificResourceEditor(EditorInterface editor, string providerName)
 		{

Modified: trunk/Tools/Maestro/Maestro/ResourceEditors/SelectDataProvider.cs
===================================================================
--- trunk/Tools/Maestro/Maestro/ResourceEditors/SelectDataProvider.cs	2009-12-14 07:59:27 UTC (rev 4435)
+++ trunk/Tools/Maestro/Maestro/ResourceEditors/SelectDataProvider.cs	2009-12-14 22:07:25 UTC (rev 4436)
@@ -136,6 +136,7 @@
             // 
             this.AcceptButton = this.OKBtn;
             resources.ApplyResources(this, "$this");
+            this.CancelButton = this.CancelBtn;
             this.Controls.Add(this.CancelBtn);
             this.Controls.Add(this.OKBtn);
             this.Controls.Add(this.ProviderComments);

Added: trunk/Tools/Maestro/Maestro/ResourceEditors/Templates/Compound Symbol.SymbolDefinition
===================================================================
--- trunk/Tools/Maestro/Maestro/ResourceEditors/Templates/Compound Symbol.SymbolDefinition	                        (rev 0)
+++ trunk/Tools/Maestro/Maestro/ResourceEditors/Templates/Compound Symbol.SymbolDefinition	2009-12-14 22:07:25 UTC (rev 4436)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<CompoundSymbolDefinition xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xsi:noNamespaceSchemaLocation="SymbolDefinition-1.1.0.xsd" version="1.1.0">
+  <Name/>
+  <SimpleSymbol>
+    <SimpleSymbolDefinition>
+      <Name/>
+      <Graphics/>
+      <ParameterDefinition/>
+    </SimpleSymbolDefinition>
+  </SimpleSymbol>
+</CompoundSymbolDefinition>
\ No newline at end of file

Modified: trunk/Tools/Maestro/Maestro/ResourceEditors/Templates/Dataconnection.FeatureSource
===================================================================
--- trunk/Tools/Maestro/Maestro/ResourceEditors/Templates/Dataconnection.FeatureSource	2009-12-14 07:59:27 UTC (rev 4435)
+++ trunk/Tools/Maestro/Maestro/ResourceEditors/Templates/Dataconnection.FeatureSource	2009-12-14 22:07:25 UTC (rev 4436)
@@ -1 +1,4 @@
-<FeatureSource />
\ No newline at end of file
+<?xml version="1.0" encoding="utf-8"?>
+<FeatureSource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xsi:noNamespaceSchemaLocation="FeatureSource-1.0.0.xsd">
+  <Provider></Provider>
+</FeatureSource>
\ No newline at end of file

Modified: trunk/Tools/Maestro/Maestro/ResourceEditors/Templates/Layer.LayerDefinition
===================================================================
--- trunk/Tools/Maestro/Maestro/ResourceEditors/Templates/Layer.LayerDefinition	2009-12-14 07:59:27 UTC (rev 4435)
+++ trunk/Tools/Maestro/Maestro/ResourceEditors/Templates/Layer.LayerDefinition	2009-12-14 22:07:25 UTC (rev 4436)
@@ -1,16 +1,39 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<LayerDefinition xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="LayerDefinition-1.1.0.xsd" version="1.1.0">
- <VectorLayerDefinition>
-  <ResourceId></ResourceId>
-  <FeatureName></FeatureName>
-  <FeatureNameType>FeatureClass</FeatureNameType>
-  <Geometry></Geometry>
+<?xml version="1.0" encoding="utf-8"?>
+<LayerDefinition xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xsi:noNamespaceSchemaLocation="LayerDefinition-1.1.0.xsd" version="1.1.0">
+  <VectorLayerDefinition>
+    <ResourceId></ResourceId>
+    <FeatureName></FeatureName>
+    <FeatureNameType>FeatureClass</FeatureNameType>
+    <Filter />
+    <Geometry></Geometry>
+    <Url />
+    <ToolTip />
     <VectorScaleRange>
+      <MinScale>0</MinScale>
+      <AreaTypeStyle>
+        <AreaRule>
+          <LegendLabel />
+          <AreaSymbolization2D>
+            <Fill>
+              <FillPattern>Solid</FillPattern>
+              <ForegroundColor>e40000ff</ForegroundColor>
+              <BackgroundColor>ffffffff</BackgroundColor>
+            </Fill>
+            <Stroke>
+              <LineStyle>Solid</LineStyle>
+              <Thickness>0</Thickness>
+              <Color>ffdddddd</Color>
+              <Unit>Inches</Unit>
+              <SizeContext>MappingUnits</SizeContext>
+            </Stroke>
+          </AreaSymbolization2D>
+        </AreaRule>
+      </AreaTypeStyle>
       <PointTypeStyle>
         <DisplayAsText>false</DisplayAsText>
         <AllowOverpost>false</AllowOverpost>
         <PointRule>
+          <LegendLabel />
           <PointSymbolization2D>
             <Mark>
               <Unit>Points</Unit>
@@ -18,17 +41,16 @@
               <SizeX>10</SizeX>
               <SizeY>10</SizeY>
               <Rotation>0</Rotation>
-              <MaintainAspect>true</MaintainAspect>
-              <Shape>Square</Shape>
+              <Shape>Circle</Shape>
               <Fill>
                 <FillPattern>Solid</FillPattern>
-                <ForegroundColor>ff000000</ForegroundColor>
+                <ForegroundColor>d0ff0000</ForegroundColor>
                 <BackgroundColor>ffffffff</BackgroundColor>
               </Fill>
               <Edge>
                 <LineStyle>Solid</LineStyle>
                 <Thickness>1</Thickness>
-                <Color>000000</Color>
+                <Color>ff000000</Color>
                 <Unit>Points</Unit>
                 <SizeContext>DeviceUnits</SizeContext>
               </Edge>
@@ -38,33 +60,16 @@
       </PointTypeStyle>
       <LineTypeStyle>
         <LineRule>
+          <LegendLabel />
           <LineSymbolization2D>
             <LineStyle>Solid</LineStyle>
             <Thickness>1</Thickness>
-            <Color>000000</Color>
+            <Color>e4008000</Color>
             <Unit>Points</Unit>
             <SizeContext>DeviceUnits</SizeContext>
           </LineSymbolization2D>
         </LineRule>
       </LineTypeStyle>
-      <AreaTypeStyle>
-        <AreaRule>
-          <AreaSymbolization2D>
-            <Fill>
-              <FillPattern>Solid</FillPattern>
-              <ForegroundColor>ff000000</ForegroundColor>
-              <BackgroundColor>ffffffff</BackgroundColor>
-            </Fill>
-            <Stroke>
-              <LineStyle>Solid</LineStyle>
-              <Thickness>1</Thickness>
-              <Color>000000</Color>
-              <Unit>Points</Unit>
-              <SizeContext>DeviceUnits</SizeContext>
-            </Stroke>
-          </AreaSymbolization2D>
-        </AreaRule>
-      </AreaTypeStyle>
     </VectorScaleRange>
- </VectorLayerDefinition>
-</LayerDefinition>
+  </VectorLayerDefinition>
+</LayerDefinition>
\ No newline at end of file

Modified: trunk/Tools/Maestro/Maestro/ResourceEditors/Templates/Symbol Definition.SymbolDefinition
===================================================================
--- trunk/Tools/Maestro/Maestro/ResourceEditors/Templates/Symbol Definition.SymbolDefinition	2009-12-14 07:59:27 UTC (rev 4435)
+++ trunk/Tools/Maestro/Maestro/ResourceEditors/Templates/Symbol Definition.SymbolDefinition	2009-12-14 22:07:25 UTC (rev 4436)
@@ -1,20 +1,6 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<SimpleSymbolDefinition xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="SymbolDefinition-1.0.0.xsd" version="1.0.0">
-  <Name>Symbol</Name>
-  <Graphics>
-    <Path>
-      <Geometry>M 0,0 L 5,0 L 5,5 L 0,5 L 0,0</Geometry>
-      <FillColor>ff0000ff</FillColor>
-      <LineColor>ffff0000</LineColor>
-      <LineWeight>0.0</LineWeight>
-    </Path>
-    <Path>
-      <Geometry>M -2,-2 L 7,7 M 7,-2 L -2,7</Geometry>
-      <FillColor>00000000</FillColor>
-      <LineColor>ffffff00</LineColor>
-      <LineWeight>1.0</LineWeight>
-    </Path>
-  </Graphics>
-  <PointUsage/>
+<?xml version="1.0" encoding="UTF-8"?>
+<SimpleSymbolDefinition xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xsi:noNamespaceSchemaLocation="SymbolDefinition-1.1.0.xsd" version="1.1.0">
+  <Name/>
+  <Graphics/>
   <ParameterDefinition/>
-</SimpleSymbolDefinition>
+</SimpleSymbolDefinition>
\ No newline at end of file

Modified: trunk/Tools/Maestro/Maestro/ResourceEditors/ThemeCreator.cs
===================================================================
--- trunk/Tools/Maestro/Maestro/ResourceEditors/ThemeCreator.cs	2009-12-14 07:59:27 UTC (rev 4435)
+++ trunk/Tools/Maestro/Maestro/ResourceEditors/ThemeCreator.cs	2009-12-14 22:07:25 UTC (rev 4436)
@@ -265,8 +265,6 @@
                             AggregateCombo.SelectedIndex = 0;
                         if (AggregateCombo.SelectedIndex == AggregateCombo.Items.Count - 1)
                             AggregateCombo.SelectedIndex = 0;
-
-                        RefreshColorBrewerSet();
                     }
 
                 }
@@ -296,6 +294,7 @@
                         true;
                 }
 
+                RefreshColorBrewerSet();
                 RefreshPreview();
             }
         }
@@ -574,6 +573,9 @@
             }
             else
             {
+                if (ColorBrewerColorSet.SelectedItem == null)
+                    return new Color[0];
+
                 ColorBrewer c = ((ColorBrewer.ColorBrewerListItem)ColorBrewerColorSet.SelectedItem).Set;
                 if (c == null)
                     return new Color[0];

Modified: trunk/Tools/Maestro/Maestro/Strings/TemplateNames.Designer.cs
===================================================================
--- trunk/Tools/Maestro/Maestro/Strings/TemplateNames.Designer.cs	2009-12-14 07:59:27 UTC (rev 4435)
+++ trunk/Tools/Maestro/Maestro/Strings/TemplateNames.Designer.cs	2009-12-14 22:07:25 UTC (rev 4436)
@@ -61,6 +61,15 @@
         }
         
         /// <summary>
+        ///   Looks up a localized string similar to Sammensat symbol.
+        /// </summary>
+        internal static string Compound_Symbol {
+            get {
+                return ResourceManager.GetString("Compound_Symbol", resourceCulture);
+            }
+        }
+        
+        /// <summary>
         ///   Looks up a localized string similar to Dataconnection.
         /// </summary>
         internal static string Dataconnection {

Modified: trunk/Tools/Maestro/Maestro/Strings/TemplateNames.resx
===================================================================
--- trunk/Tools/Maestro/Maestro/Strings/TemplateNames.resx	2009-12-14 07:59:27 UTC (rev 4435)
+++ trunk/Tools/Maestro/Maestro/Strings/TemplateNames.resx	2009-12-14 22:07:25 UTC (rev 4436)
@@ -117,6 +117,10 @@
   <resheader name="writer">
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
+  <data name="Compound_Symbol" xml:space="preserve">
+    <value>Sammensat symbol</value>
+    <comment>The name of the compound Symbol Definition template</comment>
+  </data>
   <data name="Dataconnection" xml:space="preserve">
     <value>Dataconnection</value>
     <comment>The name of the default Dataconnection template</comment>



More information about the mapguide-commits mailing list