[prev in list] [next in list] [prev in thread] [next in thread]
List: mapguide-commits
Subject: [mapguide-commits] r3269 - in trunk/Tools/Maestro: Maestro
From: svn_mapguide () osgeo ! org
Date: 2008-08-12 20:37:11
Message-ID: 20080812203712.008EAE00A2D () lists ! osgeo ! org
[Download RAW message or body]
Author: ksgeograf
Date: 2008-08-12 16:37:11 -0400 (Tue, 12 Aug 2008)
New Revision: 3269
Added:
trunk/Tools/Maestro/Maestro/PackageManager/AddResourceEntry.Designer.cs
trunk/Tools/Maestro/Maestro/PackageManager/AddResourceEntry.cs
trunk/Tools/Maestro/Maestro/PackageManager/AddResourceEntry.resx
trunk/Tools/Maestro/Maestro/PackageManager/EditResourceDataEntry.Designer.cs
trunk/Tools/Maestro/Maestro/PackageManager/EditResourceDataEntry.cs
trunk/Tools/Maestro/Maestro/PackageManager/EditResourceDataEntry.resx
trunk/Tools/Maestro/Maestro/PackageManager/PackageEditor.Designer.cs
trunk/Tools/Maestro/Maestro/PackageManager/PackageEditor.cs
trunk/Tools/Maestro/Maestro/PackageManager/PackageEditor.resx
Modified:
trunk/Tools/Maestro/Maestro/FormMain.cs
trunk/Tools/Maestro/Maestro/OSGeo.MapGuide.Maestro.csproj
trunk/Tools/Maestro/Maestro/Update DEBUG Environment.bat
trunk/Tools/Maestro/Maestro/Update RELEASE Environment.bat
trunk/Tools/Maestro/MaestroAPI/Generated/ResourcePackageManifest-1.0.0.cs
Log:
Changed the Update*.bat files to create folders with the correct name capitalization. \
This is required for Linux users. Added the package editor form and almost all user \
interface code. Still needs logic to update resources with references before it can \
build the final modified package.
Modified: trunk/Tools/Maestro/Maestro/FormMain.cs
===================================================================
--- trunk/Tools/Maestro/Maestro/FormMain.cs 2008-08-10 16:18:21 UTC (rev 3268)
+++ trunk/Tools/Maestro/Maestro/FormMain.cs 2008-08-12 20:37:11 UTC (rev 3269)
@@ -885,7 +885,7 @@
return;
}
- KeepAliveTimer.Enabled = true;
+ KeepAliveTimer.Enabled = true;
string editorMap = System.IO.Path.Combine(Application.StartupPath, \
"EditorMap.xml"); if (!System.IO.File.Exists(editorMap))
{
@@ -896,7 +896,7 @@
try
{
- m_editors = new \
ResourceEditorMap(System.IO.Path.Combine(Application.StartupPath, "EditorMap.xml")); \
+ m_editors = new \
ResourceEditorMap(System.IO.Path.Combine(Application.StartupPath, "EditorMap.xml")); \
} catch(Exception ex)
{
@@ -908,6 +908,7 @@
this.ResourceTree.ImageList = m_editors.SmallImageList;
this.tabItems.ImageList = m_editors.SmallImageList;
+ //TODO: This should be case insensitive for linux
string templatepath = System.IO.Path.Combine(Application.StartupPath, \
"Templates"); m_templateMenuIndex = new Hashtable();
@@ -1671,8 +1672,6 @@
return;
}
-
-
TreeNode n = ResourceTree.GetNodeAt(ResourceTree.PointToClient(new Point(e.X, \
e.Y))); if (n == null)
e.Effect = DragDropEffects.None;
@@ -2175,6 +2174,7 @@
private void modifyPackageToolStripMenuItem_Click(object sender, EventArgs \
e) {
MessageBox.Show(this, "This feature is not yet implemented", \
Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Information); + \
//PackageManager.PackageEditor.EditPackage(m_connection, this); }
}
}
Modified: trunk/Tools/Maestro/Maestro/OSGeo.MapGuide.Maestro.csproj
===================================================================
--- trunk/Tools/Maestro/Maestro/OSGeo.MapGuide.Maestro.csproj 2008-08-10 16:18:21 UTC \
(rev 3268)
+++ trunk/Tools/Maestro/Maestro/OSGeo.MapGuide.Maestro.csproj 2008-08-12 20:37:11 UTC \
(rev 3269) @@ -175,13 +175,31 @@
<Compile Include="LengthyOperation.cs">
<SubType>Form</SubType>
</Compile>
+ <Compile Include="PackageManager\AddResourceEntry.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="PackageManager\AddResourceEntry.Designer.cs">
+ <DependentUpon>AddResourceEntry.cs</DependentUpon>
+ </Compile>
<Compile Include="PackageManager\CreatePackage.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="PackageManager\CreatePackage.Designer.cs">
<DependentUpon>CreatePackage.cs</DependentUpon>
</Compile>
+ <Compile Include="PackageManager\EditResourceDataEntry.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="PackageManager\EditResourceDataEntry.Designer.cs">
+ <DependentUpon>EditResourceDataEntry.cs</DependentUpon>
+ </Compile>
<Compile Include="PackageManager\PackageBuilder.cs" />
+ <Compile Include="PackageManager\PackageEditor.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="PackageManager\PackageEditor.Designer.cs">
+ <DependentUpon>PackageEditor.cs</DependentUpon>
+ </Compile>
<Compile Include="PackageManager\PackageProgress.cs">
<SubType>Form</SubType>
</Compile>
@@ -251,10 +269,22 @@
<DependentUpon>LengthyOperation.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
+ <EmbeddedResource Include="PackageManager\AddResourceEntry.resx">
+ <SubType>Designer</SubType>
+ <DependentUpon>AddResourceEntry.cs</DependentUpon>
+ </EmbeddedResource>
<EmbeddedResource Include="PackageManager\CreatePackage.resx">
<SubType>Designer</SubType>
<DependentUpon>CreatePackage.cs</DependentUpon>
</EmbeddedResource>
+ <EmbeddedResource Include="PackageManager\EditResourceDataEntry.resx">
+ <SubType>Designer</SubType>
+ <DependentUpon>EditResourceDataEntry.cs</DependentUpon>
+ </EmbeddedResource>
+ <EmbeddedResource Include="PackageManager\PackageEditor.resx">
+ <SubType>Designer</SubType>
+ <DependentUpon>PackageEditor.cs</DependentUpon>
+ </EmbeddedResource>
<EmbeddedResource Include="PackageManager\PackageProgress.resx">
<SubType>Designer</SubType>
<DependentUpon>PackageProgress.cs</DependentUpon>
Added: trunk/Tools/Maestro/Maestro/PackageManager/AddResourceEntry.Designer.cs
===================================================================
--- trunk/Tools/Maestro/Maestro/PackageManager/AddResourceEntry.Designer.cs \
(rev 0)
+++ trunk/Tools/Maestro/Maestro/PackageManager/AddResourceEntry.Designer.cs 2008-08-12 \
20:37:11 UTC (rev 3269) @@ -0,0 +1,196 @@
+namespace OSGeo.MapGuide.Maestro.PackageManager
+{
+ partial class AddResourceEntry
+ {
+ /// <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 Windows Form 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.UseHeader = new System.Windows.Forms.CheckBox();
+ this.BrowseHeaderButton = new System.Windows.Forms.Button();
+ this.HeaderPath = new System.Windows.Forms.TextBox();
+ this.label1 = new System.Windows.Forms.Label();
+ this.ContentPath = new System.Windows.Forms.TextBox();
+ this.BrowseContentButton = new System.Windows.Forms.Button();
+ this.OKBtn = new System.Windows.Forms.Button();
+ this.CancelBtn = new System.Windows.Forms.Button();
+ this.BrowseFileDialog = new System.Windows.Forms.OpenFileDialog();
+ this.AlternateName = new System.Windows.Forms.TextBox();
+ this.UseAlternateName = new System.Windows.Forms.CheckBox();
+ this.SuspendLayout();
+ //
+ // UseHeader
+ //
+ this.UseHeader.AutoSize = true;
+ this.UseHeader.Location = new System.Drawing.Point(8, 8);
+ this.UseHeader.Name = "UseHeader";
+ this.UseHeader.Size = new System.Drawing.Size(77, 17);
+ this.UseHeader.TabIndex = 0;
+ this.UseHeader.Text = "Header file";
+ this.UseHeader.UseVisualStyleBackColor = true;
+ this.UseHeader.CheckedChanged += new \
System.EventHandler(this.UseHeader_CheckedChanged); + //
+ // BrowseHeaderButton
+ //
+ this.BrowseHeaderButton.Anchor = \
((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | \
System.Windows.Forms.AnchorStyles.Right))); + \
this.BrowseHeaderButton.Enabled = false; + \
this.BrowseHeaderButton.Location = new System.Drawing.Point(337, 8); + \
this.BrowseHeaderButton.Name = "BrowseHeaderButton"; + \
this.BrowseHeaderButton.Size = new System.Drawing.Size(24, 20); + \
this.BrowseHeaderButton.TabIndex = 1; + this.BrowseHeaderButton.Text = \
"..."; + this.BrowseHeaderButton.UseVisualStyleBackColor = true;
+ this.BrowseHeaderButton.Click += new \
System.EventHandler(this.BrowseHeaderButton_Click); + //
+ // HeaderPath
+ //
+ this.HeaderPath.Anchor = \
((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | \
System.Windows.Forms.AnchorStyles.Left) + | \
System.Windows.Forms.AnchorStyles.Right))); + this.HeaderPath.Enabled = \
false; + this.HeaderPath.Location = new System.Drawing.Point(112, 8);
+ this.HeaderPath.Name = "HeaderPath";
+ this.HeaderPath.Size = new System.Drawing.Size(225, 20);
+ this.HeaderPath.TabIndex = 2;
+ //
+ // label1
+ //
+ this.label1.AutoSize = true;
+ this.label1.Location = new System.Drawing.Point(32, 40);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(60, 13);
+ this.label1.TabIndex = 3;
+ this.label1.Text = "Content file";
+ //
+ // ContentPath
+ //
+ this.ContentPath.Anchor = \
((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | \
System.Windows.Forms.AnchorStyles.Left) + | \
System.Windows.Forms.AnchorStyles.Right))); + this.ContentPath.Location = \
new System.Drawing.Point(112, 40); + this.ContentPath.Name = \
"ContentPath"; + this.ContentPath.Size = new System.Drawing.Size(225, 20);
+ this.ContentPath.TabIndex = 4;
+ this.ContentPath.TextChanged += new \
System.EventHandler(this.ContentPath_TextChanged); + //
+ // BrowseContentButton
+ //
+ this.BrowseContentButton.Anchor = \
((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | \
System.Windows.Forms.AnchorStyles.Right))); + \
this.BrowseContentButton.Location = new System.Drawing.Point(337, 40); + \
this.BrowseContentButton.Name = "BrowseContentButton"; + \
this.BrowseContentButton.Size = new System.Drawing.Size(24, 20); + \
this.BrowseContentButton.TabIndex = 5; + this.BrowseContentButton.Text = \
"..."; + this.BrowseContentButton.UseVisualStyleBackColor = true;
+ this.BrowseContentButton.Click += new \
System.EventHandler(this.BrowseContentButton_Click); + //
+ // OKBtn
+ //
+ this.OKBtn.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
+ this.OKBtn.Location = new System.Drawing.Point(108, 104);
+ this.OKBtn.Name = "OKBtn";
+ this.OKBtn.Size = new System.Drawing.Size(75, 23);
+ this.OKBtn.TabIndex = 6;
+ this.OKBtn.Text = "OK";
+ this.OKBtn.UseVisualStyleBackColor = true;
+ this.OKBtn.Click += new System.EventHandler(this.OKBtn_Click);
+ //
+ // CancelBtn
+ //
+ this.CancelBtn.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
+ this.CancelBtn.DialogResult = System.Windows.Forms.DialogResult.Cancel;
+ this.CancelBtn.Location = new System.Drawing.Point(196, 104);
+ this.CancelBtn.Name = "CancelBtn";
+ this.CancelBtn.Size = new System.Drawing.Size(75, 23);
+ this.CancelBtn.TabIndex = 7;
+ this.CancelBtn.Text = "Cancel";
+ this.CancelBtn.UseVisualStyleBackColor = true;
+ //
+ // BrowseFileDialog
+ //
+ this.BrowseFileDialog.Filter = "All files (*.*)|*.*";
+ this.BrowseFileDialog.Title = "Select the file to use";
+ //
+ // AlternateName
+ //
+ this.AlternateName.Anchor = \
((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | \
System.Windows.Forms.AnchorStyles.Left) + | \
System.Windows.Forms.AnchorStyles.Right))); + this.AlternateName.Enabled = \
false; + this.AlternateName.Location = new System.Drawing.Point(112, 72);
+ this.AlternateName.Name = "AlternateName";
+ this.AlternateName.Size = new System.Drawing.Size(225, 20);
+ this.AlternateName.TabIndex = 9;
+ //
+ // UseAlternateName
+ //
+ this.UseAlternateName.AutoSize = true;
+ this.UseAlternateName.Location = new System.Drawing.Point(8, 72);
+ this.UseAlternateName.Name = "UseAlternateName";
+ this.UseAlternateName.Size = new System.Drawing.Size(97, 17);
+ this.UseAlternateName.TabIndex = 8;
+ this.UseAlternateName.Text = "Alternate name";
+ this.UseAlternateName.UseVisualStyleBackColor = true;
+ this.UseAlternateName.CheckedChanged += new \
System.EventHandler(this.UseAlternateName_CheckedChanged); + //
+ // AddResourceEntry
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.CancelButton = this.CancelBtn;
+ this.ClientSize = new System.Drawing.Size(371, 135);
+ this.Controls.Add(this.AlternateName);
+ this.Controls.Add(this.UseAlternateName);
+ this.Controls.Add(this.CancelBtn);
+ this.Controls.Add(this.OKBtn);
+ this.Controls.Add(this.BrowseContentButton);
+ this.Controls.Add(this.ContentPath);
+ this.Controls.Add(this.label1);
+ this.Controls.Add(this.HeaderPath);
+ this.Controls.Add(this.BrowseHeaderButton);
+ this.Controls.Add(this.UseHeader);
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
+ this.MaximizeBox = false;
+ this.MinimizeBox = false;
+ this.Name = "AddResourceEntry";
+ this.Text = "Add a resource";
+ this.Load += new System.EventHandler(this.AddResourceEntry_Load);
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.CheckBox UseHeader;
+ private System.Windows.Forms.Button BrowseHeaderButton;
+ private System.Windows.Forms.TextBox HeaderPath;
+ private System.Windows.Forms.Label label1;
+ private System.Windows.Forms.TextBox ContentPath;
+ private System.Windows.Forms.Button BrowseContentButton;
+ private System.Windows.Forms.Button OKBtn;
+ private System.Windows.Forms.Button CancelBtn;
+ private System.Windows.Forms.OpenFileDialog BrowseFileDialog;
+ private System.Windows.Forms.TextBox AlternateName;
+ private System.Windows.Forms.CheckBox UseAlternateName;
+ }
+}
\ No newline at end of file
Added: trunk/Tools/Maestro/Maestro/PackageManager/AddResourceEntry.cs
===================================================================
--- trunk/Tools/Maestro/Maestro/PackageManager/AddResourceEntry.cs \
(rev 0)
+++ trunk/Tools/Maestro/Maestro/PackageManager/AddResourceEntry.cs 2008-08-12 \
20:37:11 UTC (rev 3269) @@ -0,0 +1,91 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Text;
+using System.Windows.Forms;
+
+namespace OSGeo.MapGuide.Maestro.PackageManager
+{
+ public partial class AddResourceEntry : Form
+ {
+ public AddResourceEntry()
+ {
+ InitializeComponent();
+ }
+
+ private void UseHeader_CheckedChanged(object sender, EventArgs e)
+ {
+ HeaderPath.Enabled = BrowseHeaderButton.Enabled = UseHeader.Checked;
+ }
+
+ private void BrowseHeaderButton_Click(object sender, EventArgs e)
+ {
+ if (BrowseFileDialog.ShowDialog(this) == DialogResult.OK)
+ HeaderPath.Text = BrowseFileDialog.FileName;
+ }
+
+ private void BrowseContentButton_Click(object sender, EventArgs e)
+ {
+ if (BrowseFileDialog.ShowDialog(this) == DialogResult.OK)
+ ContentPath.Text = BrowseFileDialog.FileName;
+ }
+
+ private void OKBtn_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ if (UseAlternateName.Checked && AlternateName.Text.Trim().Length == \
0) + {
+ MessageBox.Show(this, "You must enter a alternate name, or \
remove the checkmark", Application.ProductName, MessageBoxButtons.OK, \
MessageBoxIcon.Error); + AlternateName.Focus();
+ return;
+ }
+
+ if (UseHeader.Checked && !System.IO.File.Exists(HeaderPath.Text))
+ {
+ MessageBox.Show(this, "The header file does not exist", \
Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error); + \
HeaderPath.Focus(); + return;
+ }
+
+ if (!System.IO.File.Exists(ContentPath.Text))
+ {
+ MessageBox.Show(this, "The content file does not exist", \
Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error); + \
ContentPath.Focus(); + return;
+ }
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show(this, string.Format("Failed to validate the \
filenames: {0}", ex.Message), Application.ProductName, MessageBoxButtons.OK, \
MessageBoxIcon.Error); + return;
+ }
+
+ this.DialogResult = DialogResult.OK;
+ this.Close();
+ }
+
+ public string ContentFilepath { get { return ContentPath.Text; } }
+ public string HeaderFilepath { get { return UseHeader.Checked ? \
HeaderPath.Text : null; } } + public string ResourceName { get { return \
UseAlternateName.Checked ? AlternateName.Text : \
System.IO.Path.GetFileName(ContentPath.Text); } } +
+ private void UseAlternateName_CheckedChanged(object sender, EventArgs e)
+ {
+ AlternateName.Enabled = UseAlternateName.Checked;
+ }
+
+ private void ContentPath_TextChanged(object sender, EventArgs e)
+ {
+ try { AlternateName.Text = System.IO.Path.GetFileName(ContentPath.Text); \
} + catch { }
+ }
+
+ private void AddResourceEntry_Load(object sender, EventArgs e)
+ {
+ this.Show();
+ ContentPath.Focus();
+ }
+ }
+}
\ No newline at end of file
Added: trunk/Tools/Maestro/Maestro/PackageManager/AddResourceEntry.resx
===================================================================
--- trunk/Tools/Maestro/Maestro/PackageManager/AddResourceEntry.resx \
(rev 0)
+++ trunk/Tools/Maestro/Maestro/PackageManager/AddResourceEntry.resx 2008-08-12 \
20:37:11 UTC (rev 3269) @@ -0,0 +1,123 @@
+<?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> + <metadata name="BrowseFileDialog.TrayLocation" \
type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, \
PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value>
+ </metadata>
+</root>
\ No newline at end of file
Added: trunk/Tools/Maestro/Maestro/PackageManager/EditResourceDataEntry.Designer.cs
===================================================================
--- trunk/Tools/Maestro/Maestro/PackageManager/EditResourceDataEntry.Designer.cs \
(rev 0)
+++ trunk/Tools/Maestro/Maestro/PackageManager/EditResourceDataEntry.Designer.cs 2008-08-12 \
20:37:11 UTC (rev 3269) @@ -0,0 +1,192 @@
+namespace OSGeo.MapGuide.Maestro.PackageManager
+{
+ partial class EditResourceDataEntry
+ {
+ /// <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 Windows Form 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.label1 = new System.Windows.Forms.Label();
+ this.ResourceNameBox = new System.Windows.Forms.TextBox();
+ this.label2 = new System.Windows.Forms.Label();
+ this.ContentTypeBox = new System.Windows.Forms.ComboBox();
+ this.DataTypeBox = new System.Windows.Forms.ComboBox();
+ this.label3 = new System.Windows.Forms.Label();
+ this.label4 = new System.Windows.Forms.Label();
+ this.FilenameBox = new System.Windows.Forms.TextBox();
+ this.OKBtn = new System.Windows.Forms.Button();
+ this.CancelBtn = new System.Windows.Forms.Button();
+ this.SuspendLayout();
+ //
+ // label1
+ //
+ this.label1.AutoSize = true;
+ this.label1.Location = new System.Drawing.Point(8, 8);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(35, 13);
+ this.label1.TabIndex = 0;
+ this.label1.Text = "Name";
+ //
+ // ResourceNameBox
+ //
+ this.ResourceNameBox.Anchor = \
((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | \
System.Windows.Forms.AnchorStyles.Left) + | \
System.Windows.Forms.AnchorStyles.Right))); + \
this.ResourceNameBox.Location = new System.Drawing.Point(80, 8); + \
this.ResourceNameBox.Name = "ResourceNameBox"; + this.ResourceNameBox.Size \
= new System.Drawing.Size(200, 20); + this.ResourceNameBox.TabIndex = 1;
+ this.ResourceNameBox.TextChanged += new \
System.EventHandler(this.ValidateForm); + //
+ // label2
+ //
+ this.label2.AutoSize = true;
+ this.label2.Location = new System.Drawing.Point(8, 32);
+ this.label2.Name = "label2";
+ this.label2.Size = new System.Drawing.Size(67, 13);
+ this.label2.TabIndex = 2;
+ this.label2.Text = "Content type";
+ //
+ // ContentTypeBox
+ //
+ this.ContentTypeBox.Anchor = \
((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | \
System.Windows.Forms.AnchorStyles.Left) + | \
System.Windows.Forms.AnchorStyles.Right))); + \
this.ContentTypeBox.FormattingEnabled = true; + \
this.ContentTypeBox.Items.AddRange(new object[] { + "text/xml",
+ "application/octet-stream"});
+ this.ContentTypeBox.Location = new System.Drawing.Point(80, 32);
+ this.ContentTypeBox.Name = "ContentTypeBox";
+ this.ContentTypeBox.Size = new System.Drawing.Size(200, 21);
+ this.ContentTypeBox.TabIndex = 3;
+ this.ContentTypeBox.TextChanged += new \
System.EventHandler(this.ValidateForm); + //
+ // DataTypeBox
+ //
+ this.DataTypeBox.Anchor = \
((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | \
System.Windows.Forms.AnchorStyles.Left) + | \
System.Windows.Forms.AnchorStyles.Right))); + \
this.DataTypeBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + \
this.DataTypeBox.FormattingEnabled = true; + \
this.DataTypeBox.Items.AddRange(new object[] { + "File",
+ "Stream"});
+ this.DataTypeBox.Location = new System.Drawing.Point(80, 56);
+ this.DataTypeBox.Name = "DataTypeBox";
+ this.DataTypeBox.Size = new System.Drawing.Size(200, 21);
+ this.DataTypeBox.TabIndex = 5;
+ this.DataTypeBox.SelectedIndexChanged += new \
System.EventHandler(this.ValidateForm); + this.DataTypeBox.TextChanged += \
new System.EventHandler(this.ValidateForm); + //
+ // label3
+ //
+ this.label3.AutoSize = true;
+ this.label3.Location = new System.Drawing.Point(8, 56);
+ this.label3.Name = "label3";
+ this.label3.Size = new System.Drawing.Size(53, 13);
+ this.label3.TabIndex = 4;
+ this.label3.Text = "Data type";
+ //
+ // label4
+ //
+ this.label4.AutoSize = true;
+ this.label4.Location = new System.Drawing.Point(8, 80);
+ this.label4.Name = "label4";
+ this.label4.Size = new System.Drawing.Size(49, 13);
+ this.label4.TabIndex = 6;
+ this.label4.Text = "Filename";
+ //
+ // FilenameBox
+ //
+ this.FilenameBox.Anchor = \
((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | \
System.Windows.Forms.AnchorStyles.Left) + | \
System.Windows.Forms.AnchorStyles.Right))); + this.FilenameBox.Location = \
new System.Drawing.Point(80, 80); + this.FilenameBox.Name = "FilenameBox";
+ this.FilenameBox.ReadOnly = true;
+ this.FilenameBox.Size = new System.Drawing.Size(200, 20);
+ this.FilenameBox.TabIndex = 7;
+ //
+ // OKBtn
+ //
+ this.OKBtn.Enabled = false;
+ this.OKBtn.Location = new System.Drawing.Point(64, 112);
+ this.OKBtn.Name = "OKBtn";
+ this.OKBtn.Size = new System.Drawing.Size(72, 24);
+ this.OKBtn.TabIndex = 8;
+ this.OKBtn.Text = "OK";
+ this.OKBtn.UseVisualStyleBackColor = true;
+ this.OKBtn.Click += new System.EventHandler(this.OKBtn_Click);
+ //
+ // CancelBtn
+ //
+ this.CancelBtn.DialogResult = System.Windows.Forms.DialogResult.Cancel;
+ this.CancelBtn.Location = new System.Drawing.Point(152, 112);
+ this.CancelBtn.Name = "CancelBtn";
+ this.CancelBtn.Size = new System.Drawing.Size(72, 24);
+ this.CancelBtn.TabIndex = 9;
+ this.CancelBtn.Text = "Cancel";
+ this.CancelBtn.UseVisualStyleBackColor = true;
+ //
+ // EditResourceDataEntry
+ //
+ this.AcceptButton = this.OKBtn;
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.CancelButton = this.CancelBtn;
+ this.ClientSize = new System.Drawing.Size(289, 144);
+ this.Controls.Add(this.CancelBtn);
+ this.Controls.Add(this.OKBtn);
+ this.Controls.Add(this.FilenameBox);
+ this.Controls.Add(this.label4);
+ this.Controls.Add(this.DataTypeBox);
+ this.Controls.Add(this.label3);
+ this.Controls.Add(this.ContentTypeBox);
+ this.Controls.Add(this.label2);
+ this.Controls.Add(this.ResourceNameBox);
+ this.Controls.Add(this.label1);
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
+ this.MaximizeBox = false;
+ this.MinimizeBox = false;
+ this.Name = "EditResourceDataEntry";
+ this.StartPosition = \
System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = "Edit \
resourcedata details"; + this.Load += new \
System.EventHandler(this.EditResourceDataEntry_Load); + \
this.ResumeLayout(false); + this.PerformLayout();
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.Label label1;
+ private System.Windows.Forms.TextBox ResourceNameBox;
+ private System.Windows.Forms.Label label2;
+ private System.Windows.Forms.ComboBox ContentTypeBox;
+ private System.Windows.Forms.ComboBox DataTypeBox;
+ private System.Windows.Forms.Label label3;
+ private System.Windows.Forms.Label label4;
+ private System.Windows.Forms.TextBox FilenameBox;
+ private System.Windows.Forms.Button OKBtn;
+ private System.Windows.Forms.Button CancelBtn;
+ }
+}
\ No newline at end of file
Added: trunk/Tools/Maestro/Maestro/PackageManager/EditResourceDataEntry.cs
===================================================================
--- trunk/Tools/Maestro/Maestro/PackageManager/EditResourceDataEntry.cs \
(rev 0)
+++ trunk/Tools/Maestro/Maestro/PackageManager/EditResourceDataEntry.cs 2008-08-12 \
20:37:11 UTC (rev 3269) @@ -0,0 +1,76 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Text;
+using System.Windows.Forms;
+
+namespace OSGeo.MapGuide.Maestro.PackageManager
+{
+ public partial class EditResourceDataEntry : Form
+ {
+ private string m_resourceName;
+ private string m_contentType;
+ private string m_filename;
+ private string m_datatype;
+
+ public string ResourceName
+ {
+ get { return m_resourceName; }
+ set { m_resourceName = value; }
+ }
+
+ public string ContentType
+ {
+ get { return m_contentType; }
+ set { m_contentType = value; }
+ }
+
+ public string Filename
+ {
+ get { return m_filename; }
+ set { m_filename = value; }
+ }
+
+ public string DataType
+ {
+ get { return m_datatype; }
+ set { m_datatype = value; }
+ }
+
+ public EditResourceDataEntry()
+ {
+ InitializeComponent();
+ }
+
+ private void EditResourceDataEntry_Load(object sender, EventArgs e)
+ {
+ ResourceNameBox.Text = m_resourceName;
+ ContentTypeBox.Text = m_contentType;
+ DataTypeBox.SelectedIndex = DataTypeBox.FindString(m_datatype);
+ FilenameBox.Text = m_filename;
+
+ }
+
+ private void ValidateForm(object sender, EventArgs e)
+ {
+ OKBtn.Enabled =
+ !string.IsNullOrEmpty(ResourceNameBox.Text) &&
+ !string.IsNullOrEmpty(ContentTypeBox.Text) &&
+ !string.IsNullOrEmpty(DataTypeBox.Text);
+ }
+
+ private void OKBtn_Click(object sender, EventArgs e)
+ {
+ m_resourceName = ResourceNameBox.Text;
+ m_contentType = ContentTypeBox.Text;
+ m_datatype = DataTypeBox.Text;
+ this.DialogResult = DialogResult.OK;
+ this.Close();
+ }
+
+
+
+ }
+}
\ No newline at end of file
Added: trunk/Tools/Maestro/Maestro/PackageManager/EditResourceDataEntry.resx
===================================================================
--- trunk/Tools/Maestro/Maestro/PackageManager/EditResourceDataEntry.resx \
(rev 0)
+++ trunk/Tools/Maestro/Maestro/PackageManager/EditResourceDataEntry.resx 2008-08-12 \
20:37:11 UTC (rev 3269) @@ -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: trunk/Tools/Maestro/Maestro/PackageManager/PackageEditor.Designer.cs
===================================================================
--- trunk/Tools/Maestro/Maestro/PackageManager/PackageEditor.Designer.cs \
(rev 0)
+++ trunk/Tools/Maestro/Maestro/PackageManager/PackageEditor.Designer.cs 2008-08-12 \
20:37:11 UTC (rev 3269) @@ -0,0 +1,464 @@
+namespace OSGeo.MapGuide.Maestro.PackageManager
+{
+ partial class PackageEditor
+ {
+ /// <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 Windows Form 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()
+ {
+ System.ComponentModel.ComponentResourceManager resources = new \
System.ComponentModel.ComponentResourceManager(typeof(PackageEditor)); + \
this.panel1 = new System.Windows.Forms.Panel(); + this.CancelBtn = new \
System.Windows.Forms.Button(); + this.OKBtn = new \
System.Windows.Forms.Button(); + this.panel2 = new \
System.Windows.Forms.Panel(); + this.LoaderGroup = new \
System.Windows.Forms.GroupBox(); + this.progressBar1 = new \
System.Windows.Forms.ProgressBar(); + this.MainGroup = new \
System.Windows.Forms.SplitContainer(); + this.ResourceTree = new \
System.Windows.Forms.TreeView(); + this.toolStrip1 = new \
System.Windows.Forms.ToolStrip(); + this.AddFolderButton = new \
System.Windows.Forms.ToolStripButton(); + this.DeleteResourceButton = new \
System.Windows.Forms.ToolStripButton(); + this.panel3 = new \
System.Windows.Forms.Panel(); + this.ResourceDataFileList = new \
System.Windows.Forms.ListView(); + this.columnHeader1 = new \
System.Windows.Forms.ColumnHeader(); + this.columnHeader2 = new \
System.Windows.Forms.ColumnHeader(); + this.columnHeader3 = new \
System.Windows.Forms.ColumnHeader(); + this.columnHeader5 = new \
System.Windows.Forms.ColumnHeader(); + this.toolStrip2 = new \
System.Windows.Forms.ToolStrip(); + this.AddResourceData = new \
System.Windows.Forms.ToolStripButton(); + this.DeleteResourceData = new \
System.Windows.Forms.ToolStripButton(); + this.EditResourceData = new \
System.Windows.Forms.ToolStripButton(); + this.toolStripSeparator1 = new \
System.Windows.Forms.ToolStripSeparator(); + this.SaveResourceData = new \
System.Windows.Forms.ToolStripButton(); + this.label3 = new \
System.Windows.Forms.Label(); + this.ContentFilePath = new \
System.Windows.Forms.TextBox(); + this.HeaderFilepath = new \
System.Windows.Forms.TextBox(); + this.label2 = new \
System.Windows.Forms.Label(); + this.label1 = new \
System.Windows.Forms.Label(); + this.BrowseResourceDataFile = new \
System.Windows.Forms.OpenFileDialog(); + this.SaveResourceDataFile = new \
System.Windows.Forms.SaveFileDialog(); + this.AddResourceButton = new \
System.Windows.Forms.ToolStripButton(); + this.panel1.SuspendLayout();
+ this.panel2.SuspendLayout();
+ this.LoaderGroup.SuspendLayout();
+ this.MainGroup.Panel1.SuspendLayout();
+ this.MainGroup.Panel2.SuspendLayout();
+ this.MainGroup.SuspendLayout();
+ this.toolStrip1.SuspendLayout();
+ this.panel3.SuspendLayout();
+ this.toolStrip2.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // panel1
+ //
+ this.panel1.Controls.Add(this.CancelBtn);
+ this.panel1.Controls.Add(this.OKBtn);
+ this.panel1.Dock = System.Windows.Forms.DockStyle.Bottom;
+ this.panel1.Location = new System.Drawing.Point(0, 344);
+ this.panel1.Name = "panel1";
+ this.panel1.Size = new System.Drawing.Size(450, 55);
+ this.panel1.TabIndex = 0;
+ //
+ // CancelBtn
+ //
+ this.CancelBtn.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
+ this.CancelBtn.DialogResult = System.Windows.Forms.DialogResult.Cancel;
+ this.CancelBtn.Location = new System.Drawing.Point(232, 16);
+ this.CancelBtn.Name = "CancelBtn";
+ this.CancelBtn.Size = new System.Drawing.Size(72, 24);
+ this.CancelBtn.TabIndex = 1;
+ this.CancelBtn.Text = "Cancel";
+ this.CancelBtn.UseVisualStyleBackColor = true;
+ //
+ // OKBtn
+ //
+ this.OKBtn.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
+ this.OKBtn.Enabled = false;
+ this.OKBtn.Location = new System.Drawing.Point(144, 16);
+ this.OKBtn.Name = "OKBtn";
+ this.OKBtn.Size = new System.Drawing.Size(72, 24);
+ this.OKBtn.TabIndex = 0;
+ this.OKBtn.Text = "OK";
+ this.OKBtn.UseVisualStyleBackColor = true;
+ this.OKBtn.Click += new System.EventHandler(this.OKBtn_Click);
+ //
+ // panel2
+ //
+ this.panel2.Controls.Add(this.LoaderGroup);
+ this.panel2.Controls.Add(this.MainGroup);
+ this.panel2.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.panel2.Location = new System.Drawing.Point(0, 0);
+ this.panel2.Name = "panel2";
+ this.panel2.Size = new System.Drawing.Size(450, 344);
+ this.panel2.TabIndex = 1;
+ //
+ // LoaderGroup
+ //
+ this.LoaderGroup.Anchor = \
((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | \
System.Windows.Forms.AnchorStyles.Right))); + \
this.LoaderGroup.Controls.Add(this.progressBar1); + \
this.LoaderGroup.Location = new System.Drawing.Point(8, 128); + \
this.LoaderGroup.Name = "LoaderGroup"; + this.LoaderGroup.Size = new \
System.Drawing.Size(432, 56); + this.LoaderGroup.TabIndex = 1;
+ this.LoaderGroup.TabStop = false;
+ this.LoaderGroup.Text = "Reading package content, please wait...";
+ //
+ // progressBar1
+ //
+ this.progressBar1.Anchor = \
((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | \
System.Windows.Forms.AnchorStyles.Bottom) + | \
System.Windows.Forms.AnchorStyles.Left) + | \
System.Windows.Forms.AnchorStyles.Right))); + this.progressBar1.Location = \
new System.Drawing.Point(16, 24); + this.progressBar1.Name = \
"progressBar1"; + this.progressBar1.Size = new System.Drawing.Size(400, \
24); + this.progressBar1.Style = \
System.Windows.Forms.ProgressBarStyle.Marquee; + \
this.progressBar1.TabIndex = 0; + //
+ // MainGroup
+ //
+ this.MainGroup.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.MainGroup.Location = new System.Drawing.Point(0, 0);
+ this.MainGroup.Name = "MainGroup";
+ //
+ // MainGroup.Panel1
+ //
+ this.MainGroup.Panel1.Controls.Add(this.ResourceTree);
+ this.MainGroup.Panel1.Controls.Add(this.toolStrip1);
+ //
+ // MainGroup.Panel2
+ //
+ this.MainGroup.Panel2.Controls.Add(this.panel3);
+ this.MainGroup.Panel2.Controls.Add(this.label3);
+ this.MainGroup.Panel2.Controls.Add(this.ContentFilePath);
+ this.MainGroup.Panel2.Controls.Add(this.HeaderFilepath);
+ this.MainGroup.Panel2.Controls.Add(this.label2);
+ this.MainGroup.Panel2.Controls.Add(this.label1);
+ this.MainGroup.Panel2.Enabled = false;
+ this.MainGroup.Panel2.Paint += new \
System.Windows.Forms.PaintEventHandler(this.MainGroup_Panel2_Paint); + \
this.MainGroup.Size = new System.Drawing.Size(450, 344); + \
this.MainGroup.SplitterDistance = 168; + this.MainGroup.TabIndex = 0;
+ this.MainGroup.Visible = false;
+ //
+ // ResourceTree
+ //
+ this.ResourceTree.AllowDrop = true;
+ this.ResourceTree.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.ResourceTree.LabelEdit = true;
+ this.ResourceTree.Location = new System.Drawing.Point(0, 25);
+ this.ResourceTree.Name = "ResourceTree";
+ this.ResourceTree.Size = new System.Drawing.Size(168, 319);
+ this.ResourceTree.TabIndex = 0;
+ this.ResourceTree.DragDrop += new \
System.Windows.Forms.DragEventHandler(this.ResourceTree_DragDrop); + \
this.ResourceTree.AfterSelect += new \
System.Windows.Forms.TreeViewEventHandler(this.ResourceTree_AfterSelect); + \
this.ResourceTree.ItemDrag += new \
System.Windows.Forms.ItemDragEventHandler(this.ResourceTree_ItemDrag); + \
this.ResourceTree.DragOver += new \
System.Windows.Forms.DragEventHandler(this.ResourceTree_DragOver); + //
+ // toolStrip1
+ //
+ this.toolStrip1.GripStyle = \
System.Windows.Forms.ToolStripGripStyle.Hidden; + \
this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + \
this.AddFolderButton, + this.AddResourceButton,
+ this.DeleteResourceButton});
+ this.toolStrip1.Location = new System.Drawing.Point(0, 0);
+ this.toolStrip1.Name = "toolStrip1";
+ this.toolStrip1.RenderMode = \
System.Windows.Forms.ToolStripRenderMode.System; + this.toolStrip1.Size = \
new System.Drawing.Size(168, 25); + this.toolStrip1.TabIndex = 1;
+ this.toolStrip1.Text = "toolStrip1";
+ //
+ // AddFolderButton
+ //
+ this.AddFolderButton.DisplayStyle = \
System.Windows.Forms.ToolStripItemDisplayStyle.Image; + \
this.AddFolderButton.Image = \
((System.Drawing.Image)(resources.GetObject("AddFolderButton.Image"))); + \
this.AddFolderButton.ImageTransparentColor = System.Drawing.Color.Magenta; + \
this.AddFolderButton.Name = "AddFolderButton"; + this.AddFolderButton.Size \
= new System.Drawing.Size(23, 22); + this.AddFolderButton.Text = \
"toolStripButton1"; + this.AddFolderButton.ToolTipText = "Add a new \
folder"; + this.AddFolderButton.Click += new \
System.EventHandler(this.AddFolderButton_Click); + //
+ // DeleteResourceButton
+ //
+ this.DeleteResourceButton.DisplayStyle = \
System.Windows.Forms.ToolStripItemDisplayStyle.Image; + \
this.DeleteResourceButton.Enabled = false; + \
this.DeleteResourceButton.Image = \
((System.Drawing.Image)(resources.GetObject("DeleteResourceButton.Image"))); + \
this.DeleteResourceButton.ImageTransparentColor = System.Drawing.Color.Magenta; + \
this.DeleteResourceButton.Name = "DeleteResourceButton"; + \
this.DeleteResourceButton.Size = new System.Drawing.Size(23, 22); + \
this.DeleteResourceButton.Text = "toolStripButton2"; + \
this.DeleteResourceButton.ToolTipText = "Delete the selected item"; + \
this.DeleteResourceButton.Click += new \
System.EventHandler(this.DeleteResourceButton_Click); + //
+ // panel3
+ //
+ this.panel3.Anchor = \
((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | \
System.Windows.Forms.AnchorStyles.Bottom) + | \
System.Windows.Forms.AnchorStyles.Left) + | \
System.Windows.Forms.AnchorStyles.Right))); + \
this.panel3.Controls.Add(this.ResourceDataFileList); + \
this.panel3.Controls.Add(this.toolStrip2); + this.panel3.Location = new \
System.Drawing.Point(16, 88); + this.panel3.Name = "panel3";
+ this.panel3.Size = new System.Drawing.Size(248, 248);
+ this.panel3.TabIndex = 5;
+ //
+ // ResourceDataFileList
+ //
+ this.ResourceDataFileList.Columns.AddRange(new \
System.Windows.Forms.ColumnHeader[] { + this.columnHeader1,
+ this.columnHeader2,
+ this.columnHeader3,
+ this.columnHeader5});
+ this.ResourceDataFileList.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.ResourceDataFileList.FullRowSelect = true;
+ this.ResourceDataFileList.Location = new System.Drawing.Point(0, 25);
+ this.ResourceDataFileList.MultiSelect = false;
+ this.ResourceDataFileList.Name = "ResourceDataFileList";
+ this.ResourceDataFileList.Size = new System.Drawing.Size(248, 223);
+ this.ResourceDataFileList.TabIndex = 1;
+ this.ResourceDataFileList.UseCompatibleStateImageBehavior = false;
+ this.ResourceDataFileList.View = System.Windows.Forms.View.Details;
+ this.ResourceDataFileList.SelectedIndexChanged += new \
System.EventHandler(this.ResourcDataFileList_SelectedIndexChanged); + \
this.ResourceDataFileList.DoubleClick += new \
System.EventHandler(this.ResourceDataFileList_DoubleClick); + //
+ // columnHeader1
+ //
+ this.columnHeader1.Text = "Filename";
+ this.columnHeader1.Width = 100;
+ //
+ // columnHeader2
+ //
+ this.columnHeader2.Text = "Content type";
+ this.columnHeader2.Width = 80;
+ //
+ // columnHeader3
+ //
+ this.columnHeader3.Text = "Data type";
+ //
+ // columnHeader5
+ //
+ this.columnHeader5.Text = "File";
+ //
+ // toolStrip2
+ //
+ this.toolStrip2.GripStyle = \
System.Windows.Forms.ToolStripGripStyle.Hidden; + \
this.toolStrip2.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + \
this.AddResourceData, + this.DeleteResourceData,
+ this.EditResourceData,
+ this.toolStripSeparator1,
+ this.SaveResourceData});
+ this.toolStrip2.Location = new System.Drawing.Point(0, 0);
+ this.toolStrip2.Name = "toolStrip2";
+ this.toolStrip2.RenderMode = \
System.Windows.Forms.ToolStripRenderMode.System; + this.toolStrip2.Size = \
new System.Drawing.Size(248, 25); + this.toolStrip2.TabIndex = 0;
+ this.toolStrip2.Text = "toolStrip2";
+ //
+ // AddResourceData
+ //
+ this.AddResourceData.DisplayStyle = \
System.Windows.Forms.ToolStripItemDisplayStyle.Image; + \
this.AddResourceData.Image = \
((System.Drawing.Image)(resources.GetObject("AddResourceData.Image"))); + \
this.AddResourceData.ImageTransparentColor = System.Drawing.Color.Magenta; + \
this.AddResourceData.Name = "AddResourceData"; + this.AddResourceData.Size \
= new System.Drawing.Size(23, 22); + this.AddResourceData.Text = \
"toolStripButton1"; + this.AddResourceData.ToolTipText = "Add a file";
+ this.AddResourceData.Click += new \
System.EventHandler(this.AddResourceData_Click); + //
+ // DeleteResourceData
+ //
+ this.DeleteResourceData.DisplayStyle = \
System.Windows.Forms.ToolStripItemDisplayStyle.Image; + \
this.DeleteResourceData.Enabled = false; + this.DeleteResourceData.Image = \
((System.Drawing.Image)(resources.GetObject("DeleteResourceData.Image"))); + \
this.DeleteResourceData.ImageTransparentColor = System.Drawing.Color.Magenta; + \
this.DeleteResourceData.Name = "DeleteResourceData"; + \
this.DeleteResourceData.Size = new System.Drawing.Size(23, 22); + \
this.DeleteResourceData.Text = "toolStripButton3"; + \
this.DeleteResourceData.ToolTipText = "Delete the selected file"; + \
this.DeleteResourceData.Click += new \
System.EventHandler(this.DeleteResourceData_Click); + //
+ // EditResourceData
+ //
+ this.EditResourceData.DisplayStyle = \
System.Windows.Forms.ToolStripItemDisplayStyle.Image; + \
this.EditResourceData.Enabled = false; + this.EditResourceData.Image = \
((System.Drawing.Image)(resources.GetObject("EditResourceData.Image"))); + \
this.EditResourceData.ImageTransparentColor = System.Drawing.Color.Magenta; + \
this.EditResourceData.Name = "EditResourceData"; + \
this.EditResourceData.Size = new System.Drawing.Size(23, 22); + \
this.EditResourceData.Text = "toolStripButton2"; + \
this.EditResourceData.ToolTipText = "Edit the selected files metadata"; + \
this.EditResourceData.Click += new System.EventHandler(this.EditResourceData_Click); \
+ // + // toolStripSeparator1
+ //
+ this.toolStripSeparator1.Name = "toolStripSeparator1";
+ this.toolStripSeparator1.Size = new System.Drawing.Size(6, 25);
+ //
+ // SaveResourceData
+ //
+ this.SaveResourceData.DisplayStyle = \
System.Windows.Forms.ToolStripItemDisplayStyle.Image; + \
this.SaveResourceData.Enabled = false; + this.SaveResourceData.Image = \
((System.Drawing.Image)(resources.GetObject("SaveResourceData.Image"))); + \
this.SaveResourceData.ImageTransparentColor = System.Drawing.Color.Magenta; + \
this.SaveResourceData.Name = "SaveResourceData"; + \
this.SaveResourceData.Size = new System.Drawing.Size(23, 22); + \
this.SaveResourceData.Text = "toolStripButton4"; + \
this.SaveResourceData.ToolTipText = "Save the selected file"; + \
this.SaveResourceData.Click += new System.EventHandler(this.SaveResourceData_Click); \
+ // + // label3
+ //
+ this.label3.AutoSize = true;
+ this.label3.Location = new System.Drawing.Point(16, 64);
+ this.label3.Name = "label3";
+ this.label3.Size = new System.Drawing.Size(51, 13);
+ this.label3.TabIndex = 4;
+ this.label3.Text = "Data files";
+ //
+ // ContentFilePath
+ //
+ this.ContentFilePath.Anchor = \
((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | \
System.Windows.Forms.AnchorStyles.Left) + | \
System.Windows.Forms.AnchorStyles.Right))); + \
this.ContentFilePath.Location = new System.Drawing.Point(80, 32); + \
this.ContentFilePath.Name = "ContentFilePath"; + \
this.ContentFilePath.ReadOnly = true; + this.ContentFilePath.Size = new \
System.Drawing.Size(184, 20); + this.ContentFilePath.TabIndex = 3;
+ //
+ // HeaderFilepath
+ //
+ this.HeaderFilepath.Anchor = \
((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | \
System.Windows.Forms.AnchorStyles.Left) + | \
System.Windows.Forms.AnchorStyles.Right))); + this.HeaderFilepath.Location \
= new System.Drawing.Point(80, 8); + this.HeaderFilepath.Name = \
"HeaderFilepath"; + this.HeaderFilepath.ReadOnly = true;
+ this.HeaderFilepath.Size = new System.Drawing.Size(184, 20);
+ this.HeaderFilepath.TabIndex = 2;
+ //
+ // label2
+ //
+ this.label2.AutoSize = true;
+ this.label2.Location = new System.Drawing.Point(16, 32);
+ this.label2.Name = "label2";
+ this.label2.Size = new System.Drawing.Size(60, 13);
+ this.label2.TabIndex = 1;
+ this.label2.Text = "Content file";
+ //
+ // label1
+ //
+ this.label1.AutoSize = true;
+ this.label1.Location = new System.Drawing.Point(16, 8);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(58, 13);
+ this.label1.TabIndex = 0;
+ this.label1.Text = "Header file";
+ //
+ // BrowseResourceDataFile
+ //
+ this.BrowseResourceDataFile.Filter = "All files (*.*)|*.*";
+ this.BrowseResourceDataFile.Title = "Select a file to add";
+ //
+ // SaveResourceDataFile
+ //
+ this.SaveResourceDataFile.Filter = "All files (*.*)|*.*";
+ this.SaveResourceDataFile.Title = "Select where to save the file";
+ //
+ // AddResourceButton
+ //
+ this.AddResourceButton.DisplayStyle = \
System.Windows.Forms.ToolStripItemDisplayStyle.Image; + \
this.AddResourceButton.Image = \
((System.Drawing.Image)(resources.GetObject("AddResourceButton.Image"))); + \
this.AddResourceButton.ImageTransparentColor = System.Drawing.Color.Magenta; + \
this.AddResourceButton.Name = "AddResourceButton"; + \
this.AddResourceButton.Size = new System.Drawing.Size(23, 22); + \
this.AddResourceButton.Text = "toolStripButton1"; + \
this.AddResourceButton.ToolTipText = "Add a new resource to the package"; + \
this.AddResourceButton.Click += new \
System.EventHandler(this.AddResourceButton_Click); + //
+ // PackageEditor
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.CancelButton = this.CancelBtn;
+ this.ClientSize = new System.Drawing.Size(450, 399);
+ this.Controls.Add(this.panel2);
+ this.Controls.Add(this.panel1);
+ this.Name = "PackageEditor";
+ this.Text = "Package Editor";
+ this.Load += new System.EventHandler(this.PackageEditor_Load);
+ this.panel1.ResumeLayout(false);
+ this.panel2.ResumeLayout(false);
+ this.LoaderGroup.ResumeLayout(false);
+ this.MainGroup.Panel1.ResumeLayout(false);
+ this.MainGroup.Panel1.PerformLayout();
+ this.MainGroup.Panel2.ResumeLayout(false);
+ this.MainGroup.Panel2.PerformLayout();
+ this.MainGroup.ResumeLayout(false);
+ this.toolStrip1.ResumeLayout(false);
+ this.toolStrip1.PerformLayout();
+ this.panel3.ResumeLayout(false);
+ this.panel3.PerformLayout();
+ this.toolStrip2.ResumeLayout(false);
+ this.toolStrip2.PerformLayout();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.Panel panel1;
+ private System.Windows.Forms.Button CancelBtn;
+ private System.Windows.Forms.Button OKBtn;
+ private System.Windows.Forms.Panel panel2;
+ private System.Windows.Forms.SplitContainer MainGroup;
+ private System.Windows.Forms.TreeView ResourceTree;
+ private System.Windows.Forms.ToolStrip toolStrip1;
+ private System.Windows.Forms.ToolStripButton AddFolderButton;
+ private System.Windows.Forms.ToolStripButton DeleteResourceButton;
+ private System.Windows.Forms.GroupBox LoaderGroup;
+ private System.Windows.Forms.ProgressBar progressBar1;
+ private System.Windows.Forms.Label label1;
+ private System.Windows.Forms.TextBox ContentFilePath;
+ private System.Windows.Forms.TextBox HeaderFilepath;
+ private System.Windows.Forms.Label label2;
+ private System.Windows.Forms.Label label3;
+ private System.Windows.Forms.Panel panel3;
+ private System.Windows.Forms.ToolStrip toolStrip2;
+ private System.Windows.Forms.ToolStripButton AddResourceData;
+ private System.Windows.Forms.ToolStripButton EditResourceData;
+ private System.Windows.Forms.ToolStripButton DeleteResourceData;
+ private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
+ private System.Windows.Forms.ToolStripButton SaveResourceData;
+ private System.Windows.Forms.ListView ResourceDataFileList;
+ private System.Windows.Forms.ColumnHeader columnHeader1;
+ private System.Windows.Forms.ColumnHeader columnHeader2;
+ private System.Windows.Forms.ColumnHeader columnHeader3;
+ private System.Windows.Forms.ColumnHeader columnHeader5;
+ private System.Windows.Forms.OpenFileDialog BrowseResourceDataFile;
+ private System.Windows.Forms.SaveFileDialog SaveResourceDataFile;
+ private System.Windows.Forms.ToolStripButton AddResourceButton;
+ }
+}
\ No newline at end of file
Added: trunk/Tools/Maestro/Maestro/PackageManager/PackageEditor.cs
===================================================================
--- trunk/Tools/Maestro/Maestro/PackageManager/PackageEditor.cs \
(rev 0)
+++ trunk/Tools/Maestro/Maestro/PackageManager/PackageEditor.cs 2008-08-12 20:37:11 \
UTC (rev 3269) @@ -0,0 +1,545 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Text;
+using System.Windows.Forms;
+using OSGeo.MapGuide.MaestroAPI;
+
+namespace OSGeo.MapGuide.Maestro.PackageManager
+{
+ public partial class PackageEditor : Form
+ {
+ public enum EntryTypeEnum
+ {
+ Regular,
+ Deleted,
+ Added
+ }
+
+ private class ResourceDataItem
+ {
+ private string m_resourceName;
+ private string m_contentType;
+ private string m_filename;
+ private string m_dataType;
+ private EntryTypeEnum m_entryType;
+
+ public ResourceDataItem(string resourceName, string contentType, string \
filename, string dataType) + {
+ m_resourceName = resourceName;
+ m_contentType = contentType;
+ m_filename = filename;
+ m_dataType = dataType;
+ m_entryType = EntryTypeEnum.Regular;
+ }
+
+ public string ResourceName
+ {
+ get { return m_resourceName; }
+ set { m_resourceName = value; }
+ }
+
+ public string ContentType
+ {
+ get { return m_contentType; }
+ set { m_contentType = value; }
+ }
+
+ public string Filename
+ {
+ get { return m_filename; }
+ set { m_filename = value; }
+ }
+
+ public EntryTypeEnum EntryType
+ {
+ get { return m_entryType; }
+ set { m_entryType = value; }
+ }
+
+ public string DataType
+ {
+ get { return m_dataType; }
+ set { m_dataType = value; }
+ }
+ }
+
+ private class ResourceItem
+ {
+
+ public ResourceItem(string resourcePath, string headerPath, string \
contentPath) + {
+ m_originalResourcePath = m_resourcePath = resourcePath;
+ m_headerpath = headerPath;
+ m_contentpath = contentPath;
+ m_entryType = EntryTypeEnum.Regular;
+ m_items = new List<ResourceDataItem>();
+ m_isFolder = m_originalResourcePath.EndsWith("/");
+ }
+
+ private string m_originalResourcePath;
+ private string m_headerpath;
+ private string m_contentpath;
+ private string m_resourcePath;
+ private EntryTypeEnum m_entryType;
+ private List<ResourceDataItem> m_items;
+ private bool m_isFolder;
+
+ public bool IsFolder
+ {
+ get { return m_isFolder; }
+ set { m_isFolder = true; }
+ }
+
+ public List<ResourceDataItem> Items
+ {
+ get { return m_items; }
+ set { m_items = value; }
+ }
+
+ public EntryTypeEnum EntryType
+ {
+ get { return m_entryType; }
+ set { m_entryType = value; }
+ }
+
+
+ public string OriginalResourcePath
+ {
+ get { return m_originalResourcePath; }
+ set { m_originalResourcePath = value; }
+ }
+
+ public string ResourcePath
+ {
+ get { return m_resourcePath; }
+ set { m_resourcePath = value; }
+ }
+
+ public string Contentpath
+ {
+ get { return m_contentpath; }
+ set { m_contentpath = value; }
+ }
+
+ public string Headerpath
+ {
+ get { return m_headerpath; }
+ set { m_headerpath = value; }
+ }
+ }
+
+ private string m_filename;
+ private FormMain m_owner;
+ private Dictionary<string, ResourceItem> m_resources;
+ private ICSharpCode.SharpZipLib.Zip.ZipFile m_zipfile;
+
+ public PackageEditor(string filename, FormMain owner)
+ : this()
+ {
+ m_filename = filename;
+ m_owner = owner;
+ m_resources = new Dictionary<string, ResourceItem>();
+ ResourceTree.ImageList = owner.ResourceEditorMap.SmallImageList;
+ ResourceDataFileList.SmallImageList = \
ResourceEditors.ShellIcons.ImageList; + }
+
+ private PackageEditor()
+ {
+ InitializeComponent();
+ }
+
+ public static void EditPackage(ServerConnectionI connection, FormMain owner)
+ {
+ OpenFileDialog dlg = new OpenFileDialog();
+ dlg.AutoUpgradeEnabled = true;
+ dlg.CheckFileExists = true;
+ dlg.CheckPathExists = true;
+ dlg.DefaultExt = ".mgp";
+ dlg.Filter = "MapGuide Packages (*.mgp)|*.mgp|Zip files \
(*.zip)|*.zip|All files (*.*)|*.*"; + dlg.FilterIndex = 0;
+ dlg.Multiselect = false;
+ dlg.ValidateNames = true;
+ dlg.Title = "Select the package to edit";
+
+ if (dlg.ShowDialog(owner) == DialogResult.OK)
+ {
+ PackageEditor pe = new PackageEditor(dlg.FileName, owner);
+ pe.ShowDialog(owner);
+ }
+
+ }
+
+ private void PackageEditor_Load(object sender, EventArgs e)
+ {
+ this.Show();
+
+ try
+ {
+ m_zipfile = new ICSharpCode.SharpZipLib.Zip.ZipFile(m_filename);
+ int index = m_zipfile.FindEntry("MgResourcePackageManifest.xml", \
false); + if (index < 0)
+ throw new Exception("Failed to locate file \
MgResourcePackageManifest.xml in zip file. Most likely the file is not a MapGuide \
package."); +
+ ResourcePackageManifest manifest = \
m_owner.CurrentConnection.DeserializeObject<ResourcePackageManifest>(m_zipfile.GetInputStream(index));
+
+ //TODO: Much of this assumes that the package is correctly \
constructed, ea.: no SETRESOURCEDATA, before a SETRESOURCE and so on. + \
foreach (ResourcePackageManifestOperationsOperation op in \
manifest.Operations.Operation) + {
+ if (op.Name.ToLower().Equals("setresource"))
+ {
+ string id = op.Parameters.Parameter["RESOURCEID"].Value;
+ string header = op.Parameters.Parameter["HEADER"].Value;
+ string content = op.Parameters.Parameter["CONTENT"] == null \
? null : op.Parameters.Parameter["CONTENT"].Value; +
+ m_resources.Add(id, new ResourceItem(id, header, content));
+ }
+ else if (op.Name.ToLower().Equals("setresourcedata"))
+ {
+ string id = op.Parameters.Parameter["RESOURCEID"].Value;
+ ResourceItem ri = m_resources[id];
+ string name = op.Parameters.Parameter["DATANAME"].Value;
+ string file = op.Parameters.Parameter["DATA"].Value;
+ string contentType = \
op.Parameters.Parameter["DATA"].ContentType; + string dataType \
= op.Parameters.Parameter["DATATYPE"].Value; +
+ ri.Items.Add(new ResourceDataItem(name, contentType, file, \
dataType)); + }
+ //TODO: What to do with "DELETERESOURCE" ?
+ this.Update();
+ }
+
+ RebuildTree();
+
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show(this, string.Format("Failed to read package. Error \
message was: {0}", ex.Message), Application.ProductName, MessageBoxButtons.OK, \
MessageBoxIcon.Error); + this.DialogResult = DialogResult.Cancel;
+ this.Close();
+ return;
+ }
+
+ LoaderGroup.Visible = false;
+ MainGroup.Visible = true;
+ OKBtn.Enabled = true;
+ }
+
+ private void RebuildTree()
+ {
+ ResourceTree.Nodes.Clear();
+ TreeNode root = ResourceTree.Nodes.Add("Library://");
+ root.ImageIndex = root.SelectedImageIndex = \
m_owner.ResourceEditorMap.ServerIcon; +
+ foreach (ResourceItem ri in m_resources.Values)
+ {
+ string partial = ri.ResourcePath.Substring(root.Text.Length);
+ string[] parts = partial.Split('/');
+ TreeNode cur = root;
+ root.Expand();
+
+ for (int i = 0; i < parts.Length - 1; i++)
+ {
+ TreeNode next = null;
+ foreach (TreeNode n in cur.Nodes)
+ if (n.Text == parts[i])
+ {
+ next = n;
+ break;
+ }
+ if (next == null)
+ {
+ cur = cur.Nodes.Add(parts[i]);
+ cur.ImageIndex = cur.SelectedImageIndex = \
m_owner.ResourceEditorMap.FolderIcon; + }
+ else
+ cur = next;
+
+ cur.Expand();
+ }
+
+ if (parts[parts.Length - 1].Trim().Length > 0)
+ {
+ TreeNode n = cur.Nodes.Add(parts[parts.Length - 1]);
+ n.Tag = ri;
+ n.ImageIndex = n.SelectedImageIndex = \
m_owner.ResourceEditorMap.GetImageIndexFromResourceID(ri.ResourcePath); + \
} + else
+ cur.Tag = ri;
+ }
+ }
+
+ private void MainGroup_Panel2_Paint(object sender, PaintEventArgs e)
+ {
+
+ }
+
+ private void ResourcDataFileList_SelectedIndexChanged(object sender, \
EventArgs e) + {
+ DeleteResourceButton.Enabled = EditResourceData.Enabled = \
SaveResourceData.Enabled = ResourceDataFileList.SelectedItems.Count == 1; + }
+
+ private void AddResourceData_Click(object sender, EventArgs e)
+ {
+ if (BrowseResourceDataFile.ShowDialog(this) == DialogResult.OK)
+ {
+ ResourceDataItem rdi = new ResourceDataItem(
+ System.IO.Path.GetFileName(BrowseResourceDataFile.FileName),
+ "application/octet-stream",
+ BrowseResourceDataFile.FileName,
+ "File");
+ rdi.EntryType = EntryTypeEnum.Added;
+
+ ((ResourceItem)ResourceTree.SelectedNode.Tag).Items.Add(rdi);
+ RefreshFileList();
+ }
+ }
+
+ private void RefreshFileList()
+ {
+ ResourceDataFileList.Items.Clear();
+ foreach(ResourceDataItem rdi in \
((ResourceItem)ResourceTree.SelectedNode.Tag).Items) + if \
(rdi.EntryType != EntryTypeEnum.Deleted) + {
+ ResourceDataFileList.Items.Add(new ListViewItem(new string[] {
+ rdi.ResourceName, rdi.ContentType, rdi.DataType.ToString(), \
rdi.Filename + }, \
ResourceEditors.ShellIcons.GetShellIcon(rdi.Filename))).Tag = rdi; + }
+ }
+
+ private void ResourceTree_AfterSelect(object sender, TreeViewEventArgs e)
+ {
+ DeleteResourceButton.Enabled = MainGroup.Panel2.Enabled = \
(ResourceTree.SelectedNode != null && ResourceTree.SelectedNode.Tag as ResourceItem \
!= null); +
+ if (MainGroup.Panel2.Enabled)
+ {
+ HeaderFilepath.Text = \
((ResourceItem)ResourceTree.SelectedNode.Tag).Headerpath; + \
ContentFilePath.Text = ((ResourceItem)ResourceTree.SelectedNode.Tag).Contentpath; + \
RefreshFileList(); + }
+ }
+
+ private void DeleteResourceData_Click(object sender, EventArgs e)
+ {
+ if (ResourceDataFileList.SelectedItems.Count != 1 || \
ResourceDataFileList.SelectedItems[0].Tag as ResourceDataItem == null) + \
return; +
+ (ResourceDataFileList.SelectedItems[0].Tag as \
ResourceDataItem).EntryType = EntryTypeEnum.Deleted; + RefreshFileList();
+ }
+
+ private void SaveResourceData_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ if (ResourceDataFileList.SelectedItems.Count != 1 || \
ResourceDataFileList.SelectedItems[0].Tag as ResourceDataItem == null) + \
return; +
+ SaveResourceDataFile.FileName = \
System.IO.Path.GetFileName((ResourceDataFileList.SelectedItems[0].Tag as \
ResourceDataItem).Filename); +
+ if (SaveResourceDataFile.ShowDialog(this) != DialogResult.OK)
+ return;
+
+ if ((ResourceDataFileList.SelectedItems[0].Tag as \
ResourceDataItem).Filename == SaveResourceDataFile.FileName) + \
return; +
+ if ((ResourceDataFileList.SelectedItems[0].Tag as \
ResourceDataItem).EntryType == EntryTypeEnum.Regular) + {
+ int index = \
m_zipfile.FindEntry((ResourceDataFileList.SelectedItems[0].Tag as \
ResourceDataItem).Filename, false); + if (index >= 0)
+ using (System.IO.FileStream fs = new \
System.IO.FileStream(SaveResourceDataFile.FileName, System.IO.FileMode.Create, \
System.IO.FileAccess.Write, System.IO.FileShare.None)) + \
Utility.CopyStream(m_zipfile.GetInputStream(index), fs); + }
+ else if ((ResourceDataFileList.SelectedItems[0].Tag as \
ResourceDataItem).EntryType == EntryTypeEnum.Added) + {
+ System.IO.File.Copy((ResourceDataFileList.SelectedItems[0].Tag \
as ResourceDataItem).Filename, SaveResourceDataFile.FileName, true); + \
} + }
+ catch (Exception ex)
+ {
+ MessageBox.Show(this, string.Format("An error occured while copying \
file: {0}", ex.Message), Application.ProductName, MessageBoxButtons.OK, \
MessageBoxIcon.Error); + }
+
+ }
+
+ private void EditResourceData_Click(object sender, EventArgs e)
+ {
+ if (ResourceDataFileList.SelectedItems.Count != 1 || \
ResourceDataFileList.SelectedItems[0].Tag as ResourceDataItem == null) + \
return; +
+ EditResourceDataEntry dlg = new EditResourceDataEntry();
+ dlg.ResourceName = (ResourceDataFileList.SelectedItems[0].Tag as \
ResourceDataItem).ResourceName; + dlg.ContentType = \
(ResourceDataFileList.SelectedItems[0].Tag as ResourceDataItem).ContentType; + \
dlg.DataType = (ResourceDataFileList.SelectedItems[0].Tag as \
ResourceDataItem).DataType; + dlg.Filename = \
(ResourceDataFileList.SelectedItems[0].Tag as ResourceDataItem).Filename; +
+ if (dlg.ShowDialog(this) == DialogResult.OK)
+ {
+ (ResourceDataFileList.SelectedItems[0].Tag as \
ResourceDataItem).ResourceName = dlg.ResourceName; + \
(ResourceDataFileList.SelectedItems[0].Tag as ResourceDataItem).ContentType = \
dlg.ContentType; + (ResourceDataFileList.SelectedItems[0].Tag as \
ResourceDataItem).DataType = dlg.DataType; + RefreshFileList();
+ }
+ }
+
+ private void ResourceDataFileList_DoubleClick(object sender, EventArgs e)
+ {
+ EditResourceData_Click(sender, e);
+ }
+
+ private void ResourceTree_DragDrop(object sender, DragEventArgs e)
+ {
+ TreeNode x = e.Data.GetData(typeof(TreeNode)) as TreeNode;
+ if (x == null || x.Tag == null)
+ return;
+
+ TreeNode n = ResourceTree.GetNodeAt(ResourceTree.PointToClient(new \
Point(e.X, e.Y))); + if (n != null && n.Tag as ResourceItem != null && \
(n.Tag as ResourceItem).IsFolder) + {
+ //Can't drag onto its' own child
+ TreeNode t = n;
+ while (t.Parent != null)
+ if (t == x)
+ return;
+ else
+ t = t.Parent;
+
+ x.Remove();
+ n.Nodes.Add(x);
+ }
+ else
+ return;
+ }
+
+ private void ResourceTree_DragOver(object sender, DragEventArgs e)
+ {
+ TreeNode x = e.Data.GetData(typeof(TreeNode)) as TreeNode;
+ if (x == null || x.Tag == null)
+ {
+ e.Effect = DragDropEffects.None;
+ return;
+ }
+
+ TreeNode n = ResourceTree.GetNodeAt(ResourceTree.PointToClient(new \
Point(e.X, e.Y))); + if (n != null && n.Tag as ResourceItem != null && \
(n.Tag as ResourceItem).IsFolder) + {
+ //Can't drag onto its' own child
+ TreeNode t = n;
+ while (t.Parent != null)
+ if (t == x)
+ {
+ e.Effect = DragDropEffects.None;
+ return;
+ }
+ else
+ t = t.Parent;
+
+ e.Effect = DragDropEffects.Move;
+ }
+ else
+ e.Effect = DragDropEffects.None;
+ }
+
+ private void ResourceTree_ItemDrag(object sender, ItemDragEventArgs e)
+ {
+ ResourceTree.DoDragDrop(e.Item, DragDropEffects.Move);
+ }
+
+ private void AddFolderButton_Click(object sender, EventArgs e)
+ {
+ TreeNode n = new TreeNode("New folder", \
m_owner.ResourceEditorMap.FolderIcon, m_owner.ResourceEditorMap.FolderIcon); + \
n.Tag = new ResourceItem("", "", ""); + (n.Tag as ResourceItem).EntryType \
= EntryTypeEnum.Added; + (n.Tag as ResourceItem).IsFolder = true;
+
+ if (ResourceTree.SelectedNode == null || \
ResourceTree.SelectedNode.Parent == null) + ResourceTree.Nodes.Add(n);
+ else if (ResourceTree.SelectedNode.Tag as ResourceItem != null)
+ {
+ if ((ResourceTree.SelectedNode.Tag as ResourceItem).IsFolder)
+ ResourceTree.SelectedNode.Nodes.Add(n);
+ else if (ResourceTree.SelectedNode.Parent == null)
+ ResourceTree.Nodes.Add(n);
+ else
+ ResourceTree.SelectedNode.Parent.Nodes.Add(n);
+ }
+
+ n.EnsureVisible();
+ ResourceTree.SelectedNode = n;
+ ResourceTree.Focus();
+ }
+
+ private void DeleteResourceButton_Click(object sender, EventArgs e)
+ {
+ if (ResourceTree.SelectedNode == null || ResourceTree.SelectedNode.Tag \
as ResourceItem == null) + return;
+
+ if (MessageBox.Show(this, "Do you want to remove the selected item?", \
Application.ProductName, MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question) != \
DialogResult.Yes) + return;
+
+ TreeNode root = ResourceTree.SelectedNode;
+
+ Queue<TreeNode> lst = new Queue<TreeNode>();
+ lst.Enqueue(root);
+
+ while (lst.Count > 0)
+ {
+ TreeNode n = lst.Dequeue();
+ foreach (TreeNode tn in n.Nodes)
+ lst.Enqueue(tn);
+
+ if (n.Tag as ResourceItem != null)
+ {
+ if ((n.Tag as ResourceItem).EntryType == EntryTypeEnum.Regular)
+ {
+ for (int i = 0; i < (n.Tag as ResourceItem).Items.Count; \
i++) + if ((n.Tag as ResourceItem).Items[i].EntryType == \
EntryTypeEnum.Added) + {
+ (n.Tag as ResourceItem).Items.RemoveAt(i);
+ i--;
+ }
+ }
+ (n.Tag as ResourceItem).EntryType = EntryTypeEnum.Deleted;
+ }
+ }
+
+ root.Remove();
+ }
+
+ private void AddResourceButton_Click(object sender, EventArgs e)
+ {
+ AddResourceEntry dlg = new AddResourceEntry();
+ if (dlg.ShowDialog(this) == DialogResult.OK)
+ {
+ int imageindex = \
m_owner.ResourceEditorMap.GetImageIndexFromResourceType(System.IO.Path.GetExtension(dlg.ResourceName).Replace(".", \
"")); + TreeNode n = new TreeNode(dlg.ResourceName, imageindex, \
imageindex); + ResourceItem i = new ResourceItem("", \
dlg.HeaderFilepath, dlg.ContentFilepath); + i.EntryType = \
EntryTypeEnum.Added; + n.Tag = i;
+
+ if (ResourceTree.SelectedNode == null || \
ResourceTree.SelectedNode.Parent == null) + \
ResourceTree.Nodes.Add(n); + else if (ResourceTree.SelectedNode.Tag as \
ResourceItem != null) + {
+ if ((ResourceTree.SelectedNode.Tag as ResourceItem).IsFolder)
+ ResourceTree.SelectedNode.Nodes.Add(n);
+ else if (ResourceTree.SelectedNode.Parent == null)
+ ResourceTree.Nodes.Add(n);
+ else
+ ResourceTree.SelectedNode.Parent.Nodes.Add(n);
+ }
+
+ n.EnsureVisible();
+ ResourceTree.SelectedNode = n;
+ ResourceTree.Focus();
+ }
+ }
+
+ private void OKBtn_Click(object sender, EventArgs e)
+ {
+ MessageBox.Show("This feature is not yet completed");
+ }
+ }
+}
\ No newline at end of file
Added: trunk/Tools/Maestro/Maestro/PackageManager/PackageEditor.resx
===================================================================
--- trunk/Tools/Maestro/Maestro/PackageManager/PackageEditor.resx \
(rev 0)
+++ trunk/Tools/Maestro/Maestro/PackageManager/PackageEditor.resx 2008-08-12 20:37:11 \
UTC (rev 3269) @@ -0,0 +1,245 @@
+<?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> + <metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, \
System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + \
<value>17, 17</value> + </metadata>
+ <metadata name="toolStrip2.TrayLocation" type="System.Drawing.Point, \
System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + \
<value>116, 17</value> + </metadata>
+ <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, \
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> + <data \
name="AddFolderButton.Image" type="System.Drawing.Bitmap, System.Drawing" \
mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>
+ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
+ YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAiBJREFUOE/lkv1L
+ U1EYx/en1DIxsBeLCi+9CokaWoRkSC3IHxbDLK2MmZahoWhDa9O0xtZ8yVGhmAm+LByyod62aYzVwISF
+ MllL2+7dztYN9u3ulObNH/oDOvCBA4fn85znRSb7P86svgxrsI9LMd1+HZsq5ywarLHxcVZ3CYT3Ih4L
+ UEJkFcRWLxWEx8rwnR+UIARNiH15ASH4CpHlAUSWBtf5Nl4tFfAT1yCETRSyqofLWoV3lsp12OFyJHk/
+ egOCX4+v/VekguhMDQ2OfX6AIHsLLrMCzucX4Owqprw1nEO1NgfK1qOo7SnEkLZYKiDuJggBA8L9uWIf
+ cijJe2g4C+NGBnktB1Brq8ITTxs0zgYU9uSj/mnFH0lsoR3xT02IjJwCP7UfnHU3wmPp8A2kgWlOQYVd
+ hfvuO/jg96DP2wW1oxxZzxiYDb9LiS+ZELWWIOo5QwW8fS8V6Dq2gendA+W0AmpWhRVuhQpK2RLkvTmO
+ fF32r1/QTovZybyCSqJzBZSbHTuR0ZsKu2+SBicSCXCEo3el5SLSG1MgI1PNiM9rQVxXxZGJkxB7kex0
+ kgZzEQ72bafZO711dAcmFl+jxX0XuUNHkKnZJwrEpYiMFtF5/whNSnDMdWKXTo4CWyoue3cgwC3C6LuN
+ s440Kq55qd68kX+vaGO3Eoe6t0L1cQuM/vO4t8Dg5Igc2a2H/x28UXa67QQyH8lx7GGGJPNPtu7MKxgg
+ BnYAAAAASUVORK5CYII=
+</value>
+ </data>
+ <data name="DeleteResourceButton.Image" type="System.Drawing.Bitmap, \
System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + \
<value> + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
+ YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAgJJREFUOE99k99L
+ U2Ecxif7U4IQFIR+QBgIXjQvlhQRYtSVN5FF5C/oYjioOdBJIl0Iq6siCCI9URHDcdATB5b4CyeTwVKP
+ TLHcXOm2s+W2J5/3cE4enb3w4X3fw3mf8zzf93tqHIdjdj6GfDbjcDqd3FqjXC6LZ5w5dD3vaGm5UmN7
+ iRtVjaBQPEA29+e/hMMyPk1IqCrAw+lfRYtURodBQTzjWpanEYtrGB//YBehA1NgY3MX8URSwEOceYhI
+ 0kcLm0g1AR6gGOvDeXUjLcSmlAjWtS0wjhXlNAc/UnnMLa4ciVUQe7q1CSiKKorIrEcjcL2wFLfVhY6q
+ ChyvASNoW1kRIRH7jkgwiK9eD754PEh8mz3p4LQiqu8lyDfd2A48wf7rl9gdG8FCRzvedd3/VwNGMAX4
+ VfMWonPLCLkb8dvbh/LzQVSCo2LW/R5Eb7iqCzC3eW2hQABrV5tQevwAlSEvKs98Bv092LndivCta4aI
+ 6YBNYwosxTSEuh9h23UJGUVGLrVj42dfJyYvNxgC7DBGYOPwvhejawIWTHOdw76vF/lXIwZvDnkxLBww
+ ns0B85PV5J4gElIx09QAve08KvcuWJTuXBTC6oD3pAO6YAOZKP6niLrqkeuoRenhGRTvnkXyej0kd7O9
+ iIxB2GHHeev34XN7Kyab64RtXqH5V/4FyU/RgaVjSCgAAAAASUVORK5CYII=
+</value>
+ </data>
+ <metadata name="toolStrip2.TrayLocation" type="System.Drawing.Point, \
System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + \
<value>116, 17</value> + </metadata>
+ <data name="AddResourceData.Image" type="System.Drawing.Bitmap, System.Drawing" \
mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>
+ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
+ YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAhhJREFUOE99kt9L
+ U2Ecxif7SxwlCRGVF6VF5DCiCLuJrqJuoo3TVYsKiyyTUIKKdAUVtH6Ji2gsDepiLVo7IGOWbHncKHVH
+ bWBsTg5rusX21PPaWZyd1QsPnPfwfT/v83zfb4Pl94p+VFDI5yxWq5Vb0yqXy+JfqVS0dHTYG0wFsjyG
+ SqWC/I/SfxUIBOHzvURdAA9nl4sGaQUNmdzqH60gGHwPJamaIXSgA+a+LSH5dUEUqul89Zt7v3+0KoOT
+ egBCMrkVsD+EzqrfBSwUkpFS02CcapR/AXjwUyxZjcU44xNTwq0BQOpq8aco1CPwNkaoBURin+sDantA
+ AGGMEP8yjYHXd3Dm2Vm4PKcRViJmB/UAi5kCvG992Ou243L4PO5N3sb18T4cetoJ56Djbw8YQQfonacD
+ 2m290QKXLOFqvBtKehLDicfoip6C/WFbfQBt88moXm8f2oY2wzF2FF0RCVktKwAnI8ex/1U7Dg7uWYPo
+ DthlHRBTVDgfSGjxNkNOhcRhTiuHi9+OwDFs7F+3BuCEMQLffWYui4n4rJDr0TlsGWoSt99N9GK5sIR3
+ 8yO4Gb+EfaO7RDyDA+anZhY0Ib/8AZvcNnSGm+BMNGNRm4cndQGHoxuwbXg9Lj7vNjugC3ZfF4t2PmmE
+ NNUIT/oIeqZ34MAbG3Zf225sImNQnLBaXbnfIxrWOmBD+62tkNwn8GLELwC/ACt9xxnW2QbqAAAAAElF
+ TkSuQmCC
+</value>
+ </data>
+ <data name="DeleteResourceData.Image" type="System.Drawing.Bitmap, System.Drawing" \
mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>
+ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
+ YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAgJJREFUOE99k99L
+ U2Ecxif7U4IQFIR+QBgIXjQvlhQRYtSVN5FF5C/oYjioOdBJIl0Iq6siCCI9URHDcdATB5b4CyeTwVKP
+ TLHcXOm2s+W2J5/3cE4enb3w4X3fw3mf8zzf93tqHIdjdj6GfDbjcDqd3FqjXC6LZ5w5dD3vaGm5UmN7
+ iRtVjaBQPEA29+e/hMMyPk1IqCrAw+lfRYtURodBQTzjWpanEYtrGB//YBehA1NgY3MX8URSwEOceYhI
+ 0kcLm0g1AR6gGOvDeXUjLcSmlAjWtS0wjhXlNAc/UnnMLa4ciVUQe7q1CSiKKorIrEcjcL2wFLfVhY6q
+ ChyvASNoW1kRIRH7jkgwiK9eD754PEh8mz3p4LQiqu8lyDfd2A48wf7rl9gdG8FCRzvedd3/VwNGMAX4
+ VfMWonPLCLkb8dvbh/LzQVSCo2LW/R5Eb7iqCzC3eW2hQABrV5tQevwAlSEvKs98Bv092LndivCta4aI
+ 6YBNYwosxTSEuh9h23UJGUVGLrVj42dfJyYvNxgC7DBGYOPwvhejawIWTHOdw76vF/lXIwZvDnkxLBww
+ ns0B85PV5J4gElIx09QAve08KvcuWJTuXBTC6oD3pAO6YAOZKP6niLrqkeuoRenhGRTvnkXyej0kd7O9
+ iIxB2GHHeev34XN7Kyab64RtXqH5V/4FyU/RgaVjSCgAAAAASUVORK5CYII=
+</value>
+ </data>
+ <data name="EditResourceData.Image" type="System.Drawing.Bitmap, System.Drawing" \
mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>
+ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
+ YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAhNJREFUOE+tk99L
+ U3EYxv1bCqGCZEEIBaugWITMorBQHI4EjcCLwi6kKLsIvair5kWRGhky1ETZ2o9+zFoqztySeZKj86Qz
+ W003nFNX3vTU84bnuJJu6sDDl/P9ft7nffi+5xQU/I+n9koPTte6ceFqEBevh/4qMmTrG/uh97aed2FS
+ yyA6nctTbC4L6o8zdQUl9l7D4FzdSwTHMqKR6FeElRVRJvsNqfQyhsY35H14PKdzrNETlNYMoC+QgTu4
+ jvjHJJKpLFQtJQbU9My87ClqQhiy1mq/YWCxv8K9rkU8cq3hw2wCq2sbIhZzXc7+kjI5i7b+nLDHbFsM
+ DpUPoLl1UQ68gSkpYtdO1wK6PXHMzX+WBL2e93B0LglrPuszEpisz9FwR9WjEr7v1NDQAlGfT8VCcl30
+ Nqyg7paGopKnhsHu435YqiPwPhuUmASbWsZQWv9d1NE1ItMYDkXx2OnGgYoJ7LL8ZmAqi+Fg1RIcD14I
+ PBqZQpNjEHdbXyMyEYcSS8vsi20pkN3WwFKjSRfOnVPgykLqnZqWhGb7J5jOqPkGdKPr/oovksDleYNL
+ N7zSeSik4HKjT4qvNftRXJkQg8IjTuMOaLD3ZBj7ymYEYBemYVH3E5++xwZsRDbPYIf5IfacCKDoVESA
+ TR2tGsVhW9jY+9mZxWR3mtuNBLwcmtCVYqLttHlO9ubtLd/Bv/zRPwDu+UDiBAKr0QAAAABJRU5ErkJg
+ gg==
+</value>
+ </data>
+ <data name="SaveResourceData.Image" type="System.Drawing.Bitmap, System.Drawing" \
mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>
+ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
+ YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAe5JREFUOE+tk8tL
+ W1EQxv1bLIItKBFctUQsSEQkKvVVRVFaiC/c6UKkxW60lqAbEaSKj5WoiLFWEzQPQ4wGora18ZEbozUR
+ jamvgI+F+nlnJLmJxpVe+Dhzz3zzO3MGTkzMc3wV9SN4VzGBykYzqj5ZUf3ZFlWUIw9565o0CJ2t/PAD
+ jo3zCK0IlwjX/Xxm+agEKKzVw2w/YVl/nYZWioP/4TmKC6qnJECWyogxwwkmZv3wHVxxJx7vDU4DF3C6
+ /RC2jrHy94r39JZ99io/6iSAotyE7tEj9Gv22LRgP4Nj7Rz7/gD0827Ylr0wWwMQhGvoTLvsTSsNA6QU
+ GfG15wBt/TtsmtIfY0bshgq1JhdrSHPIXQyPb7P3dY5B6kCmnIaqyYuGdhefRKdEyOiFTtSk1ofvAxvs
+ Tcz8KQFepuuQlO+CvMSOzl4P3Dv/sfTHDcf6nSimvc6uNdTUz0OWLyBeEQXw5r0N6o5/PLhV5y4XBuXc
+ 3MO31t+PA2S56yBAS/s2VgVfRDFBCEgAVa3lYQfUTnLeMgOa1aJZBFDBfQUBiTlLkVcgQEL2IkNSiyxQ
+ lC3craVzIaUXz+Jt7gxPn7xxqYPSEGPlfXiVYQCRaUCPSrwmFZP3hbxXAtDDIAhRSdRRNAXz5P2i1kqA
+ p7zoW0qpPco/7zuwAAAAAElFTkSuQmCC
+</value>
+ </data>
+ <metadata name="BrowseResourceDataFile.TrayLocation" type="System.Drawing.Point, \
System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + \
<value>215, 17</value> + </metadata>
+ <metadata name="SaveResourceDataFile.TrayLocation" type="System.Drawing.Point, \
System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + \
<value>389, 17</value> + </metadata>
+ <data name="AddResourceButton.Image" type="System.Drawing.Bitmap, System.Drawing" \
mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>
+ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
+ YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAhhJREFUOE99kt9L
+ U2Ecxif7SxwlCRGVF6VF5DCiCLuJrqJuoo3TVYsKiyyTUIKKdAUVtH6Ji2gsDepiLVo7IGOWbHncKHVH
+ bWBsTg5rusX21PPaWZyd1QsPnPfwfT/v83zfb4Pl94p+VFDI5yxWq5Vb0yqXy+JfqVS0dHTYG0wFsjyG
+ SqWC/I/SfxUIBOHzvURdAA9nl4sGaQUNmdzqH60gGHwPJamaIXSgA+a+LSH5dUEUqul89Zt7v3+0KoOT
+ egBCMrkVsD+EzqrfBSwUkpFS02CcapR/AXjwUyxZjcU44xNTwq0BQOpq8aco1CPwNkaoBURin+sDantA
+ AGGMEP8yjYHXd3Dm2Vm4PKcRViJmB/UAi5kCvG992Ou243L4PO5N3sb18T4cetoJ56Djbw8YQQfonacD
+ 2m290QKXLOFqvBtKehLDicfoip6C/WFbfQBt88moXm8f2oY2wzF2FF0RCVktKwAnI8ex/1U7Dg7uWYPo
+ DthlHRBTVDgfSGjxNkNOhcRhTiuHi9+OwDFs7F+3BuCEMQLffWYui4n4rJDr0TlsGWoSt99N9GK5sIR3
+ 8yO4Gb+EfaO7RDyDA+anZhY0Ib/8AZvcNnSGm+BMNGNRm4cndQGHoxuwbXg9Lj7vNjugC3ZfF4t2PmmE
+ NNUIT/oIeqZ34MAbG3Zf225sImNQnLBaXbnfIxrWOmBD+62tkNwn8GLELwC/ACt9xxnW2QbqAAAAAElF
+ TkSuQmCC
+</value>
+ </data>
+</root>
\ No newline at end of file
Modified: trunk/Tools/Maestro/Maestro/Update DEBUG Environment.bat
===================================================================
--- trunk/Tools/Maestro/Maestro/Update DEBUG Environment.bat 2008-08-10 16:18:21 UTC \
(rev 3268)
+++ trunk/Tools/Maestro/Maestro/Update DEBUG Environment.bat 2008-08-12 20:37:11 UTC \
(rev 3269) @@ -1,9 +1,9 @@
xcopy /Y EditorMap.xml bin\debug\
xcopy /Y ProviderMap.xml bin\debug\
xcopy /Y /E images\stdicons bin\debug\stdicons\
-xcopy /Y /E images\webstudio bin\debug\webstudio\
+xcopy /Y /E images\webstudio bin\debug\WebStudio\
-xcopy /Y /E resourceeditors\templates bin\debug\templates\
+xcopy /Y /E resourceeditors\templates bin\debug\Templates\
xcopy /Y /E ..\maestroapi\Schemas bin\debug\Schemas\
xcopy /Y /E Localization bin\debug\Localization\
Modified: trunk/Tools/Maestro/Maestro/Update RELEASE Environment.bat
===================================================================
--- trunk/Tools/Maestro/Maestro/Update RELEASE Environment.bat 2008-08-10 16:18:21 \
UTC (rev 3268)
+++ trunk/Tools/Maestro/Maestro/Update RELEASE Environment.bat 2008-08-12 20:37:11 \
UTC (rev 3269) @@ -1,9 +1,9 @@
xcopy /Y EditorMap.xml bin\release\
xcopy /Y ProviderMap.xml bin\release\
xcopy /Y /E images\stdicons bin\release\stdicons\
-xcopy /Y /E images\webstudio bin\release\webstudio\
+xcopy /Y /E images\webstudio bin\release\WebStudio\
-xcopy /Y /E resourceeditors\templates bin\release\templates\
+xcopy /Y /E resourceeditors\templates bin\release\Templates\
xcopy /Y /E ..\maestroapi\Schemas bin\release\Schemas\
xcopy /Y /E Localization bin\release\Localization\
Modified: trunk/Tools/Maestro/MaestroAPI/Generated/ResourcePackageManifest-1.0.0.cs
===================================================================
--- trunk/Tools/Maestro/MaestroAPI/Generated/ResourcePackageManifest-1.0.0.cs 2008-08-10 \
16:18:21 UTC (rev 3268)
+++ trunk/Tools/Maestro/MaestroAPI/Generated/ResourcePackageManifest-1.0.0.cs 2008-08-12 \
20:37:11 UTC (rev 3269) @@ -198,6 +198,29 @@
base.InnerList[idx] = value;
}
}
+
+ public ResourcePackageManifestOperationsOperationParametersParameter \
this[string idx] + {
+ get
+ {
+ ResourcePackageManifestOperationsOperationParametersParameter \
secondBest = null; + foreach \
(ResourcePackageManifestOperationsOperationParametersParameter op in base.InnerList) \
+ if (op.Name == idx) + return op;
+ else if (secondBest == null && \
op.Name.ToLower().Equals(idx.ToLower())) + secondBest = op;
+
+ return secondBest;
+ }
+ set
+ {
+ ResourcePackageManifestOperationsOperationParametersParameter op = \
this[idx]; + if (op == null)
+ this.Add(value);
+ else
+ this[base.InnerList.IndexOf(op)] = value;
+ }
+ }
public int Add(ResourcePackageManifestOperationsOperationParametersParameter \
value) { return base.InnerList.Add(value);
_______________________________________________
mapguide-commits mailing list
mapguide-commits@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-commits
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic