[mapguide-commits] r6548 - branches/maestro-4.0.x/MgCooker

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Thu Mar 15 07:56:36 EDT 2012


Author: jng
Date: 2012-03-15 04:56:36 -0700 (Thu, 15 Mar 2012)
New Revision: 6548

Modified:
   branches/maestro-4.0.x/MgCooker/MgCooker.csproj
   branches/maestro-4.0.x/MgCooker/Program.cs
   branches/maestro-4.0.x/MgCooker/SetupRun.cs
Log:
#1971: Backport r6546 to 4.0.x branch

Modified: branches/maestro-4.0.x/MgCooker/MgCooker.csproj
===================================================================
--- branches/maestro-4.0.x/MgCooker/MgCooker.csproj	2012-03-15 11:43:38 UTC (rev 6547)
+++ branches/maestro-4.0.x/MgCooker/MgCooker.csproj	2012-03-15 11:56:36 UTC (rev 6548)
@@ -97,6 +97,12 @@
   <ItemGroup>
     <Content Include="MgCookerLogo.ico" />
   </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\OSGeo.MapGuide.ExtendedObjectModels\OSGeo.MapGuide.ExtendedObjectModels.csproj">
+      <Project>{B3A2B816-9F41-4857-A111-09D2DF2550D6}</Project>
+      <Name>OSGeo.MapGuide.ExtendedObjectModels</Name>
+    </ProjectReference>
+  </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
        Other similar extension points exist, see Microsoft.Common.targets.

Modified: branches/maestro-4.0.x/MgCooker/Program.cs
===================================================================
--- branches/maestro-4.0.x/MgCooker/Program.cs	2012-03-15 11:43:38 UTC (rev 6547)
+++ branches/maestro-4.0.x/MgCooker/Program.cs	2012-03-15 11:56:36 UTC (rev 6548)
@@ -26,6 +26,7 @@
 using OSGeo.MapGuide.MaestroAPI;
 using System.Collections.Specialized;
 using OSGeo.MapGuide.ObjectModels;
+using OSGeo.MapGuide.ExtendedObjectModels;
 
 namespace MgCooker
 {
@@ -56,6 +57,7 @@
             System.Windows.Forms.Application.EnableVisualStyles();
             System.Windows.Forms.Application.DoEvents();
             PreferredSiteList.InitCulture();
+            ModelSetup.Initialize();
 
             //Parameters:
             //mapagent=

Modified: branches/maestro-4.0.x/MgCooker/SetupRun.cs
===================================================================
--- branches/maestro-4.0.x/MgCooker/SetupRun.cs	2012-03-15 11:43:38 UTC (rev 6547)
+++ branches/maestro-4.0.x/MgCooker/SetupRun.cs	2012-03-15 11:56:36 UTC (rev 6548)
@@ -131,7 +131,10 @@
             MapTree.Nodes.Clear();
             foreach (string m in maps)
             {
-                IMapDefinition mdef = (IMapDefinition)m_connection.ResourceService.GetResource(m);
+                IMapDefinition mdef = m_connection.ResourceService.GetResource(m) as IMapDefinition;
+                if (mdef == null) //Skip unknown Map Definition version (which would be returned as UntypedResource objects)
+                    continue;
+
                 IBaseMapDefinition baseMap = mdef.BaseMap;
                 if (baseMap != null &&
                     baseMap.ScaleCount > 0 && 



More information about the mapguide-commits mailing list