[mapguide-commits] r4868 - in sandbox/maestro-2.5: Maestro.Base
Maestro.Base/Commands Maestro.Base/Commands/SiteExplorer
Maestro.Base/Commands/Toggle Maestro.Base/Editor
Maestro.Base/Events Maestro.Base/Properties
Maestro.Base/Resources Maestro.Base/Services Maestro.Base/UI
Maestro.Editors/Generic
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Thu May 13 07:53:04 EDT 2010
Author: jng
Date: 2010-05-13 07:53:04 -0400 (Thu, 13 May 2010)
New Revision: 4868
Added:
sandbox/maestro-2.5/Maestro.Base/Commands/SiteExplorer/OpenResourceCommand.cs
sandbox/maestro-2.5/Maestro.Base/Commands/Toggle/
sandbox/maestro-2.5/Maestro.Base/Commands/Toggle/ToggleMessagesCommand.cs
sandbox/maestro-2.5/Maestro.Base/Editor/
sandbox/maestro-2.5/Maestro.Base/Editor/EditorContentBase.Designer.cs
sandbox/maestro-2.5/Maestro.Base/Editor/EditorContentBase.cs
sandbox/maestro-2.5/Maestro.Base/Editor/EditorContentBase.resx
sandbox/maestro-2.5/Maestro.Base/Editor/IEditorViewContent.cs
sandbox/maestro-2.5/Maestro.Base/Editor/WebLayoutEditor.Designer.cs
sandbox/maestro-2.5/Maestro.Base/Editor/WebLayoutEditor.cs
sandbox/maestro-2.5/Maestro.Base/Editor/WebLayoutEditor.resx
sandbox/maestro-2.5/Maestro.Base/Editor/XmlEditor.Designer.cs
sandbox/maestro-2.5/Maestro.Base/Editor/XmlEditor.cs
sandbox/maestro-2.5/Maestro.Base/Editor/XmlEditor.resx
sandbox/maestro-2.5/Maestro.Base/Preferences/
sandbox/maestro-2.5/Maestro.Base/Resources/reports-stack.png
sandbox/maestro-2.5/Maestro.Base/Services/NewItemTemplateService.cs
sandbox/maestro-2.5/Maestro.Base/Services/ViewContentManager.cs
sandbox/maestro-2.5/Maestro.Base/UI/SingletonViewContent.Designer.cs
sandbox/maestro-2.5/Maestro.Base/UI/SingletonViewContent.cs
Modified:
sandbox/maestro-2.5/Maestro.Base/Commands/StartupCommand.cs
sandbox/maestro-2.5/Maestro.Base/Events/EventWatcher.cs
sandbox/maestro-2.5/Maestro.Base/IViewContent.cs
sandbox/maestro-2.5/Maestro.Base/Maestro.Base.addin
sandbox/maestro-2.5/Maestro.Base/Maestro.Base.csproj
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/Services/UrlLauncher.cs
sandbox/maestro-2.5/Maestro.Base/TabFactory.cs
sandbox/maestro-2.5/Maestro.Base/UI/EmbeddedWebBrowser.cs
sandbox/maestro-2.5/Maestro.Base/UI/ISiteExplorer.cs
sandbox/maestro-2.5/Maestro.Base/UI/MessageViewer.Designer.cs
sandbox/maestro-2.5/Maestro.Base/UI/MessageViewer.cs
sandbox/maestro-2.5/Maestro.Base/UI/SiteExplorer.cs
sandbox/maestro-2.5/Maestro.Base/ViewContentBase.cs
sandbox/maestro-2.5/Maestro.Base/Workbench.cs
sandbox/maestro-2.5/Maestro.Base/ZonedContainer.Designer.cs
sandbox/maestro-2.5/Maestro.Base/ZonedContainer.cs
sandbox/maestro-2.5/Maestro.Editors/Generic/XmlEditorCtrl.Designer.cs
sandbox/maestro-2.5/Maestro.Editors/Generic/XmlEditorCtrl.cs
Log:
This submission includes the following changes:
- Simplify the workbench API, the ViewContent will tell the Workbench where it wants to go.
- Added notification support in ZonedContainer
- Use a plain textbox for the Message Logger instead of a grid.
- Implement Save/Clear for Message Logger
- Added more APIs to IViewContent allowing for notification of hiding/showing
- Show the Maestro home page in the embedded web browser on startup. This is just to simply verify our UI layout is correctly functioning.
- Added more dummy commands.
- Added a skeleton new item template service.
- Add a ViewContentManager service which handles the creation and visibility control of all view content.
- Start integrating some of the dummy resource editors into the base addin.
Added: sandbox/maestro-2.5/Maestro.Base/Commands/SiteExplorer/OpenResourceCommand.cs
===================================================================
--- sandbox/maestro-2.5/Maestro.Base/Commands/SiteExplorer/OpenResourceCommand.cs (rev 0)
+++ sandbox/maestro-2.5/Maestro.Base/Commands/SiteExplorer/OpenResourceCommand.cs 2010-05-13 11:53:04 UTC (rev 4868)
@@ -0,0 +1,30 @@
+#region Disclaimer / License
+// Copyright (C) 2010, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+//
+#endregion
+using System;
+using System.Collections.Generic;
+using System.Text;
+using ICSharpCode.Core;
+
+namespace Maestro.Base.Commands.SiteExplorer
+{
+ internal class OpenResourceCommand : NotImplementedCommand
+ {
+ }
+}
Modified: sandbox/maestro-2.5/Maestro.Base/Commands/StartupCommand.cs
===================================================================
--- sandbox/maestro-2.5/Maestro.Base/Commands/StartupCommand.cs 2010-05-13 07:49:03 UTC (rev 4867)
+++ sandbox/maestro-2.5/Maestro.Base/Commands/StartupCommand.cs 2010-05-13 11:53:04 UTC (rev 4868)
@@ -25,6 +25,8 @@
using Maestro.Base.Services;
using Maestro.Base.Events;
using Maestro.Base.UI;
+using Maestro.Base.Editor;
+using OSGeo.MapGuide.ObjectModels.WebLayout;
namespace Maestro.Base.Commands
{
@@ -43,8 +45,15 @@
var wb = Workbench.Instance;
wb.Text = "MapGuide Maestro";
- var msg = new MessageViewer();
- wb.ShowContent(msg, ViewRegion.Bottom);
+ var mgr = ServiceRegistry.GetService<ViewContentManager>();
+
+ //Show messages
+ mgr.OpenContent<MessageViewer>(ViewRegion.Bottom);
+
+ //Show maestro home page
+ var launcher = ServiceRegistry.GetService<UrlLauncher>();
+ launcher.OpenUrlEmbedded("http://trac.osgeo.org/mapguide/wiki/maestro", "Maestro Home", true); //LOCALIZE
+
new LoginCommand().Run();
};
}
Added: sandbox/maestro-2.5/Maestro.Base/Commands/Toggle/ToggleMessagesCommand.cs
===================================================================
--- sandbox/maestro-2.5/Maestro.Base/Commands/Toggle/ToggleMessagesCommand.cs (rev 0)
+++ sandbox/maestro-2.5/Maestro.Base/Commands/Toggle/ToggleMessagesCommand.cs 2010-05-13 11:53:04 UTC (rev 4868)
@@ -0,0 +1,41 @@
+#region Disclaimer / License
+// Copyright (C) 2010, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+//
+#endregion
+using System;
+using System.Collections.Generic;
+using System.Text;
+using ICSharpCode.Core;
+using Maestro.Base.Services;
+using Maestro.Base.UI;
+
+namespace Maestro.Base.Commands.Toggle
+{
+ public class ToggleMessagesCommand : AbstractCheckableMenuCommand
+ {
+ public override void Run()
+ {
+ this.IsChecked = !this.IsChecked;
+ var mgr = ServiceRegistry.GetService<ViewContentManager>();
+ if (this.IsChecked)
+ mgr.ShowContent<MessageViewer>();
+ else
+ mgr.HideContent<MessageViewer>();
+ }
+ }
+}
Added: sandbox/maestro-2.5/Maestro.Base/Editor/EditorContentBase.Designer.cs
===================================================================
--- sandbox/maestro-2.5/Maestro.Base/Editor/EditorContentBase.Designer.cs (rev 0)
+++ sandbox/maestro-2.5/Maestro.Base/Editor/EditorContentBase.Designer.cs 2010-05-13 11:53:04 UTC (rev 4868)
@@ -0,0 +1,98 @@
+namespace Maestro.Base.Editor
+{
+ partial class EditorContentBase
+ {
+ /// <summary>
+ /// Required designer variable.
+ /// </summary>
+ private System.ComponentModel.IContainer components = null;
+
+ /// <summary>
+ /// Clean up any resources being used.
+ /// </summary>
+ /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Component Designer generated code
+
+ /// <summary>
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ /// </summary>
+ private void InitializeComponent()
+ {
+ this.upgradePanel = new System.Windows.Forms.Panel();
+ this.label1 = new System.Windows.Forms.Label();
+ this.btnUpgrade = new System.Windows.Forms.Button();
+ this.panelBody = new System.Windows.Forms.Panel();
+ this.upgradePanel.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // upgradePanel
+ //
+ this.upgradePanel.BackColor = System.Drawing.SystemColors.Info;
+ this.upgradePanel.Controls.Add(this.label1);
+ this.upgradePanel.Controls.Add(this.btnUpgrade);
+ this.upgradePanel.Dock = System.Windows.Forms.DockStyle.Top;
+ this.upgradePanel.Location = new System.Drawing.Point(0, 0);
+ this.upgradePanel.Name = "upgradePanel";
+ this.upgradePanel.Size = new System.Drawing.Size(614, 39);
+ this.upgradePanel.TabIndex = 0;
+ //
+ // label1
+ //
+ this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.label1.Location = new System.Drawing.Point(17, 13);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(494, 13);
+ this.label1.TabIndex = 2;
+ this.label1.Text = "This resource can be upgraded to a newer version to take advantage of newer featu" +
+ "res";
+ //
+ // btnUpgrade
+ //
+ this.btnUpgrade.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+ this.btnUpgrade.Location = new System.Drawing.Point(526, 8);
+ this.btnUpgrade.Name = "btnUpgrade";
+ this.btnUpgrade.Size = new System.Drawing.Size(75, 23);
+ this.btnUpgrade.TabIndex = 1;
+ this.btnUpgrade.Text = "Upgrade";
+ this.btnUpgrade.UseVisualStyleBackColor = true;
+ //
+ // panelBody
+ //
+ this.panelBody.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.panelBody.Location = new System.Drawing.Point(0, 39);
+ this.panelBody.Name = "panelBody";
+ this.panelBody.Size = new System.Drawing.Size(614, 520);
+ this.panelBody.TabIndex = 1;
+ //
+ // EditorContentBase
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.Controls.Add(this.panelBody);
+ this.Controls.Add(this.upgradePanel);
+ this.Name = "EditorContentBase";
+ this.Size = new System.Drawing.Size(614, 559);
+ this.upgradePanel.ResumeLayout(false);
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.Panel upgradePanel;
+ private System.Windows.Forms.Label label1;
+ private System.Windows.Forms.Button btnUpgrade;
+ protected System.Windows.Forms.Panel panelBody;
+ }
+}
Added: sandbox/maestro-2.5/Maestro.Base/Editor/EditorContentBase.cs
===================================================================
--- sandbox/maestro-2.5/Maestro.Base/Editor/EditorContentBase.cs (rev 0)
+++ sandbox/maestro-2.5/Maestro.Base/Editor/EditorContentBase.cs 2010-05-13 11:53:04 UTC (rev 4868)
@@ -0,0 +1,65 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Drawing;
+using System.Data;
+using System.Text;
+using System.Windows.Forms;
+using OSGeo.MapGuide.MaestroAPI.Resource;
+using OSGeo.MapGuide.MaestroAPI;
+
+namespace Maestro.Base.Editor
+{
+ public partial class EditorContentBase : ViewContentBase, IEditorViewContent
+ {
+ public EditorContentBase()
+ {
+ InitializeComponent();
+ }
+
+ public bool CanUpgrade
+ {
+ get { return upgradePanel.Visible; }
+ private set { upgradePanel.Visible = value; }
+ }
+
+ private IResource _resource;
+
+ public IResource Resource
+ {
+ get
+ {
+ return _resource;
+ }
+ set
+ {
+ _resource = value;
+ this.Title = ResourceIdentifier.GetName(_resource.ResourceID);
+ this.Description = _resource.ResourceID;
+ Bind(value);
+ }
+ }
+
+ protected virtual void Bind(IResource value) { }
+
+ private IServerConnection _conn;
+
+ public IServerConnection Connection
+ {
+ get
+ {
+ return _conn;
+ }
+ set
+ {
+ _conn = value;
+ this.CanUpgrade = _conn.Capabilities.GetMaxSupportedResourceVersion(_resource.ResourceType) > _resource.ResourceVersion;
+ }
+ }
+
+ public bool CanBePreviewed
+ {
+ get { return false; }
+ }
+ }
+}
Added: sandbox/maestro-2.5/Maestro.Base/Editor/EditorContentBase.resx
===================================================================
--- sandbox/maestro-2.5/Maestro.Base/Editor/EditorContentBase.resx (rev 0)
+++ sandbox/maestro-2.5/Maestro.Base/Editor/EditorContentBase.resx 2010-05-13 11:53:04 UTC (rev 4868)
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : 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">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <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">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <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" 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">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+</root>
\ No newline at end of file
Added: sandbox/maestro-2.5/Maestro.Base/Editor/IEditorViewContent.cs
===================================================================
--- sandbox/maestro-2.5/Maestro.Base/Editor/IEditorViewContent.cs (rev 0)
+++ sandbox/maestro-2.5/Maestro.Base/Editor/IEditorViewContent.cs 2010-05-13 11:53:04 UTC (rev 4868)
@@ -0,0 +1,50 @@
+#region Disclaimer / License
+// Copyright (C) 2010, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+//
+#endregion
+using System;
+using System.Collections.Generic;
+using System.Text;
+using OSGeo.MapGuide.MaestroAPI;
+using OSGeo.MapGuide.MaestroAPI.Resource;
+
+namespace Maestro.Base.Editor
+{
+ public interface IEditorViewContent : IViewContent
+ {
+ /// <summary>
+ /// Gets or sets the current resource being edited
+ /// </summary>
+ IResource Resource { get; set; }
+
+ /// <summary>
+ /// Gets or sets the current connection
+ /// </summary>
+ IServerConnection Connection { get; set; }
+
+ /// <summary>
+ /// Indicates whether this current resource can be upgraded.
+ /// </summary>
+ bool CanUpgrade { get; }
+
+ /// <summary>
+ /// Indicates whether the resource being edited can be previewed
+ /// </summary>
+ bool CanBePreviewed { get; }
+ }
+}
Added: sandbox/maestro-2.5/Maestro.Base/Editor/WebLayoutEditor.Designer.cs
===================================================================
--- sandbox/maestro-2.5/Maestro.Base/Editor/WebLayoutEditor.Designer.cs (rev 0)
+++ sandbox/maestro-2.5/Maestro.Base/Editor/WebLayoutEditor.Designer.cs 2010-05-13 11:53:04 UTC (rev 4868)
@@ -0,0 +1,63 @@
+namespace Maestro.Base.Editor
+{
+ partial class WebLayoutEditor
+ {
+ /// <summary>
+ /// Required designer variable.
+ /// </summary>
+ private System.ComponentModel.IContainer components = null;
+
+ /// <summary>
+ /// Clean up any resources being used.
+ /// </summary>
+ /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Component Designer generated code
+
+ /// <summary>
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ /// </summary>
+ private void InitializeComponent()
+ {
+ this.webLayoutEditorCtrl1 = new Maestro.Editors.WebLayout.WebLayoutEditorCtrl();
+ this.panelBody.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // panelBody
+ //
+ this.panelBody.Controls.Add(this.webLayoutEditorCtrl1);
+ //
+ // webLayoutEditorCtrl1
+ //
+ this.webLayoutEditorCtrl1.AutoScroll = true;
+ this.webLayoutEditorCtrl1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.webLayoutEditorCtrl1.Location = new System.Drawing.Point(0, 0);
+ this.webLayoutEditorCtrl1.Name = "webLayoutEditorCtrl1";
+ this.webLayoutEditorCtrl1.Size = new System.Drawing.Size(677, 520);
+ this.webLayoutEditorCtrl1.TabIndex = 0;
+ //
+ // WebLayoutEditor
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.Name = "WebLayoutEditor";
+ this.panelBody.ResumeLayout(false);
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private Maestro.Editors.WebLayout.WebLayoutEditorCtrl webLayoutEditorCtrl1;
+
+ }
+}
Added: sandbox/maestro-2.5/Maestro.Base/Editor/WebLayoutEditor.cs
===================================================================
--- sandbox/maestro-2.5/Maestro.Base/Editor/WebLayoutEditor.cs (rev 0)
+++ sandbox/maestro-2.5/Maestro.Base/Editor/WebLayoutEditor.cs 2010-05-13 11:53:04 UTC (rev 4868)
@@ -0,0 +1,37 @@
+#region Disclaimer / License
+// Copyright (C) 2010, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+//
+#endregion
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Drawing;
+using System.Data;
+using System.Text;
+using System.Windows.Forms;
+
+namespace Maestro.Base.Editor
+{
+ public partial class WebLayoutEditor : EditorContentBase
+ {
+ public WebLayoutEditor()
+ {
+ InitializeComponent();
+ }
+ }
+}
Added: sandbox/maestro-2.5/Maestro.Base/Editor/WebLayoutEditor.resx
===================================================================
--- sandbox/maestro-2.5/Maestro.Base/Editor/WebLayoutEditor.resx (rev 0)
+++ sandbox/maestro-2.5/Maestro.Base/Editor/WebLayoutEditor.resx 2010-05-13 11:53:04 UTC (rev 4868)
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : 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">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <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">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <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" 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">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+</root>
\ No newline at end of file
Added: sandbox/maestro-2.5/Maestro.Base/Editor/XmlEditor.Designer.cs
===================================================================
--- sandbox/maestro-2.5/Maestro.Base/Editor/XmlEditor.Designer.cs (rev 0)
+++ sandbox/maestro-2.5/Maestro.Base/Editor/XmlEditor.Designer.cs 2010-05-13 11:53:04 UTC (rev 4868)
@@ -0,0 +1,45 @@
+namespace Maestro.Base.Editor
+{
+ partial class XmlEditor
+ {
+ /// <summary>
+ /// Required designer variable.
+ /// </summary>
+ private System.ComponentModel.IContainer components = null;
+
+ /// <summary>
+ /// Clean up any resources being used.
+ /// </summary>
+ /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Component Designer generated code
+
+ /// <summary>
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ /// </summary>
+ private void InitializeComponent()
+ {
+ this.SuspendLayout();
+ //
+ // XmlEditor
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.Name = "XmlEditor";
+ this.Size = new System.Drawing.Size(584, 464);
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+ }
+}
Added: sandbox/maestro-2.5/Maestro.Base/Editor/XmlEditor.cs
===================================================================
--- sandbox/maestro-2.5/Maestro.Base/Editor/XmlEditor.cs (rev 0)
+++ sandbox/maestro-2.5/Maestro.Base/Editor/XmlEditor.cs 2010-05-13 11:53:04 UTC (rev 4868)
@@ -0,0 +1,65 @@
+#region Disclaimer / License
+// Copyright (C) 2010, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+//
+#endregion
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Drawing;
+using System.Data;
+using System.Text;
+using System.Windows.Forms;
+using Maestro.Editors.Generic;
+using System.IO;
+using OSGeo.MapGuide.MaestroAPI.Resource;
+
+namespace Maestro.Base.Editor
+{
+ public partial class XmlEditor : EditorContentBase
+ {
+ //We have to do it this way because VS is stupid and can't detect
+ //the ICSharpCode.TextEditor dependency in the form designer
+
+ private XmlEditorCtrl _editor;
+
+ public XmlEditor()
+ {
+ InitializeComponent();
+ _editor = new XmlEditorCtrl();
+ _editor.Dock = DockStyle.Fill;
+ panelBody.Controls.Add(_editor);
+ }
+
+ protected override void Bind(OSGeo.MapGuide.MaestroAPI.Resource.IResource value)
+ {
+ var stream = value.CurrentConnection.ResourceService.SerializeObject(value);
+ using (var reader = new StreamReader(stream))
+ {
+ _editor.XmlContent = reader.ReadToEnd();
+ }
+
+ this.Title = "XML Editor: " + ResourceIdentifier.GetName(value.ResourceID); //LOCALIZE
+ }
+
+ public string XmlContent
+ {
+ get { return _editor.XmlContent; }
+ set { _editor.XmlContent = value; }
+ }
+ }
+}
Added: sandbox/maestro-2.5/Maestro.Base/Editor/XmlEditor.resx
===================================================================
--- sandbox/maestro-2.5/Maestro.Base/Editor/XmlEditor.resx (rev 0)
+++ sandbox/maestro-2.5/Maestro.Base/Editor/XmlEditor.resx 2010-05-13 11:53:04 UTC (rev 4868)
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : 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">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <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">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <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" 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">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+</root>
\ No newline at end of file
Modified: sandbox/maestro-2.5/Maestro.Base/Events/EventWatcher.cs
===================================================================
--- sandbox/maestro-2.5/Maestro.Base/Events/EventWatcher.cs 2010-05-13 07:49:03 UTC (rev 4867)
+++ sandbox/maestro-2.5/Maestro.Base/Events/EventWatcher.cs 2010-05-13 11:53:04 UTC (rev 4868)
@@ -43,15 +43,15 @@
Debug.Assert(wb.ActiveSiteExplorer != null);
Debug.Assert(wb.ActiveSiteExplorer.ConnectionName == name);
- wb.ActiveSiteExplorer = null;
+
}
static void OnConnectionAdded(object sender, string name)
{
var exp = new SiteExplorer(name);
var wb = Workbench.Instance;
- wb.ShowContent(exp, ViewRegion.Left);
- wb.ActiveSiteExplorer = exp;
+ wb.ShowContent(exp);
+
}
}
}
Modified: sandbox/maestro-2.5/Maestro.Base/IViewContent.cs
===================================================================
--- sandbox/maestro-2.5/Maestro.Base/IViewContent.cs 2010-05-13 07:49:03 UTC (rev 4867)
+++ sandbox/maestro-2.5/Maestro.Base/IViewContent.cs 2010-05-13 11:53:04 UTC (rev 4868)
@@ -50,15 +50,35 @@
/// </summary>
bool AllowUserClose { get; }
/// <summary>
+ /// Makes this content active
+ /// </summary>
+ void Activate();
+ /// <summary>
+ /// Hides this view content. Can only be called when
+ /// </summary>
+ void Hide();
+ /// <summary>
/// Closes the view. This raises the <see cref="ViewContentClosing"/> event
/// </summary>
/// <returns></returns>
void Close();
/// <summary>
+ /// Fired when the view is activating
+ /// </summary>
+ event EventHandler ViewContentActivating;
+ /// <summary>
/// Fired when the view has been closed internally
/// </summary>
event EventHandler ViewContentClosing;
/// <summary>
+ /// Fired when the view is going to hide
+ /// </summary>
+ event EventHandler ViewContentHiding;
+ /// <summary>
+ /// Fired when the view, which was hidden is now being shown
+ /// </summary>
+ event EventHandler ViewContentShowing;
+ /// <summary>
/// Displays an exception message
/// </summary>
/// <param name="ex">The exception object</param>
@@ -89,6 +109,14 @@
/// <param name="args">The template values</param>
/// <returns>true if confirmed, false otherwise</returns>
bool ConfirmFormatted(string title, string format, params string[] args);
+ /// <summary>
+ /// Indicates whether this view is attached to a workbench
+ /// </summary>
+ bool IsAttached { get; }
+ /// <summary>
+ /// Indicates the default region this view content will be put in
+ /// </summary>
+ ViewRegion DefaultRegion { get; }
}
/// <summary>
Modified: sandbox/maestro-2.5/Maestro.Base/Maestro.Base.addin
===================================================================
--- sandbox/maestro-2.5/Maestro.Base/Maestro.Base.addin 2010-05-13 07:49:03 UTC (rev 4867)
+++ sandbox/maestro-2.5/Maestro.Base/Maestro.Base.addin 2010-05-13 11:53:04 UTC (rev 4868)
@@ -54,6 +54,15 @@
icon="application_task"
class="Maestro.Base.Commands.OptionsCommand"/>
</MenuItem>
+ <MenuItem id="Menu_View"
+ type="Menu"
+ label="${res:Menu_View}">
+ <MenuItem id="Menu_View_MessageLog"
+ icon="reports_stack"
+ label="${res:Menu_View_MessageLog}"
+ type="CheckBox"
+ class="Maestro.Base.Commands.Toggle.ToggleMessagesCommand" />
+ </MenuItem>
<MenuItem id="Menu_Help"
type="Menu"
label="${res:Menu_Help}">
@@ -73,7 +82,14 @@
<Class id="ServerConnectionManager" class="Maestro.Base.Services.ServerConnectionManager" />
<Class id="UrlLauncher" class="Maestro.Base.Services.UrlLauncher" />
<Class id="OpenResourceManager" class="Maestro.Base.Services.OpenResourceManager" />
+ <Class id="ViewContentManager" class="Maestro.Base.Services.ViewContentManager" />
+ <Class id="NewItemTemplateService" class="Maestro.Base.Services.NewItemTemplateService" />
</Path>
+
+ <!-- Singleton view content -->
+ <Path name="/Maestro/Shell/SingleViewContent">
+ <Class id="MessageViewer" class="Maestro.Base.UI.MessageViewer" />
+ </Path>
<!-- Toolbar Definition -->
<Path name="/Maestro/Shell/Toolbars/Main">
Modified: sandbox/maestro-2.5/Maestro.Base/Maestro.Base.csproj
===================================================================
--- sandbox/maestro-2.5/Maestro.Base/Maestro.Base.csproj 2010-05-13 07:49:03 UTC (rev 4867)
+++ sandbox/maestro-2.5/Maestro.Base/Maestro.Base.csproj 2010-05-13 11:53:04 UTC (rev 4868)
@@ -31,6 +31,10 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
+ <Reference Include="Maestro.Editors, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\Maestro.Editors\obj\Debug\Maestro.Editors.dll</HintPath>
+ </Reference>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Drawing" />
@@ -53,10 +57,31 @@
<Compile Include="Commands\SaveResourceAsCommand.cs" />
<Compile Include="Commands\SaveResourceCommand.cs" />
<Compile Include="Commands\SiteExplorer\DisconnectCommand.cs" />
+ <Compile Include="Commands\SiteExplorer\OpenResourceCommand.cs" />
<Compile Include="Commands\SiteExplorer\RefreshCommand.cs" />
<Compile Include="Commands\StartupCommand.cs" />
+ <Compile Include="Commands\Toggle\ToggleMessagesCommand.cs" />
<Compile Include="Commands\ValidateResourceCommand.cs" />
<Compile Include="Commands\XmlEditCommand.cs" />
+ <Compile Include="Editor\EditorContentBase.cs">
+ <SubType>UserControl</SubType>
+ </Compile>
+ <Compile Include="Editor\EditorContentBase.Designer.cs">
+ <DependentUpon>EditorContentBase.cs</DependentUpon>
+ </Compile>
+ <Compile Include="Editor\IEditorViewContent.cs" />
+ <Compile Include="Editor\WebLayoutEditor.cs">
+ <SubType>UserControl</SubType>
+ </Compile>
+ <Compile Include="Editor\WebLayoutEditor.Designer.cs">
+ <DependentUpon>WebLayoutEditor.cs</DependentUpon>
+ </Compile>
+ <Compile Include="Editor\XmlEditor.cs">
+ <SubType>UserControl</SubType>
+ </Compile>
+ <Compile Include="Editor\XmlEditor.Designer.cs">
+ <DependentUpon>XmlEditor.cs</DependentUpon>
+ </Compile>
<Compile Include="Events\EventWatcher.cs" />
<Compile Include="ISubView.cs" />
<Compile Include="IViewContent.cs" />
@@ -66,11 +91,13 @@
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
+ <Compile Include="Services\NewItemTemplateService.cs" />
<Compile Include="Services\OpenResourceManager.cs" />
<Compile Include="Services\ServerConnectionManager.cs" />
<Compile Include="Services\ServiceBase.cs" />
<Compile Include="Services\ServiceRegistry.cs" />
<Compile Include="Services\UrlLauncher.cs" />
+ <Compile Include="Services\ViewContentManager.cs" />
<Compile Include="UI\AboutDialog.cs">
<SubType>Form</SubType>
</Compile>
@@ -94,6 +121,12 @@
<Compile Include="UI\NewResourceDialog.Designer.cs">
<DependentUpon>NewResourceDialog.cs</DependentUpon>
</Compile>
+ <Compile Include="UI\SingletonViewContent.cs">
+ <SubType>UserControl</SubType>
+ </Compile>
+ <Compile Include="UI\SingletonViewContent.Designer.cs">
+ <DependentUpon>SingletonViewContent.cs</DependentUpon>
+ </Compile>
<Compile Include="UI\SiteExplorer.cs">
<SubType>UserControl</SubType>
</Compile>
@@ -123,6 +156,7 @@
</ItemGroup>
<ItemGroup>
<Content Include="Maestro.Base.addin" />
+ <None Include="Resources\reports-stack.png" />
<None Include="Resources\cross-small.png" />
<None Include="Resources\tick.png" />
<None Include="Resources\clock.png" />
@@ -152,6 +186,15 @@
<None Include="Resources\MapGuide Maestro.ico" />
</ItemGroup>
<ItemGroup>
+ <EmbeddedResource Include="Editor\EditorContentBase.resx">
+ <DependentUpon>EditorContentBase.cs</DependentUpon>
+ </EmbeddedResource>
+ <EmbeddedResource Include="Editor\WebLayoutEditor.resx">
+ <DependentUpon>WebLayoutEditor.cs</DependentUpon>
+ </EmbeddedResource>
+ <EmbeddedResource Include="Editor\XmlEditor.resx">
+ <DependentUpon>XmlEditor.cs</DependentUpon>
+ </EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
@@ -207,11 +250,18 @@
<Name>ICSharpCode.Core</Name>
<Private>False</Private>
</ProjectReference>
+ <ProjectReference Include="..\Thirdparty\SharpDevelop\ICSharpCode.TextEditor\ICSharpCode.TextEditor.csproj">
+ <Project>{2D18BE89-D210-49EB-A9DD-2246FBB3DF6D}</Project>
+ <Name>ICSharpCode.TextEditor</Name>
+ </ProjectReference>
<ProjectReference Include="..\Thirdparty\TreeViewAdv\Aga.Controls\Aga.Controls.csproj">
<Project>{E73BB233-D88B-44A7-A98F-D71EE158381D}</Project>
<Name>Aga.Controls</Name>
</ProjectReference>
</ItemGroup>
+ <ItemGroup>
+ <Folder Include="Preferences\" />
+ </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: sandbox/maestro-2.5/Maestro.Base/Properties/Resources.Designer.cs
===================================================================
--- sandbox/maestro-2.5/Maestro.Base/Properties/Resources.Designer.cs 2010-05-13 07:49:03 UTC (rev 4867)
+++ sandbox/maestro-2.5/Maestro.Base/Properties/Resources.Designer.cs 2010-05-13 11:53:04 UTC (rev 4868)
@@ -237,6 +237,33 @@
}
}
+ /// <summary>
+ /// Looks up a localized string similar to Singleton view content cannot be closed by users. The AllowUserClose property must return false.
+ /// </summary>
+ internal static string Error_Closeable_Singleton_Content {
+ get {
+ return ResourceManager.GetString("Error_Closeable_Singleton_Content", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to The specified view content type is not registered in any addin files: {0}.
+ /// </summary>
+ internal static string Error_ViewContent_Not_Registered {
+ get {
+ return ResourceManager.GetString("Error_ViewContent_Not_Registered", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to The specified view content type is not a singleton: {0}.
+ /// </summary>
+ internal static string Error_ViewContent_Type_Not_Singleton {
+ get {
+ return ResourceManager.GetString("Error_ViewContent_Type_Not_Singleton", resourceCulture);
+ }
+ }
+
internal static System.Drawing.Bitmap loading {
get {
object obj = ResourceManager.GetObject("loading", resourceCulture);
@@ -244,6 +271,15 @@
}
}
+ /// <summary>
+ /// Looks up a localized string similar to Message Log saved to {0}.
+ /// </summary>
+ internal static string Log_Saved {
+ get {
+ return ResourceManager.GetString("Log_Saved", resourceCulture);
+ }
+ }
+
internal static System.Drawing.Icon MapGuide_Maestro {
get {
object obj = ResourceManager.GetObject("MapGuide_Maestro", resourceCulture);
@@ -377,6 +413,24 @@
}
}
+ /// <summary>
+ /// Looks up a localized string similar to View.
+ /// </summary>
+ internal static string Menu_View {
+ get {
+ return ResourceManager.GetString("Menu_View", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Message Log.
+ /// </summary>
+ internal static string Menu_View_MessageLog {
+ get {
+ return ResourceManager.GetString("Menu_View_MessageLog", resourceCulture);
+ }
+ }
+
internal static System.Drawing.Bitmap navigation {
get {
object obj = ResourceManager.GetObject("navigation", resourceCulture);
@@ -426,6 +480,13 @@
}
}
+ internal static System.Drawing.Bitmap reports_stack {
+ get {
+ object obj = ResourceManager.GetObject("reports_stack", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
internal static System.Drawing.Bitmap scissors_blue {
get {
object obj = ResourceManager.GetObject("scissors_blue", resourceCulture);
@@ -468,6 +529,15 @@
}
/// <summary>
+ /// Looks up a localized string similar to Initialized: View Content Manager.
+ /// </summary>
+ internal static string Service_Init_ViewContent_Manager {
+ get {
+ return ResourceManager.GetString("Service_Init_ViewContent_Manager", resourceCulture);
+ }
+ }
+
+ /// <summary>
/// Looks up a localized string similar to Disconnect.
/// </summary>
internal static string SiteExplorer_Disconnect {
Modified: sandbox/maestro-2.5/Maestro.Base/Properties/Resources.resx
===================================================================
--- sandbox/maestro-2.5/Maestro.Base/Properties/Resources.resx 2010-05-13 07:49:03 UTC (rev 4867)
+++ sandbox/maestro-2.5/Maestro.Base/Properties/Resources.resx 2010-05-13 11:53:04 UTC (rev 4868)
@@ -283,4 +283,28 @@
<data name="cross_small" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\cross-small.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
+ <data name="Log_Saved" xml:space="preserve">
+ <value>Message Log saved to {0}</value>
+ </data>
+ <data name="Menu_View_MessageLog" xml:space="preserve">
+ <value>Message Log</value>
+ </data>
+ <data name="reports_stack" type="System.Resources.ResXFileRef, System.Windows.Forms">
+ <value>..\Resources\reports-stack.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+ </data>
+ <data name="Menu_View" xml:space="preserve">
+ <value>View</value>
+ </data>
+ <data name="Service_Init_ViewContent_Manager" xml:space="preserve">
+ <value>Initialized: View Content Manager</value>
+ </data>
+ <data name="Error_Closeable_Singleton_Content" xml:space="preserve">
+ <value>Singleton view content cannot be closed by users. The AllowUserClose property must return false</value>
+ </data>
+ <data name="Error_ViewContent_Not_Registered" xml:space="preserve">
+ <value>The specified view content type is not registered in any addin files: {0}</value>
+ </data>
+ <data name="Error_ViewContent_Type_Not_Singleton" xml:space="preserve">
+ <value>The specified view content type is not a singleton: {0}</value>
+ </data>
</root>
\ No newline at end of file
Added: sandbox/maestro-2.5/Maestro.Base/Resources/reports-stack.png
===================================================================
(Binary files differ)
Property changes on: sandbox/maestro-2.5/Maestro.Base/Resources/reports-stack.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: sandbox/maestro-2.5/Maestro.Base/Services/NewItemTemplateService.cs
===================================================================
--- sandbox/maestro-2.5/Maestro.Base/Services/NewItemTemplateService.cs (rev 0)
+++ sandbox/maestro-2.5/Maestro.Base/Services/NewItemTemplateService.cs 2010-05-13 11:53:04 UTC (rev 4868)
@@ -0,0 +1,60 @@
+#region Disclaimer / License
+// Copyright (C) 2010, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+//
+#endregion
+using System;
+using System.Collections.Generic;
+using System.Text;
+using ICSharpCode.Core;
+
+namespace Maestro.Base.Services
+{
+ public class ItemTemplate
+ {
+ public string Name { get; set; }
+
+ public string Description { get; set; }
+
+ public string Category { get; set; }
+
+ public string ResourceType { get; set; }
+ }
+
+ public class DefaultItemTemplate : ItemTemplate { }
+
+ public class UserItemTemplate : ItemTemplate { }
+
+ public class NewItemTemplateService : ServiceBase
+ {
+ public override void Initialize()
+ {
+ base.Initialize();
+ LoggingService.Info("Initialized: New Item Template Service"); //LOCALIZE
+ }
+
+ public string[] GetCategories()
+ {
+ return new string[0];
+ }
+
+ public ItemTemplate[] GetItemTemplates(string category)
+ {
+ return new ItemTemplate[0];
+ }
+ }
+}
Modified: sandbox/maestro-2.5/Maestro.Base/Services/UrlLauncher.cs
===================================================================
--- sandbox/maestro-2.5/Maestro.Base/Services/UrlLauncher.cs 2010-05-13 07:49:03 UTC (rev 4867)
+++ sandbox/maestro-2.5/Maestro.Base/Services/UrlLauncher.cs 2010-05-13 11:53:04 UTC (rev 4868)
@@ -34,23 +34,32 @@
LoggingService.Info(Properties.Resources.Service_Init_Url_Launcher);
}
+ /// <summary>
+ /// Opens the specified url using the system default web browser
+ /// </summary>
+ /// <param name="url">The url to open</param>
public void OpenUrl(string url)
{
- OpenUrl(url, false);
+ Process.Start(url);
}
- public void OpenUrl(string url, bool useBuiltInBrowser)
+ /// <summary>
+ /// Opens the specified url using the embedded web browser
+ /// </summary>
+ /// <param name="url">the url to open</param>
+ /// <param name="title">The title for the embedded browser. Does nothing if <see cref="useBuiltInBrowser"/> is false</param>
+ /// <param name="locked">If true, the navigation toolbar will be disabled</param>
+ public void OpenUrlEmbedded(string url, string title, bool locked)
{
- if (useBuiltInBrowser)
+ var mgr = ServiceRegistry.GetService<ViewContentManager>();
+ var browser = mgr.OpenContent<EmbeddedWebBrowser>(ViewRegion.Document);
+ if (!string.IsNullOrEmpty(title))
{
- var browser = new EmbeddedWebBrowser(url, false);
- var wb = Workbench.Instance;
- wb.ShowContent(browser, ViewRegion.Document);
+ browser.Title = title;
+ browser.Description = title;
}
- else
- {
- Process.Start(url);
- }
+ browser.IsLockedDown = locked;
+ browser.NavigateToUrl(url);
}
}
}
Added: sandbox/maestro-2.5/Maestro.Base/Services/ViewContentManager.cs
===================================================================
--- sandbox/maestro-2.5/Maestro.Base/Services/ViewContentManager.cs (rev 0)
+++ sandbox/maestro-2.5/Maestro.Base/Services/ViewContentManager.cs 2010-05-13 11:53:04 UTC (rev 4868)
@@ -0,0 +1,150 @@
+#region Disclaimer / License
+// Copyright (C) 2010, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+//
+#endregion
+using System;
+using System.Collections.Generic;
+using System.Text;
+using ICSharpCode.Core;
+using Maestro.Base.UI;
+
+namespace Maestro.Base.Services
+{
+ public class ViewContentManager : ServiceBase
+ {
+ private Dictionary<string, Type> _singletonViewContentTypes;
+ private List<IViewContent> _singletonInstances;
+
+ public event EventHandler ViewHidden;
+
+ public override void Initialize()
+ {
+ base.Initialize();
+ _singletonInstances = new List<IViewContent>();
+ _singletonViewContentTypes = new Dictionary<string, Type>();
+
+ List<IViewContent> views = AddInTree.BuildItems<IViewContent>("/Maestro/Shell/SingleViewContent", null);
+ _singletonInstances.AddRange(views);
+
+ foreach (var v in views)
+ {
+ var type = v.GetType();
+ _singletonViewContentTypes.Add(type.Name, type);
+ }
+
+ LoggingService.Info(Properties.Resources.Service_Init_ViewContent_Manager);
+ }
+
+ public bool IsCreated<T>() where T : IViewContent
+ {
+ var type = typeof(T);
+ if (_singletonViewContentTypes.ContainsKey(type.Name))
+ {
+ foreach (var cnt in _singletonInstances)
+ {
+ if (type.IsAssignableFrom(cnt.GetType()))
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+ else
+ {
+ throw new InvalidOperationException(string.Format(Properties.Resources.Error_ViewContent_Type_Not_Singleton, type.Name));
+ }
+ }
+
+ public void HideContent<T>() where T : IViewContent
+ {
+ var type = typeof(T);
+ if (_singletonViewContentTypes.ContainsKey(type.Name))
+ {
+ foreach (var cnt in _singletonInstances)
+ {
+ if (type.IsAssignableFrom(cnt.GetType()))
+ {
+ cnt.Hide();
+ var handler = this.ViewHidden;
+ if (handler != null)
+ handler(this, EventArgs.Empty);
+ return;
+ }
+ }
+ }
+ else
+ {
+ throw new InvalidOperationException(string.Format(Properties.Resources.Error_ViewContent_Type_Not_Singleton, type.Name));
+ }
+ }
+
+ public void ShowContent<T>() where T : IViewContent
+ {
+ var type = typeof(T);
+ if (_singletonViewContentTypes.ContainsKey(type.Name))
+ {
+ foreach (var cnt in _singletonInstances)
+ {
+ if (type.IsAssignableFrom(cnt.GetType()))
+ {
+ if (!cnt.IsAttached)
+ Workbench.Instance.ShowContent(cnt);
+ cnt.Activate();
+ return;
+ }
+ }
+ }
+ else
+ {
+ throw new InvalidOperationException(string.Format(Properties.Resources.Error_ViewContent_Type_Not_Singleton, type.Name));
+ }
+ }
+
+ public T OpenContent<T>(ViewRegion region) where T : IViewContent
+ {
+ return OpenContent<T>(null, null, region);
+ }
+
+ public T OpenContent<T>(string title, string description, ViewRegion region) where T : IViewContent
+ {
+ var type = typeof(T);
+ var wb = Workbench.Instance;
+ if (_singletonViewContentTypes.ContainsKey(type.Name))
+ {
+ foreach (var cnt in _singletonInstances)
+ {
+ if (type.IsAssignableFrom(cnt.GetType()))
+ {
+ cnt.Activate();
+ return (T)cnt;
+ }
+ }
+ }
+
+ T obj = (T)Activator.CreateInstance(type, true);
+ SingletonViewContent svc = obj as SingletonViewContent;
+ if (svc != null)
+ throw new InvalidOperationException(string.Format(Properties.Resources.Error_ViewContent_Not_Registered, type.Name));
+
+ obj.Title = title;
+ obj.Description = description;
+ wb.ShowContent(obj);
+ return obj;
+ }
+ }
+}
Modified: sandbox/maestro-2.5/Maestro.Base/TabFactory.cs
===================================================================
--- sandbox/maestro-2.5/Maestro.Base/TabFactory.cs 2010-05-13 07:49:03 UTC (rev 4867)
+++ sandbox/maestro-2.5/Maestro.Base/TabFactory.cs 2010-05-13 11:53:04 UTC (rev 4868)
@@ -24,25 +24,81 @@
namespace Maestro.Base
{
+ internal class HiddenTab
+ {
+ public TabControl Parent { get; set; }
+ public TabPage Tab { get; set; }
+ }
+
internal static class TabFactory
{
- const string SPACE_HACK = ""; //HACK: Give enough space for a close button to be drawn
+ private static List<HiddenTab> _hiddenTabs = new List<HiddenTab>();
internal static TabPage CreateTab(IViewContent content, string imgKey)
{
TabPage page = new TabPage();
page.ImageKey = imgKey;
- page.Text = content.Title + SPACE_HACK;
+ page.Text = content.Title;
page.ToolTipText = content.Description;
- page.Tag = content.AllowUserClose;
+ page.Tag = content;
content.TitleChanged += (sender, e) =>
{
- page.Text = content.Title + SPACE_HACK; //HACK: Give enough space for a close button to be drawn
+ page.Text = content.Title;
};
content.DescriptionChanged += (sender, e) =>
{
page.ToolTipText = content.Description;
};
+ if (content.AllowUserClose)
+ {
+ content.ViewContentClosing += (sender, e) =>
+ {
+ //Remove itself from the tab control
+ var tabs = page.Parent as TabControl;
+ if (tabs != null && tabs.TabPages.Contains(page))
+ {
+ tabs.TabPages.Remove(page);
+ }
+ };
+ }
+ else
+ {
+ content.ViewContentActivating += (sender, e) =>
+ {
+ //Find matching hidden tab entry, and restore
+ HiddenTab hiddenTab = null;
+ foreach (var htab in _hiddenTabs)
+ {
+ if (htab.Tab == page)
+ {
+ hiddenTab = htab;
+ }
+ }
+ if (hiddenTab != null)
+ {
+ hiddenTab.Parent.TabPages.Add(page);
+ hiddenTab.Parent.SelectedTab = page;
+ _hiddenTabs.Remove(hiddenTab);
+ }
+ else //Wasn't hidden in the first place
+ {
+ var tabs = page.Parent as TabControl;
+ if (tabs != null)
+ tabs.SelectedTab = page;
+ }
+ };
+ content.ViewContentHiding += (sender, e) =>
+ {
+ //Store in hidden tabs collection
+ var tabs = page.Parent as TabControl;
+ if (tabs != null && tabs.TabPages.Contains(page))
+ {
+ var htab = new HiddenTab() { Parent = tabs, Tab = page };
+ _hiddenTabs.Add(htab);
+ htab.Parent.TabPages.Remove(page);
+ }
+ };
+ }
content.ContentControl.Dock = DockStyle.Fill;
page.Controls.Add(content.ContentControl);
Modified: sandbox/maestro-2.5/Maestro.Base/UI/EmbeddedWebBrowser.cs
===================================================================
--- sandbox/maestro-2.5/Maestro.Base/UI/EmbeddedWebBrowser.cs 2010-05-13 07:49:03 UTC (rev 4867)
+++ sandbox/maestro-2.5/Maestro.Base/UI/EmbeddedWebBrowser.cs 2010-05-13 11:53:04 UTC (rev 4868)
@@ -31,10 +31,14 @@
{
public partial class EmbeddedWebBrowser : ViewContentBase, IWebBrowserView
{
+ /// <summary>
+ /// Internal use only. Do not invoke directly. Use <see cref="ViewContentManager"/> for that
+ /// </summary>
public EmbeddedWebBrowser()
{
InitializeComponent();
this.Title = Properties.Resources.Content_WebBrowser;
+ _presenter = new WebBrowserPresenter(this);
}
private WebBrowserPresenter _presenter;
@@ -51,7 +55,6 @@
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
- _presenter = new WebBrowserPresenter(this);
if (!string.IsNullOrEmpty(_initUrl))
{
txtUrl.Text = _initUrl;
@@ -59,6 +62,12 @@
}
}
+ public void NavigateToUrl(string url)
+ {
+ txtUrl.Text = url;
+ _presenter.NavigateToUrl(url);
+ }
+
private string _initUrl = "";
public string Url
@@ -66,16 +75,6 @@
get { return txtUrl.Text; }
}
- public EmbeddedWebBrowser(string initialUrl)
- : this(initialUrl, false)
- { }
-
- public EmbeddedWebBrowser(string initialUrl, bool locked) : this()
- {
- _initUrl = initialUrl;
- this.IsLockedDown = locked;
- }
-
private void btnBack_Click(object sender, EventArgs e)
{
var handler = this.GoBack;
Modified: sandbox/maestro-2.5/Maestro.Base/UI/ISiteExplorer.cs
===================================================================
--- sandbox/maestro-2.5/Maestro.Base/UI/ISiteExplorer.cs 2010-05-13 07:49:03 UTC (rev 4867)
+++ sandbox/maestro-2.5/Maestro.Base/UI/ISiteExplorer.cs 2010-05-13 11:53:04 UTC (rev 4868)
@@ -23,8 +23,19 @@
namespace Maestro.Base.UI
{
- public interface ISiteExplorer
+ public interface ISiteExplorer : IViewContent
{
string ConnectionName { get; }
+
+ /// <summary>
+ /// Refreshes the contents of entire repository
+ /// </summary>
+ void Refresh();
+
+ /// <summary>
+ /// Refreshes the contents from the specified folder id
+ /// </summary>
+ /// <param name="folderID"></param>
+ void Refresh(string folderID);
}
}
Modified: sandbox/maestro-2.5/Maestro.Base/UI/MessageViewer.Designer.cs
===================================================================
--- sandbox/maestro-2.5/Maestro.Base/UI/MessageViewer.Designer.cs 2010-05-13 07:49:03 UTC (rev 4867)
+++ sandbox/maestro-2.5/Maestro.Base/UI/MessageViewer.Designer.cs 2010-05-13 11:53:04 UTC (rev 4868)
@@ -31,9 +31,8 @@
this.toolStrip1 = new System.Windows.Forms.ToolStrip();
this.btnSave = new System.Windows.Forms.ToolStripButton();
this.btnClear = new System.Windows.Forms.ToolStripButton();
- this.grdMessages = new System.Windows.Forms.DataGridView();
+ this.txtMessages = new System.Windows.Forms.TextBox();
this.toolStrip1.SuspendLayout();
- ((System.ComponentModel.ISupportInitialize)(this.grdMessages)).BeginInit();
this.SuspendLayout();
//
// toolStrip1
@@ -54,6 +53,7 @@
this.btnSave.Name = "btnSave";
this.btnSave.Size = new System.Drawing.Size(51, 22);
this.btnSave.Text = "Save";
+ this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
//
// btnClear
//
@@ -62,30 +62,29 @@
this.btnClear.Name = "btnClear";
this.btnClear.Size = new System.Drawing.Size(54, 22);
this.btnClear.Text = "Clear";
+ this.btnClear.Click += new System.EventHandler(this.btnClear_Click);
//
- // grdMessages
+ // txtMessages
//
- this.grdMessages.AllowUserToAddRows = false;
- this.grdMessages.AllowUserToDeleteRows = false;
- this.grdMessages.Dock = System.Windows.Forms.DockStyle.Fill;
- this.grdMessages.Location = new System.Drawing.Point(0, 25);
- this.grdMessages.Name = "grdMessages";
- this.grdMessages.ReadOnly = true;
- this.grdMessages.RowHeadersVisible = false;
- this.grdMessages.Size = new System.Drawing.Size(523, 220);
- this.grdMessages.TabIndex = 1;
+ this.txtMessages.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.txtMessages.Font = new System.Drawing.Font("Consolas", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.txtMessages.Location = new System.Drawing.Point(0, 25);
+ this.txtMessages.Multiline = true;
+ this.txtMessages.Name = "txtMessages";
+ this.txtMessages.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
+ this.txtMessages.Size = new System.Drawing.Size(523, 220);
+ this.txtMessages.TabIndex = 1;
//
// MessageViewer
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.Controls.Add(this.grdMessages);
+ this.Controls.Add(this.txtMessages);
this.Controls.Add(this.toolStrip1);
this.Name = "MessageViewer";
this.Size = new System.Drawing.Size(523, 245);
this.toolStrip1.ResumeLayout(false);
this.toolStrip1.PerformLayout();
- ((System.ComponentModel.ISupportInitialize)(this.grdMessages)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
@@ -94,8 +93,8 @@
#endregion
private System.Windows.Forms.ToolStrip toolStrip1;
- private System.Windows.Forms.DataGridView grdMessages;
private System.Windows.Forms.ToolStripButton btnSave;
private System.Windows.Forms.ToolStripButton btnClear;
+ private System.Windows.Forms.TextBox txtMessages;
}
}
Modified: sandbox/maestro-2.5/Maestro.Base/UI/MessageViewer.cs
===================================================================
--- sandbox/maestro-2.5/Maestro.Base/UI/MessageViewer.cs 2010-05-13 07:49:03 UTC (rev 4867)
+++ sandbox/maestro-2.5/Maestro.Base/UI/MessageViewer.cs 2010-05-13 11:53:04 UTC (rev 4868)
@@ -25,20 +25,19 @@
using System.Text;
using System.Windows.Forms;
using ICSharpCode.Core;
+using System.IO;
namespace Maestro.Base.UI
{
- public partial class MessageViewer : ViewContentBase
+ public partial class MessageViewer : SingletonViewContent
{
- private BindingList<LogMessage> _messages;
-
+ /// <summary>
+ /// Internal use only. Do not invoke directly. Use <see cref="ViewContentManager"/> for that
+ /// </summary>
public MessageViewer()
{
InitializeComponent();
- _messages = new BindingList<LogMessage>();
- grdMessages.DataSource = _messages;
- grdMessages.Columns[1].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
- this.Title = Properties.Resources.Content_Messages;
+ this.Title = this.Description = Properties.Resources.Content_Messages;
}
protected override void OnLoad(EventArgs e)
@@ -52,14 +51,36 @@
void OnLogMessage(object sender, LogMessage msg)
{
- _messages.Add(msg);
+ if (!txtMessages.IsDisposed)
+ {
+ txtMessages.AppendText(string.Format("[{0}]: {1}", msg.LogDate.ToString("dd MMM yyyy hh:mm:ss"), msg.Message));
+ txtMessages.ScrollToCaret();
+ }
}
- public override bool AllowUserClose
+ private void btnClear_Click(object sender, EventArgs e)
{
+ txtMessages.Clear();
+ }
+
+ private void btnSave_Click(object sender, EventArgs e)
+ {
+ using (var save = new SaveFileDialog())
+ {
+ save.Filter = "*.log|*.log";
+ if (save.ShowDialog() == DialogResult.OK)
+ {
+ File.WriteAllText(save.FileName, txtMessages.Text);
+ MessageService.ShowMessage(string.Format(Properties.Resources.Log_Saved, save.FileName));
+ }
+ }
+ }
+
+ public override ViewRegion DefaultRegion
+ {
get
{
- return true;
+ return ViewRegion.Bottom;
}
}
}
Added: sandbox/maestro-2.5/Maestro.Base/UI/SingletonViewContent.Designer.cs
===================================================================
--- sandbox/maestro-2.5/Maestro.Base/UI/SingletonViewContent.Designer.cs (rev 0)
+++ sandbox/maestro-2.5/Maestro.Base/UI/SingletonViewContent.Designer.cs 2010-05-13 11:53:04 UTC (rev 4868)
@@ -0,0 +1,37 @@
+namespace Maestro.Base.UI
+{
+ partial class SingletonViewContent
+ {
+ /// <summary>
+ /// Required designer variable.
+ /// </summary>
+ private System.ComponentModel.IContainer components = null;
+
+ /// <summary>
+ /// Clean up any resources being used.
+ /// </summary>
+ /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Component Designer generated code
+
+ /// <summary>
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ /// </summary>
+ private void InitializeComponent()
+ {
+ components = new System.ComponentModel.Container();
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ }
+
+ #endregion
+ }
+}
Added: sandbox/maestro-2.5/Maestro.Base/UI/SingletonViewContent.cs
===================================================================
--- sandbox/maestro-2.5/Maestro.Base/UI/SingletonViewContent.cs (rev 0)
+++ sandbox/maestro-2.5/Maestro.Base/UI/SingletonViewContent.cs 2010-05-13 11:53:04 UTC (rev 4868)
@@ -0,0 +1,58 @@
+#region Disclaimer / License
+// Copyright (C) 2010, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+//
+#endregion
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Drawing;
+using System.Data;
+using System.Text;
+using System.Windows.Forms;
+
+namespace Maestro.Base.UI
+{
+ public partial class SingletonViewContent : ViewContentBase
+ {
+ public SingletonViewContent()
+ {
+ InitializeComponent();
+ }
+
+ public override bool AllowUserClose
+ {
+ get
+ {
+ return false;
+ }
+ }
+
+ public override void Close()
+ {
+ //Do nothing. Singletons aren't closeable
+ }
+
+ public override ViewRegion DefaultRegion
+ {
+ get
+ {
+ return ViewRegion.Left;
+ }
+ }
+ }
+}
Modified: sandbox/maestro-2.5/Maestro.Base/UI/SiteExplorer.cs
===================================================================
--- sandbox/maestro-2.5/Maestro.Base/UI/SiteExplorer.cs 2010-05-13 07:49:03 UTC (rev 4867)
+++ sandbox/maestro-2.5/Maestro.Base/UI/SiteExplorer.cs 2010-05-13 11:53:04 UTC (rev 4868)
@@ -35,7 +35,10 @@
private TreeViewAdv trvResources;
private ContextMenuStrip trvContextMenu;
- internal SiteExplorer()
+ /// <summary>
+ /// Internal use only. Do not invoke directly. Use <see cref="ViewContentManager"/> for that
+ /// </summary>
+ public SiteExplorer()
{
InitializeComponent();
}
@@ -57,6 +60,7 @@
this.Description = string.Format("{0}: {1}", Properties.Resources.Content_SiteExplorer, this.ConnectionName);
toolStrip = ToolbarService.CreateToolStrip(this, "/Maestro/Shell/SiteExplorer/Toolbar");
trvResources = new TreeViewAdv();
+ trvResources.BorderStyle = BorderStyle.FixedSingle;
trvContextMenu = MenuService.CreateContextMenu(this, "/Maestro/Shell/SiteExplorer/ContextMenu");
toolStrip.Dock = DockStyle.Top;
trvResources.Dock = DockStyle.Fill;
@@ -71,5 +75,19 @@
return false;
}
}
+
+ public override ViewRegion DefaultRegion
+ {
+ get
+ {
+ return ViewRegion.Left;
+ }
+ }
+
+
+ public void Refresh(string folderID)
+ {
+ throw new NotImplementedException();
+ }
}
}
Modified: sandbox/maestro-2.5/Maestro.Base/ViewContentBase.cs
===================================================================
--- sandbox/maestro-2.5/Maestro.Base/ViewContentBase.cs 2010-05-13 07:49:03 UTC (rev 4867)
+++ sandbox/maestro-2.5/Maestro.Base/ViewContentBase.cs 2010-05-13 11:53:04 UTC (rev 4868)
@@ -32,6 +32,7 @@
/// <summary>
/// The base class of all view content. Provides the default implementation of <see cref="IViewContent"/>
/// </summary>
+ [ToolboxItem(false)]
public partial class ViewContentBase : UserControl, IViewContent
{
public ViewContentBase()
@@ -66,7 +67,7 @@
get { return true; }
}
- public void Close()
+ public virtual void Close()
{
var handler = this.ViewContentClosing;
if (handler != null)
@@ -126,5 +127,36 @@
}
public event EventHandler DescriptionChanged;
+
+ public void Activate()
+ {
+ var handler = this.ViewContentActivating;
+ if (handler != null)
+ handler(this, EventArgs.Empty);
+ }
+
+ public event EventHandler ViewContentHiding;
+
+ public event EventHandler ViewContentShowing;
+
+ public event EventHandler ViewContentActivating;
+
+ void IViewContent.Hide()
+ {
+ var handler = this.ViewContentHiding;
+ if (handler != null)
+ handler(this, EventArgs.Empty);
+ }
+
+ public bool IsAttached
+ {
+ get;
+ internal set;
+ }
+
+ public virtual ViewRegion DefaultRegion
+ {
+ get { return ViewRegion.Document; }
+ }
}
}
Modified: sandbox/maestro-2.5/Maestro.Base/Workbench.cs
===================================================================
--- sandbox/maestro-2.5/Maestro.Base/Workbench.cs 2010-05-13 07:49:03 UTC (rev 4867)
+++ sandbox/maestro-2.5/Maestro.Base/Workbench.cs 2010-05-13 11:53:04 UTC (rev 4868)
@@ -28,6 +28,7 @@
using ICSharpCode.Core;
using ICSharpCode.Core.Services;
using Maestro.Base.UI;
+using Maestro.Base.Editor;
namespace Maestro.Base
{
@@ -90,6 +91,8 @@
contentPanel = new ZonedContainer();
contentPanel.Dock = DockStyle.Fill;
+ contentPanel.ViewActivated += new ViewContentActivateEventHandler(OnViewActivated);
+
menu = new MenuStrip();
MenuService.AddItemsToMenu(menu.Items, this, "/Maestro/Shell/MainMenu");
@@ -122,6 +125,22 @@
Application.Idle += OnApplicationIdle;
}
+ void OnViewActivated(object sender, IViewContent content)
+ {
+ //If a site explorer was activated, update our active site explorer property
+ var exp = content as ISiteExplorer;
+ if (exp != null)
+ {
+ this.ActiveSiteExplorer = exp;
+ }
+
+ var editor = content as IEditorViewContent;
+ if (editor != null)
+ {
+ this.ActiveEditor = editor;
+ }
+ }
+
private Dictionary<string, ToolStrip> _toolstrips;
private Dictionary<string, ToolbarRegion> _toolstripRegions;
@@ -263,23 +282,31 @@
public ISiteExplorer ActiveSiteExplorer
{
get;
- internal set;
+ private set;
}
+ public IEditorViewContent ActiveEditor
+ {
+ get;
+ private set;
+ }
+
/// <summary>
/// Shows the content.
/// </summary>
/// <param name="vc">The vc.</param>
- /// <param name="region">The region.</param>
- public void ShowContent(IViewContent vc, ViewRegion region)
+ internal void ShowContent(IViewContent vc)
{
- switch (region)
+ switch (vc.DefaultRegion)
{
case ViewRegion.Bottom:
case ViewRegion.Left:
case ViewRegion.Right:
case ViewRegion.Document:
- contentPanel.AddContent(vc, region);
+ contentPanel.AddContent(vc);
+ var vcb = vc as ViewContentBase;
+ if (vcb != null)
+ vcb.IsAttached = true;
break;
case ViewRegion.Floating:
throw new NotImplementedException();
Modified: sandbox/maestro-2.5/Maestro.Base/ZonedContainer.Designer.cs
===================================================================
--- sandbox/maestro-2.5/Maestro.Base/ZonedContainer.Designer.cs 2010-05-13 07:49:03 UTC (rev 4867)
+++ sandbox/maestro-2.5/Maestro.Base/ZonedContainer.Designer.cs 2010-05-13 11:53:04 UTC (rev 4868)
@@ -85,6 +85,7 @@
this.leftZone.TabIndex = 0;
this.leftZone.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.ZoneDrawItem);
this.leftZone.MouseClick += new System.Windows.Forms.MouseEventHandler(this.ZoneMouseClick);
+ this.leftZone.TabIndexChanged += new System.EventHandler(this.ZoneTabSelectedIndexChanged);
//
// leftImgList
//
@@ -151,6 +152,7 @@
this.documentTabs.TabIndex = 0;
this.documentTabs.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.ZoneDrawItem);
this.documentTabs.MouseClick += new System.Windows.Forms.MouseEventHandler(this.ZoneMouseClick);
+ this.documentTabs.TabIndexChanged += new System.EventHandler(this.ZoneTabSelectedIndexChanged);
//
// docImgList
//
@@ -173,6 +175,7 @@
this.bottomZone.TabIndex = 0;
this.bottomZone.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.ZoneDrawItem);
this.bottomZone.MouseClick += new System.Windows.Forms.MouseEventHandler(this.ZoneMouseClick);
+ this.bottomZone.TabIndexChanged += new System.EventHandler(this.ZoneTabSelectedIndexChanged);
//
// bottomImgList
//
@@ -195,6 +198,7 @@
this.rightZone.TabIndex = 0;
this.rightZone.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.ZoneDrawItem);
this.rightZone.MouseClick += new System.Windows.Forms.MouseEventHandler(this.ZoneMouseClick);
+ this.rightZone.TabIndexChanged += new System.EventHandler(this.ZoneTabSelectedIndexChanged);
//
// rightImgList
//
Modified: sandbox/maestro-2.5/Maestro.Base/ZonedContainer.cs
===================================================================
--- sandbox/maestro-2.5/Maestro.Base/ZonedContainer.cs 2010-05-13 07:49:03 UTC (rev 4867)
+++ sandbox/maestro-2.5/Maestro.Base/ZonedContainer.cs 2010-05-13 11:53:04 UTC (rev 4868)
@@ -25,9 +25,12 @@
using System.Text;
using System.Windows.Forms;
using System.Windows.Forms.VisualStyles;
+using Maestro.Base.Services;
namespace Maestro.Base
{
+ public delegate void ViewContentActivateEventHandler(object sender, IViewContent content);
+
internal partial class ZonedContainer : UserControl
{
public ZonedContainer()
@@ -35,12 +38,22 @@
InitializeComponent();
}
+ public event ViewContentActivateEventHandler ViewActivated;
+
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
CheckContainerStatus();
+
+ var mgr = ServiceRegistry.GetService<ViewContentManager>();
+ mgr.ViewHidden += new EventHandler(OnViewHidden);
}
+ void OnViewHidden(object sender, EventArgs e)
+ {
+ CheckContainerStatus();
+ }
+
private void CheckContainerStatus()
{
docBottomContainer.Panel2Collapsed = (bottomZone.TabPages.Count == 0);
@@ -48,11 +61,11 @@
docRightContainer.Panel2Collapsed = (rightZone.TabPages.Count == 0) ;
}
- public void AddContent(IViewContent content, ViewRegion region)
+ public void AddContent(IViewContent content)
{
TabControl zone = null;
ImageList zoneImgList = null;
- switch (region)
+ switch (content.DefaultRegion)
{
case ViewRegion.Bottom:
zone = bottomZone;
@@ -76,27 +89,15 @@
var page = TabFactory.CreateTab(content, null);
zone.TabPages.Add(page);
- zone.SelectedTab = page;
+ var idx = zone.TabPages.IndexOf(page);
+ if (zone.SelectedIndex != idx)
+ zone.SelectedIndex = idx;
+ else
+ OnViewActivated(content);
+
CheckContainerStatus();
}
- //
- // http://blog.bitsabound.com/2009/05/19/DrawingCaptionButtonsOnTabPages.aspx
- //
- private void DrawTabCloseButton(System.Windows.Forms.DrawItemEventArgs e, Rectangle rect, VisualStyleElement style, ButtonState state)
- {
- if (VisualStyleRenderer.IsSupported)
- {
- if (VisualStyleRenderer.IsElementDefined(style))
- {
- VisualStyleRenderer renderer = new VisualStyleRenderer(style);
- renderer.DrawBackground(e.Graphics, rect);
- return;
- }
- }
- ControlPaint.DrawCaptionButton(e.Graphics, rect, CaptionButton.Close, state);
- }
-
// Close button on tabs implementation
//
// http://www.dotnetspider.com/resources/29206-Custom-drawn-Close-button-TabControl.aspx
@@ -108,8 +109,10 @@
{
TabControl tab = (TabControl)sender;
//The tag specifies whether the user can manually close this tab
- bool draw = (bool)tab.TabPages[e.Index].Tag;
+ var page = tab.TabPages[e.Index];
+ bool draw = (page.Tag != null && ((IViewContent)page.Tag).AllowUserClose);
+
try
{
Rectangle r = e.Bounds;
@@ -119,7 +122,7 @@
Brush TitleBrush = new SolidBrush(Color.Black);
Font f = this.Font;
- string title = tab.TabPages[e.Index].Text;
+ string title = page.Text;
var tabRect = tab.GetTabRect(e.Index);
@@ -150,9 +153,23 @@
{
TabPage page = (TabPage)tc.TabPages[tc.SelectedIndex];
//The tag specifies whether the user can manually close this tab
- if ((bool)page.Tag)
+ if (page.Tag != null && ((IViewContent)page.Tag).AllowUserClose)
tc.TabPages.Remove(page);
}
}
+
+ private void OnViewActivated(IViewContent content)
+ {
+ var handler = this.ViewActivated;
+ if (handler != null)
+ handler(this, content);
+ }
+
+ private void ZoneTabSelectedIndexChanged(object sender, EventArgs e)
+ {
+ TabControl tabs = (TabControl)sender;
+ TabPage page = tabs.SelectedTab;
+ OnViewActivated((IViewContent)page.Tag);
+ }
}
}
Modified: sandbox/maestro-2.5/Maestro.Editors/Generic/XmlEditorCtrl.Designer.cs
===================================================================
--- sandbox/maestro-2.5/Maestro.Editors/Generic/XmlEditorCtrl.Designer.cs 2010-05-13 07:49:03 UTC (rev 4867)
+++ sandbox/maestro-2.5/Maestro.Editors/Generic/XmlEditorCtrl.Designer.cs 2010-05-13 11:53:04 UTC (rev 4868)
@@ -56,9 +56,11 @@
// txtEditor
//
this.txtEditor.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.txtEditor.IsIconBarVisible = true;
this.txtEditor.IsReadOnly = false;
this.txtEditor.Location = new System.Drawing.Point(0, 25);
this.txtEditor.Name = "txtEditor";
+ this.txtEditor.ShowInvalidLines = true;
this.txtEditor.Size = new System.Drawing.Size(565, 301);
this.txtEditor.TabIndex = 2;
//
Modified: sandbox/maestro-2.5/Maestro.Editors/Generic/XmlEditorCtrl.cs
===================================================================
--- sandbox/maestro-2.5/Maestro.Editors/Generic/XmlEditorCtrl.cs 2010-05-13 07:49:03 UTC (rev 4867)
+++ sandbox/maestro-2.5/Maestro.Editors/Generic/XmlEditorCtrl.cs 2010-05-13 11:53:04 UTC (rev 4868)
@@ -24,6 +24,7 @@
using System.Data;
using System.Text;
using System.Windows.Forms;
+using ICSharpCode.TextEditor.Document;
namespace Maestro.Editors.Generic
{
@@ -33,5 +34,11 @@
{
InitializeComponent();
}
+
+ public string XmlContent
+ {
+ get { return txtEditor.Text; }
+ set { txtEditor.Text = value; }
+ }
}
}
More information about the mapguide-commits
mailing list