[mapguide-commits] r4881 - in sandbox/maestro-2.5: Maestro Maestro/Properties Maestro.Base/Properties Maestro.Base/UI OSGeo.MapGuide.MaestroAPI

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Fri May 14 05:44:44 EDT 2010


Author: jng
Date: 2010-05-14 05:44:44 -0400 (Fri, 14 May 2010)
New Revision: 4881

Modified:
   sandbox/maestro-2.5/Maestro.Base/Properties/Resources.Designer.cs
   sandbox/maestro-2.5/Maestro.Base/Properties/Resources.resx
   sandbox/maestro-2.5/Maestro.Base/UI/EmbeddedWebBrowser.cs
   sandbox/maestro-2.5/Maestro/Maestro.csproj
   sandbox/maestro-2.5/Maestro/Program.cs
   sandbox/maestro-2.5/Maestro/Properties/Resources.Designer.cs
   sandbox/maestro-2.5/Maestro/Properties/Resources.resx
   sandbox/maestro-2.5/OSGeo.MapGuide.MaestroAPI/Platform.cs
Log:
Fix the platform check, which was incorrect. Also tweak the Web Browser title (it wasn't showing in Mono)

Modified: sandbox/maestro-2.5/Maestro/Maestro.csproj
===================================================================
--- sandbox/maestro-2.5/Maestro/Maestro.csproj	2010-05-14 09:22:38 UTC (rev 4880)
+++ sandbox/maestro-2.5/Maestro/Maestro.csproj	2010-05-14 09:44:44 UTC (rev 4881)
@@ -52,6 +52,7 @@
     <Compile Include="Properties\Resources.Designer.cs">
       <AutoGen>True</AutoGen>
       <DependentUpon>Resources.resx</DependentUpon>
+      <DesignTime>True</DesignTime>
     </Compile>
     <None Include="Maestro.sh">
       <CopyToOutputDirectory>Always</CopyToOutputDirectory>

Modified: sandbox/maestro-2.5/Maestro/Program.cs
===================================================================
--- sandbox/maestro-2.5/Maestro/Program.cs	2010-05-14 09:22:38 UTC (rev 4880)
+++ sandbox/maestro-2.5/Maestro/Program.cs	2010-05-14 09:44:44 UTC (rev 4881)
@@ -26,6 +26,7 @@
 using System.Reflection;
 using ICSharpCode.Core.Services;
 using Maestro.Base.UI;
+using OSGeo.MapGuide.MaestroAPI;
 
 namespace Maestro
 {
@@ -52,6 +53,11 @@
             // to System.Diagnostics.Trace.
             LoggingService.Info("Application start");
 
+            if (!Platform.IsWindows)
+            {
+                LoggingService.Info(Properties.Resources.Warn_Mono);
+            }
+
             AppDomain.CurrentDomain.AssemblyLoad += new AssemblyLoadEventHandler(CurrentDomain_AssemblyLoad);
 
             // Get a reference to the entry assembly (Startup.exe)

Modified: sandbox/maestro-2.5/Maestro/Properties/Resources.Designer.cs
===================================================================
--- sandbox/maestro-2.5/Maestro/Properties/Resources.Designer.cs	2010-05-14 09:22:38 UTC (rev 4880)
+++ sandbox/maestro-2.5/Maestro/Properties/Resources.Designer.cs	2010-05-14 09:44:44 UTC (rev 4881)
@@ -8,10 +8,10 @@
 // </auto-generated>
 //------------------------------------------------------------------------------
 
-namespace Maestro.Properties
-{
-
-
+namespace Maestro.Properties {
+    using System;
+    
+    
     /// <summary>
     ///   A strongly-typed resource class, for looking up localized strings, etc.
     /// </summary>
@@ -22,50 +22,51 @@
     [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")]
     [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
-    internal class Resources
-    {
-
+    internal class Resources {
+        
         private static global::System.Resources.ResourceManager resourceMan;
-
+        
         private static global::System.Globalization.CultureInfo resourceCulture;
-
+        
         [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
-        internal Resources()
-        {
+        internal Resources() {
         }
-
+        
         /// <summary>
         ///   Returns the cached ResourceManager instance used by this class.
         /// </summary>
         [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
-        internal static global::System.Resources.ResourceManager ResourceManager
-        {
-            get
-            {
-                if ((resourceMan == null))
-                {
+        internal static global::System.Resources.ResourceManager ResourceManager {
+            get {
+                if (object.ReferenceEquals(resourceMan, null)) {
                     global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Maestro.Properties.Resources", typeof(Resources).Assembly);
                     resourceMan = temp;
                 }
                 return resourceMan;
             }
         }
-
+        
         /// <summary>
         ///   Overrides the current thread's CurrentUICulture property for all
         ///   resource lookups using this strongly typed resource class.
         /// </summary>
         [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
-        internal static global::System.Globalization.CultureInfo Culture
-        {
-            get
-            {
+        internal static global::System.Globalization.CultureInfo Culture {
+            get {
                 return resourceCulture;
             }
-            set
-            {
+            set {
                 resourceCulture = value;
             }
         }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to It seems you&apos;re not running Windows. I assume you must be running Mono then. Please take note that some things may not work as intended in Mono. .
+        /// </summary>
+        internal static string Warn_Mono {
+            get {
+                return ResourceManager.GetString("Warn_Mono", resourceCulture);
+            }
+        }
     }
 }

Modified: sandbox/maestro-2.5/Maestro/Properties/Resources.resx
===================================================================
--- sandbox/maestro-2.5/Maestro/Properties/Resources.resx	2010-05-14 09:22:38 UTC (rev 4880)
+++ sandbox/maestro-2.5/Maestro/Properties/Resources.resx	2010-05-14 09:44:44 UTC (rev 4881)
@@ -46,7 +46,7 @@
     
     mimetype: application/x-microsoft.net.object.binary.base64
     value   : The object must be serialized with 
-            : System.Serialization.Formatters.Binary.BinaryFormatter
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
             : and then encoded with base64 encoding.
     
     mimetype: application/x-microsoft.net.object.soap.base64
@@ -60,6 +60,7 @@
             : and then encoded with base64 encoding.
     -->
   <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
     <xsd:element name="root" msdata:IsDataSet="true">
       <xsd:complexType>
         <xsd:choice maxOccurs="unbounded">
@@ -68,9 +69,10 @@
               <xsd:sequence>
                 <xsd:element name="value" type="xsd:string" minOccurs="0" />
               </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" />
+              <xsd:attribute name="name" use="required" type="xsd:string" />
               <xsd:attribute name="type" type="xsd:string" />
               <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
             </xsd:complexType>
           </xsd:element>
           <xsd:element name="assembly">
@@ -85,9 +87,10 @@
                 <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
                 <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
               </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
               <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
               <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
             </xsd:complexType>
           </xsd:element>
           <xsd:element name="resheader">
@@ -114,4 +117,7 @@
   <resheader name="writer">
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
+  <data name="Warn_Mono" xml:space="preserve">
+    <value>It seems you're not running Windows. I assume you must be running Mono then. Please take note that some things may not work as intended in Mono. </value>
+  </data>
 </root>
\ No newline at end of file

Modified: sandbox/maestro-2.5/Maestro.Base/Properties/Resources.Designer.cs
===================================================================
--- sandbox/maestro-2.5/Maestro.Base/Properties/Resources.Designer.cs	2010-05-14 09:22:38 UTC (rev 4880)
+++ sandbox/maestro-2.5/Maestro.Base/Properties/Resources.Designer.cs	2010-05-14 09:44:44 UTC (rev 4881)
@@ -1,7 +1,7 @@
 //------------------------------------------------------------------------------
 // <auto-generated>
 //     This code was generated by a tool.
-//     Runtime Version:2.0.50727.4927
+//     Runtime Version:2.0.50727.3053
 //
 //     Changes to this file may cause incorrect behavior and will be lost if
 //     the code is regenerated.
@@ -194,7 +194,7 @@
         }
         
         /// <summary>
-        ///   Looks up a localized string similar to Web Browser.
+        ///   Looks up a localized string similar to Embedded Web Browser.
         /// </summary>
         internal static string Content_WebBrowser {
             get {

Modified: sandbox/maestro-2.5/Maestro.Base/Properties/Resources.resx
===================================================================
--- sandbox/maestro-2.5/Maestro.Base/Properties/Resources.resx	2010-05-14 09:22:38 UTC (rev 4880)
+++ sandbox/maestro-2.5/Maestro.Base/Properties/Resources.resx	2010-05-14 09:44:44 UTC (rev 4881)
@@ -257,7 +257,7 @@
     <value>..\Resources\arrow-circle-045-left.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
   </data>
   <data name="Content_WebBrowser" xml:space="preserve">
-    <value>Web Browser</value>
+    <value>Embedded Web Browser</value>
   </data>
   <data name="cross_script" type="System.Resources.ResXFileRef, System.Windows.Forms">
     <value>..\Resources\cross-script.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>

Modified: sandbox/maestro-2.5/Maestro.Base/UI/EmbeddedWebBrowser.cs
===================================================================
--- sandbox/maestro-2.5/Maestro.Base/UI/EmbeddedWebBrowser.cs	2010-05-14 09:22:38 UTC (rev 4880)
+++ sandbox/maestro-2.5/Maestro.Base/UI/EmbeddedWebBrowser.cs	2010-05-14 09:44:44 UTC (rev 4881)
@@ -37,7 +37,6 @@
         public EmbeddedWebBrowser()
         {
             InitializeComponent();
-            this.Title = Properties.Resources.Content_WebBrowser;
             _presenter = new WebBrowserPresenter(this);
         }
 
@@ -55,6 +54,7 @@
         protected override void OnLoad(EventArgs e)
         {
             base.OnLoad(e);
+            this.Title = Properties.Resources.Content_WebBrowser;
             if (!string.IsNullOrEmpty(_initUrl))
             {
                 txtUrl.Text = _initUrl;
@@ -208,7 +208,7 @@
 
         private void browser_ProgressChanged(object sender, WebBrowserProgressChangedEventArgs e)
         {
-            if (e.MaximumProgress > 0)
+            if (e.MaximumProgress > 0) //Mono WebBrowser stability
             {
                 progressBar.Maximum = (int)e.MaximumProgress;
 
@@ -216,7 +216,7 @@
                     progressBar.Value = (int)e.CurrentProgress;
             }
 
-            if (browser.Document != null)
+            if (browser.Document != null) //Mono WebBrowser stability
             {
                 this.Title = browser.Document.Title;
                 this.Description = browser.Document.Title + " - Embedded Web Browser"; //LOCALIZE

Modified: sandbox/maestro-2.5/OSGeo.MapGuide.MaestroAPI/Platform.cs
===================================================================
--- sandbox/maestro-2.5/OSGeo.MapGuide.MaestroAPI/Platform.cs	2010-05-14 09:22:38 UTC (rev 4880)
+++ sandbox/maestro-2.5/OSGeo.MapGuide.MaestroAPI/Platform.cs	2010-05-14 09:44:44 UTC (rev 4881)
@@ -27,7 +27,7 @@
     {
         public static bool IsWindows
         {
-            get { return Environment.OSVersion.Platform != PlatformID.Unix || Environment.OSVersion.Platform != PlatformID.MacOSX; }
+            get { return Environment.OSVersion.Platform != PlatformID.Unix && Environment.OSVersion.Platform != PlatformID.MacOSX; }
         }
     }
 }



More information about the mapguide-commits mailing list