diff --git a/CSharp/Plugins/UniversalEditor.Essential/DataFormats/PropertyList/ExtensibleConfiguration/ExtensibleConfigurationDataFormat.cs b/CSharp/Plugins/UniversalEditor.Essential/DataFormats/PropertyList/ExtensibleConfiguration/ExtensibleConfigurationDataFormat.cs index 34ce5aa5..78a525c8 100644 --- a/CSharp/Plugins/UniversalEditor.Essential/DataFormats/PropertyList/ExtensibleConfiguration/ExtensibleConfigurationDataFormat.cs +++ b/CSharp/Plugins/UniversalEditor.Essential/DataFormats/PropertyList/ExtensibleConfiguration/ExtensibleConfigurationDataFormat.cs @@ -157,25 +157,37 @@ namespace UniversalEditor.DataFormats.PropertyList.ExtensibleConfiguration private void WriteGroup(Writer tw, Group group, int indent) { string indents = new string(' ', indent * this.mvarIndentLength); - tw.WriteLine(indents + group.Name); - tw.WriteLine(indents + "{"); + tw.Write(indents + group.Name); + if (mvarSettings.InlineGroupStart) + { + tw.Write(' '); + tw.Write(mvarSettings.GroupStart); + tw.WriteLine(); + } + else + { + tw.WriteLine(); + tw.WriteLine(indents + mvarSettings.GroupStart); + } foreach (Property p in group.Properties) { tw.WriteLine(string.Concat(new object[] { indents, new string(' ', this.mvarIndentLength), - p.Name, - "=\"", + p.Name, + mvarSettings.PropertyNameValueSeparator, + mvarSettings.PropertyValuePrefix, p.Value, - "\";" + mvarSettings.PropertyValueSuffix, + mvarSettings.PropertySeparator })); } foreach (Group g in group.Groups) { this.WriteGroup(tw, g, indent + 1); } - tw.WriteLine(indents + "}"); + tw.WriteLine(indents + mvarSettings.GroupEnd); } } } diff --git a/CSharp/Plugins/UniversalEditor.Essential/DataFormats/PropertyList/ExtensibleConfiguration/ExtensibleConfigurationSettings.cs b/CSharp/Plugins/UniversalEditor.Essential/DataFormats/PropertyList/ExtensibleConfiguration/ExtensibleConfigurationSettings.cs index 9a031c9b..5a9b4116 100644 --- a/CSharp/Plugins/UniversalEditor.Essential/DataFormats/PropertyList/ExtensibleConfiguration/ExtensibleConfigurationSettings.cs +++ b/CSharp/Plugins/UniversalEditor.Essential/DataFormats/PropertyList/ExtensibleConfiguration/ExtensibleConfigurationSettings.cs @@ -39,5 +39,12 @@ namespace UniversalEditor.DataFormats.PropertyList.ExtensibleConfiguration private string mvarGroupEnd = "}"; public string GroupEnd { get { return mvarGroupEnd; } set { mvarGroupEnd = value; } } + + private bool mvarInlineGroupStart = true; + /// + /// Determines whether the group start character (default '{') should be placed on the same line as the group name. + /// + public bool InlineGroupStart { get { return mvarInlineGroupStart; } set { mvarInlineGroupStart = value; } } + } } diff --git a/CSharp/Plugins/UniversalEditor.Plugins.RebelSoftware/DataFormats/RebelSoftware/InstallationScript/IAPDataFormat.cs b/CSharp/Plugins/UniversalEditor.Plugins.RebelSoftware/DataFormats/RebelSoftware/InstallationScript/IAPDataFormat.cs new file mode 100644 index 00000000..8a558817 --- /dev/null +++ b/CSharp/Plugins/UniversalEditor.Plugins.RebelSoftware/DataFormats/RebelSoftware/InstallationScript/IAPDataFormat.cs @@ -0,0 +1,125 @@ +using System; +using System.Collections.Generic; +using System.Text; + +using UniversalEditor.ObjectModels.PropertyList; +using UniversalEditor.DataFormats.PropertyList.ExtensibleConfiguration; + +using UniversalEditor.ObjectModels.RebelSoftware.InstallationScript; +using UniversalEditor.ObjectModels.RebelSoftware.InstallationScript.Dialogs; +using UniversalEditor.ObjectModels.RebelSoftware.InstallationScript.Actions; + +namespace UniversalEditor.DataFormats.RebelSoftware.InstallationScript +{ + public class IAPDataFormat : ExtensibleConfigurationDataFormat + { + public IAPDataFormat() + { + // quote characters are literally part of the property value + this.Settings.PropertyValuePrefix = String.Empty; + this.Settings.PropertyValueSuffix = String.Empty; + + // IAP setup PUKES if the open brace is on the next line :( + this.Settings.InlineGroupStart = true; + + // No separator except space between name and value + this.Settings.PropertyNameValueSeparator = " "; + } + + protected override void BeforeLoadInternal(Stack objectModels) + { + base.BeforeLoadInternal(objectModels); + } + protected override void AfterLoadInternal(Stack objectModels) + { + base.AfterLoadInternal(objectModels); + } + protected override void BeforeSaveInternal(Stack objectModels) + { + InstallationScriptObjectModel script = (objectModels.Pop() as InstallationScriptObjectModel); + + PropertyListObjectModel plom = new PropertyListObjectModel(); + + Group IA_Globals = new Group("IA_Globals"); + IA_Globals.Properties.Add("name", script.ProductName); + IA_Globals.Properties.Add("version", script.ProductVersion.ToString()); + IA_Globals.Properties.Add("diskspace", "60"); // not sure what this is + if (!String.IsNullOrEmpty(script.BackgroundImageFileName)) + { + IA_Globals.Properties.Add("bgbitmap", script.BackgroundImageFileName); + } + plom.Groups.Add(IA_Globals); + + foreach (Dialog dialog in script.Dialogs) + { + // TODO: you can actually specify multiple IA_*Dialog definitions for the same dialog, but + // the program will only use the properties of the last-defined one + + Group IA_Dialog = new Group(); + + if (dialog is WelcomeDialog) + { + IA_Dialog.Name = "IA_WelcomeDialog"; + } + else if (dialog is LicenseDialog) + { + LicenseDialog dlg = (dialog as LicenseDialog); + IA_Dialog.Name = "IA_LicenseDialog"; + IA_Dialog.Properties.Add("file", dlg.LicenseFileName); + } + else if (dialog is DestinationDialog) + { + DestinationDialog dlg = (dialog as DestinationDialog); + IA_Dialog.Name = "IA_DestinationDialog"; + IA_Dialog.Properties.Add("defaultdir", dlg.DefaultDirectory); + } + else if (dialog is StartCopyingDialog) + { + IA_Dialog.Name = "IA_StartCopyingDialog"; + } + else if (dialog is CopyFilesDialog) + { + CopyFilesDialog dlg = (dialog as CopyFilesDialog); + IA_Dialog.Name = "IA_CopyFilesDialog"; + foreach (var action in dlg.Actions) + { + if (action is UnzipAction) + { + UnzipAction act = (action as UnzipAction); + IA_Dialog.Properties.Add("unzip", act.FileName); + } + } + } + else if (dialog is FinishDialog) + { + FinishDialog dlg = (dialog as FinishDialog); + IA_Dialog.Name = "IA_FinishDialog"; + if (!String.IsNullOrEmpty(dlg.ReadmeFileName)) + { + IA_Dialog.Properties.Add("readme", dlg.ReadmeFileName); + } + if (dlg.RequireReboot) + { + IA_Dialog.Properties.Add("reboot", "yes"); + } + if (!String.IsNullOrEmpty(dlg.ExecutableFileName)) + { + IA_Dialog.Properties.Add("exe", dlg.ExecutableFileName); + } + if (!String.IsNullOrEmpty(dlg.ExecutableWorkingDirectory)) + { + IA_Dialog.Properties.Add("exeworkdir", dlg.ExecutableWorkingDirectory); + } + } + + plom.Groups.Add(IA_Dialog); + } + + Group IA_StartMenu = new Group("IA_StartMenu"); + IA_StartMenu.Properties.Add("name", script.StartMenuDirectoryName); + plom.Groups.Add(IA_StartMenu); + + objectModels.Push(plom); + } + } +} diff --git a/CSharp/Plugins/UniversalEditor.Plugins.RebelSoftware/ObjectModels/RebelSoftware/InstallationScript/Action.cs b/CSharp/Plugins/UniversalEditor.Plugins.RebelSoftware/ObjectModels/RebelSoftware/InstallationScript/Action.cs new file mode 100644 index 00000000..ba14a4e2 --- /dev/null +++ b/CSharp/Plugins/UniversalEditor.Plugins.RebelSoftware/ObjectModels/RebelSoftware/InstallationScript/Action.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace UniversalEditor.Plugins.RebelSoftware.ObjectModels.InstallationScript +{ + public abstract class Action : ICloneable + { + public class ActionCollection + : System.Collections.ObjectModel.Collection + { + + } + + public abstract object Clone(); + } +} diff --git a/CSharp/Plugins/UniversalEditor.Plugins.RebelSoftware/ObjectModels/RebelSoftware/InstallationScript/Actions/UnzipAction.cs b/CSharp/Plugins/UniversalEditor.Plugins.RebelSoftware/ObjectModels/RebelSoftware/InstallationScript/Actions/UnzipAction.cs new file mode 100644 index 00000000..58f6004a --- /dev/null +++ b/CSharp/Plugins/UniversalEditor.Plugins.RebelSoftware/ObjectModels/RebelSoftware/InstallationScript/Actions/UnzipAction.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace UniversalEditor.ObjectModels.RebelSoftware.InstallationScript.Actions +{ + public class UnzipAction : Action + { + private string mvarFileName = String.Empty; + /// + /// The name of the archive file to unzip using ZAP format. + /// + public string FileName { get { return mvarFileName; } set { mvarFileName = value; } } + + public override object Clone() + { + UnzipAction clone = new UnzipAction(); + clone.FileName = (mvarFileName.Clone() as string); + return clone; + } + } +} diff --git a/CSharp/Plugins/UniversalEditor.Plugins.RebelSoftware/ObjectModels/RebelSoftware/InstallationScript/Dialog.cs b/CSharp/Plugins/UniversalEditor.Plugins.RebelSoftware/ObjectModels/RebelSoftware/InstallationScript/Dialog.cs new file mode 100644 index 00000000..1597a892 --- /dev/null +++ b/CSharp/Plugins/UniversalEditor.Plugins.RebelSoftware/ObjectModels/RebelSoftware/InstallationScript/Dialog.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace UniversalEditor.Plugins.RebelSoftware.ObjectModels.InstallationScript +{ + public abstract class Dialog : ICloneable + { + public class DialogCollection + : System.Collections.ObjectModel.Collection + { + + } + + public abstract object Clone(); + } +} diff --git a/CSharp/Plugins/UniversalEditor.Plugins.RebelSoftware/ObjectModels/RebelSoftware/InstallationScript/Dialogs/CopyFilesDialog.cs b/CSharp/Plugins/UniversalEditor.Plugins.RebelSoftware/ObjectModels/RebelSoftware/InstallationScript/Dialogs/CopyFilesDialog.cs new file mode 100644 index 00000000..e0faa513 --- /dev/null +++ b/CSharp/Plugins/UniversalEditor.Plugins.RebelSoftware/ObjectModels/RebelSoftware/InstallationScript/Dialogs/CopyFilesDialog.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace UniversalEditor.ObjectModels.RebelSoftware.InstallationScript.Dialogs +{ + public class CopyFilesDialog : Dialog + { + private Action.ActionCollection mvarActions = new Action.ActionCollection(); + public Action.ActionCollection Actions { get { return mvarActions; } } + + public override object Clone() + { + CopyFilesDialog clone = new CopyFilesDialog(); + foreach (Action action in mvarActions) + { + clone.Actions.Add(action.Clone() as Action); + } + return clone; + } + } +} diff --git a/CSharp/Plugins/UniversalEditor.Plugins.RebelSoftware/ObjectModels/RebelSoftware/InstallationScript/Dialogs/DestinationDialog.cs b/CSharp/Plugins/UniversalEditor.Plugins.RebelSoftware/ObjectModels/RebelSoftware/InstallationScript/Dialogs/DestinationDialog.cs new file mode 100644 index 00000000..7fc158fc --- /dev/null +++ b/CSharp/Plugins/UniversalEditor.Plugins.RebelSoftware/ObjectModels/RebelSoftware/InstallationScript/Dialogs/DestinationDialog.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace UniversalEditor.ObjectModels.RebelSoftware.InstallationScript.Dialogs +{ + public class DestinationDialog : Dialog + { + private string mvarDefaultDirectory = String.Empty; + public string DefaultDirectory { get { return mvarDefaultDirectory; } set { mvarDefaultDirectory = value; } } + + public override object Clone() + { + DestinationDialog clone = new DestinationDialog(); + clone.DefaultDirectory = (mvarDefaultDirectory.Clone() as string); + return clone; + } + } +} diff --git a/CSharp/Plugins/UniversalEditor.Plugins.RebelSoftware/ObjectModels/RebelSoftware/InstallationScript/Dialogs/FinishDialog.cs b/CSharp/Plugins/UniversalEditor.Plugins.RebelSoftware/ObjectModels/RebelSoftware/InstallationScript/Dialogs/FinishDialog.cs new file mode 100644 index 00000000..caf1765e --- /dev/null +++ b/CSharp/Plugins/UniversalEditor.Plugins.RebelSoftware/ObjectModels/RebelSoftware/InstallationScript/Dialogs/FinishDialog.cs @@ -0,0 +1,44 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace UniversalEditor.ObjectModels.RebelSoftware.InstallationScript.Dialogs +{ + public class FinishDialog : Dialog + { + private string mvarReadmeFileName = String.Empty; + /// + /// The file name of the Readme file to offer upon installation completion, relative to the installation directory. + /// + public string ReadmeFileName { get { return mvarReadmeFileName; } set { mvarReadmeFileName = value; } } + + private bool mvarRequireReboot = false; + /// + /// True if a reboot is required after installation. + /// + public bool RequireReboot { get { return mvarRequireReboot; } set { mvarRequireReboot = value; } } + + private string mvarExecutableFileName = String.Empty; + /// + /// The file name of the executable file to launch upon installation completion, relative to the installation directory. + /// + public string ExecutableFileName { get { return mvarExecutableFileName; } set { mvarExecutableFileName = value; } } + + private string mvarExecutableWorkingDirectory = String.Empty; + /// + /// The file name of the executable file to launch upon installation completion, relative to the installation directory. + /// + public string ExecutableWorkingDirectory { get { return mvarExecutableWorkingDirectory; } set { mvarExecutableWorkingDirectory = value; } } + + public override object Clone() + { + FinishDialog clone = new FinishDialog(); + clone.ReadmeFileName = (mvarReadmeFileName.Clone() as string); + clone.RequireReboot = mvarRequireReboot; + clone.ExecutableFileName = (mvarExecutableFileName.Clone() as string); + clone.ExecutableWorkingDirectory = (mvarExecutableWorkingDirectory.Clone() as string); + return clone; + } + } +} diff --git a/CSharp/Plugins/UniversalEditor.Plugins.RebelSoftware/ObjectModels/RebelSoftware/InstallationScript/Dialogs/LicenseDialog.cs b/CSharp/Plugins/UniversalEditor.Plugins.RebelSoftware/ObjectModels/RebelSoftware/InstallationScript/Dialogs/LicenseDialog.cs new file mode 100644 index 00000000..f3d668ba --- /dev/null +++ b/CSharp/Plugins/UniversalEditor.Plugins.RebelSoftware/ObjectModels/RebelSoftware/InstallationScript/Dialogs/LicenseDialog.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace UniversalEditor.ObjectModels.RebelSoftware.InstallationScript.Dialogs +{ + public class LicenseDialog : Dialog + { + private string mvarLicenseFileName = String.Empty; + public string LicenseFileName { get { return mvarLicenseFileName; } set { mvarLicenseFileName = value; } } + } +} diff --git a/CSharp/Plugins/UniversalEditor.Plugins.RebelSoftware/ObjectModels/RebelSoftware/InstallationScript/Dialogs/StartCopyingDialog.cs b/CSharp/Plugins/UniversalEditor.Plugins.RebelSoftware/ObjectModels/RebelSoftware/InstallationScript/Dialogs/StartCopyingDialog.cs new file mode 100644 index 00000000..a9811421 --- /dev/null +++ b/CSharp/Plugins/UniversalEditor.Plugins.RebelSoftware/ObjectModels/RebelSoftware/InstallationScript/Dialogs/StartCopyingDialog.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace UniversalEditor.ObjectModels.RebelSoftware.InstallationScript.Dialogs +{ + public class StartCopyingDialog : Dialog + { + public override object Clone() + { + StartCopyingDialog clone = new StartCopyingDialog(); + return clone; + } + } +} diff --git a/CSharp/Plugins/UniversalEditor.Plugins.RebelSoftware/ObjectModels/RebelSoftware/InstallationScript/Dialogs/WelcomeDialog.cs b/CSharp/Plugins/UniversalEditor.Plugins.RebelSoftware/ObjectModels/RebelSoftware/InstallationScript/Dialogs/WelcomeDialog.cs new file mode 100644 index 00000000..924a72df --- /dev/null +++ b/CSharp/Plugins/UniversalEditor.Plugins.RebelSoftware/ObjectModels/RebelSoftware/InstallationScript/Dialogs/WelcomeDialog.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace UniversalEditor.ObjectModels.RebelSoftware.InstallationScript.Dialogs +{ + public class WelcomeDialog : Dialog + { + public override object Clone() + { + WelcomeDialog clone = new WelcomeDialog(); + return clone; + } + } +} diff --git a/CSharp/Plugins/UniversalEditor.Plugins.RebelSoftware/ObjectModels/RebelSoftware/InstallationScript/InstallationScriptObjectModel.cs b/CSharp/Plugins/UniversalEditor.Plugins.RebelSoftware/ObjectModels/RebelSoftware/InstallationScript/InstallationScriptObjectModel.cs new file mode 100644 index 00000000..b8d3e234 --- /dev/null +++ b/CSharp/Plugins/UniversalEditor.Plugins.RebelSoftware/ObjectModels/RebelSoftware/InstallationScript/InstallationScriptObjectModel.cs @@ -0,0 +1,47 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace UniversalEditor.Plugins.RebelSoftware.ObjectModels.InstallationScript +{ + public class InstallationScriptObjectModel : ObjectModel + { + private string mvarProductName = String.Empty; + public string ProductName { get { return mvarProductName; } set { mvarProductName = value; } } + + private Version mvarProductVersion = new Version(1, 0); + public Version ProductVersion { get { return mvarProductVersion; } set { mvarProductVersion = value; } } + + private string mvarBackgroundImageFileName = String.Empty; + public string BackgroundImageFileName { get { return mvarBackgroundImageFileName; } set { mvarBackgroundImageFileName = value; } } + + private Dialog.DialogCollection mvarDialogs = new Dialog.DialogCollection(); + public Dialog.DialogCollection Dialogs { get { return mvarDialogs; } } + + private string mvarStartMenuDirectoryName = String.Empty; + public string StartMenuDirectoryName { get { return mvarStartMenuDirectoryName; } set { mvarStartMenuDirectoryName = value; } } + + public override void Clear() + { + mvarProductName = String.Empty; + mvarProductVersion = new Version(1, 0); + mvarBackgroundImageFileName = String.Empty; + mvarDialogs.Clear(); + } + + public override void CopyTo(ObjectModel where) + { + InstallationScriptObjectModel clone = (where as InstallationScriptObjectModel); + if (clone == null) throw new InvalidOperationException(); + + clone.ProductName = (mvarProductName.Clone() as string); + clone.ProductVersion = (mvarProductVersion.Clone() as Version); + clone.BackgroundImageFileName = (mvarBackgroundImageFileName.Clone() as string); + foreach (Dialog dialog in mvarDialogs) + { + clone.Dialogs.Add(dialog.Clone() as Dialog); + } + } + } +} diff --git a/CSharp/Plugins/UniversalEditor.Plugins.RebelSoftware/Properties/AssemblyInfo.cs b/CSharp/Plugins/UniversalEditor.Plugins.RebelSoftware/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..2481a590 --- /dev/null +++ b/CSharp/Plugins/UniversalEditor.Plugins.RebelSoftware/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("UniversalEditor.Plugins.RebelSoftware")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("City of Orlando")] +[assembly: AssemblyProduct("UniversalEditor.Plugins.RebelSoftware")] +[assembly: AssemblyCopyright("Copyright © City of Orlando 2015")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("58043ce2-7473-42e5-a846-8a6d71db18a7")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/CSharp/Plugins/UniversalEditor.Plugins.RebelSoftware/UniversalEditor.Plugins.RebelSoftware.csproj b/CSharp/Plugins/UniversalEditor.Plugins.RebelSoftware/UniversalEditor.Plugins.RebelSoftware.csproj new file mode 100644 index 00000000..7815d21a --- /dev/null +++ b/CSharp/Plugins/UniversalEditor.Plugins.RebelSoftware/UniversalEditor.Plugins.RebelSoftware.csproj @@ -0,0 +1,70 @@ + + + + + Debug + AnyCPU + {311885BE-3FAF-430B-91B2-6EC135D3A8AB} + Library + Properties + UniversalEditor + UniversalEditor.Plugins.RebelSoftware + v3.5 + 512 + + + + true + full + false + ..\..\Output\Debug\Plugins\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + ..\..\Output\Debug\Plugins\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + + + {2d4737e6-6d95-408a-90db-8dff38147e85} + UniversalEditor.Core + + + {30467e5c-05bc-4856-aadc-13906ef4cadd} + UniversalEditor.Essential + + + + + + \ No newline at end of file diff --git a/CSharp/UniversalEditor.Plugins.RebelSoftware.UserInterface.WindowsForms/Editors/RebelSoftware/InstallationScript/InstallationScriptEditor.Designer.cs b/CSharp/UniversalEditor.Plugins.RebelSoftware.UserInterface.WindowsForms/Editors/RebelSoftware/InstallationScript/InstallationScriptEditor.Designer.cs new file mode 100644 index 00000000..8ac30e25 --- /dev/null +++ b/CSharp/UniversalEditor.Plugins.RebelSoftware.UserInterface.WindowsForms/Editors/RebelSoftware/InstallationScript/InstallationScriptEditor.Designer.cs @@ -0,0 +1,57 @@ +namespace UniversalEditor.Editors.RebelSoftware.InstallationScript +{ + partial class InstallationScriptEditor + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.tvExplorer = new System.Windows.Forms.TreeView(); + this.SuspendLayout(); + // + // tvExplorer + // + this.tvExplorer.Dock = System.Windows.Forms.DockStyle.Fill; + this.tvExplorer.Location = new System.Drawing.Point(0, 0); + this.tvExplorer.Name = "tvExplorer"; + this.tvExplorer.Size = new System.Drawing.Size(544, 400); + this.tvExplorer.TabIndex = 0; + // + // InstallationScriptEditor + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.tvExplorer); + this.Name = "InstallationScriptEditor"; + this.Size = new System.Drawing.Size(544, 400); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.TreeView tvExplorer; + } +} diff --git a/CSharp/UniversalEditor.Plugins.RebelSoftware.UserInterface.WindowsForms/Editors/RebelSoftware/InstallationScript/InstallationScriptEditor.cs b/CSharp/UniversalEditor.Plugins.RebelSoftware.UserInterface.WindowsForms/Editors/RebelSoftware/InstallationScript/InstallationScriptEditor.cs new file mode 100644 index 00000000..1f1ab7e3 --- /dev/null +++ b/CSharp/UniversalEditor.Plugins.RebelSoftware.UserInterface.WindowsForms/Editors/RebelSoftware/InstallationScript/InstallationScriptEditor.cs @@ -0,0 +1,47 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Text; +using System.Windows.Forms; + +using UniversalEditor.UserInterface.WindowsForms; + +using UniversalEditor.Plugins.RebelSoftware.ObjectModels.InstallationScript; +using UniversalEditor.ObjectModels.RebelSoftware.InstallationScript.Dialogs; + +namespace UniversalEditor.Editors.RebelSoftware.InstallationScript +{ + public partial class InstallationScriptEditor : Editor + { + public InstallationScriptEditor() + { + InitializeComponent(); + } + + protected override void OnObjectModelChanged(EventArgs e) + { + base.OnObjectModelChanged(e); + + tvExplorer.Nodes.Clear(); + + InstallationScriptObjectModel script = (ObjectModel as InstallationScriptObjectModel); + if (script == null) return; + + TreeNode nodeDialogs = new TreeNode("Dialogs"); + + foreach (Dialog dialog in script.Dialogs) + { + TreeNode tn = new TreeNode(); + if (dialog is WelcomeDialog) + { + tn.Text = "Welcome"; + } + nodeDialogs.Nodes.Add(tn); + } + + tvExplorer.Nodes.Add(nodeDialogs); + + } + } +} diff --git a/CSharp/UniversalEditor.Plugins.RebelSoftware.UserInterface.WindowsForms/Editors/RebelSoftware/InstallationScript/InstallationScriptEditor.resx b/CSharp/UniversalEditor.Plugins.RebelSoftware.UserInterface.WindowsForms/Editors/RebelSoftware/InstallationScript/InstallationScriptEditor.resx new file mode 100644 index 00000000..7080a7d1 --- /dev/null +++ b/CSharp/UniversalEditor.Plugins.RebelSoftware.UserInterface.WindowsForms/Editors/RebelSoftware/InstallationScript/InstallationScriptEditor.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/CSharp/UniversalEditor.Plugins.RebelSoftware.UserInterface.WindowsForms/Properties/AssemblyInfo.cs b/CSharp/UniversalEditor.Plugins.RebelSoftware.UserInterface.WindowsForms/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..ac78a5b0 --- /dev/null +++ b/CSharp/UniversalEditor.Plugins.RebelSoftware.UserInterface.WindowsForms/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("UniversalEditor.Plugins.RebelSoftware.UserInterface.WindowsForms")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("City of Orlando")] +[assembly: AssemblyProduct("UniversalEditor.Plugins.RebelSoftware.UserInterface.WindowsForms")] +[assembly: AssemblyCopyright("Copyright © City of Orlando 2015")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("a8f10fb1-daf0-42ba-be16-65243f8159c5")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/CSharp/UniversalEditor.Plugins.RebelSoftware.UserInterface.WindowsForms/UniversalEditor.Plugins.RebelSoftware.UserInterface.WindowsForms.csproj b/CSharp/UniversalEditor.Plugins.RebelSoftware.UserInterface.WindowsForms/UniversalEditor.Plugins.RebelSoftware.UserInterface.WindowsForms.csproj new file mode 100644 index 00000000..7e31ce85 --- /dev/null +++ b/CSharp/UniversalEditor.Plugins.RebelSoftware.UserInterface.WindowsForms/UniversalEditor.Plugins.RebelSoftware.UserInterface.WindowsForms.csproj @@ -0,0 +1,54 @@ + + + + + Debug + AnyCPU + {D804B16F-289B-4846-AE4A-6070F84389F6} + Library + Properties + UniversalEditor + UniversalEditor.Plugins.RebelSoftware.UserInterface.WindowsForms + v3.5 + 512 + + + + true + full + false + ..\..\..\Output\Debug\Plugins\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + ..\..\..\Output\Release\Plugins\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + \ No newline at end of file