From c44c73c3370502b3f91792a030ec01aa39abbd35 Mon Sep 17 00:00:00 2001 From: Scionwest_cp Date: Thu, 5 Nov 2009 19:44:22 -0800 Subject: [PATCH] Initial Check in of Mud Designer. Includes initial Designer HOME and partial Project Manager --- MUDEngine/Engine.cs | 32 +++ MUDEngine/Environment/Door.cs | 14 ++ MUDEngine/Environment/Realm.cs | 22 +++ MUDEngine/Environment/Room.cs | 15 ++ MUDEngine/Environment/Zone.cs | 14 ++ MUDEngine/MUDEngine.csproj | 67 +++++++ MUDEngine/ProjectInformation.cs | 83 ++++++++ MUDEngine/Properties/AssemblyInfo.cs | 36 ++++ MUDEngine/XmlSerialization.cs | 42 ++++ MudDesigner.sln | 32 +++ MudDesigner/EditorList.txt | 14 ++ MudDesigner/MudDesigner.csproj | 132 +++++++++++++ MudDesigner/MudDesigner.csproj.user | 23 +++ MudDesigner/Program.cs | 21 ++ MudDesigner/Properties/AssemblyInfo.cs | 36 ++++ MudDesigner/Properties/Resources.Designer.cs | 71 +++++++ MudDesigner/Properties/Resources.resx | 117 +++++++++++ MudDesigner/Properties/Settings.Designer.cs | 26 +++ MudDesigner/Properties/Settings.settings | 5 + MudDesigner/frmMain.Designer.cs | 127 ++++++++++++ MudDesigner/frmMain.cs | 62 ++++++ MudDesigner/frmMain.resx | 123 ++++++++++++ Project Manager/Program.cs | 36 ++++ Project Manager/Project Manager.csproj | 97 ++++++++++ Project Manager/Project Manager.csproj.user | 10 + Project Manager/Properties/AssemblyInfo.cs | 36 ++++ .../Properties/Resources.Designer.cs | 63 ++++++ Project Manager/Properties/Resources.resx | 117 +++++++++++ .../Properties/Settings.Designer.cs | 26 +++ Project Manager/Properties/Settings.settings | 5 + Project Manager/frmMain.Designer.cs | 183 ++++++++++++++++++ Project Manager/frmMain.cs | 49 +++++ Project Manager/frmMain.resx | 123 ++++++++++++ 33 files changed, 1859 insertions(+) create mode 100644 MUDEngine/Engine.cs create mode 100644 MUDEngine/Environment/Door.cs create mode 100644 MUDEngine/Environment/Realm.cs create mode 100644 MUDEngine/Environment/Room.cs create mode 100644 MUDEngine/Environment/Zone.cs create mode 100644 MUDEngine/MUDEngine.csproj create mode 100644 MUDEngine/ProjectInformation.cs create mode 100644 MUDEngine/Properties/AssemblyInfo.cs create mode 100644 MUDEngine/XmlSerialization.cs create mode 100644 MudDesigner.sln create mode 100644 MudDesigner/EditorList.txt create mode 100644 MudDesigner/MudDesigner.csproj create mode 100644 MudDesigner/MudDesigner.csproj.user create mode 100644 MudDesigner/Program.cs create mode 100644 MudDesigner/Properties/AssemblyInfo.cs create mode 100644 MudDesigner/Properties/Resources.Designer.cs create mode 100644 MudDesigner/Properties/Resources.resx create mode 100644 MudDesigner/Properties/Settings.Designer.cs create mode 100644 MudDesigner/Properties/Settings.settings create mode 100644 MudDesigner/frmMain.Designer.cs create mode 100644 MudDesigner/frmMain.cs create mode 100644 MudDesigner/frmMain.resx create mode 100644 Project Manager/Program.cs create mode 100644 Project Manager/Project Manager.csproj create mode 100644 Project Manager/Project Manager.csproj.user create mode 100644 Project Manager/Properties/AssemblyInfo.cs create mode 100644 Project Manager/Properties/Resources.Designer.cs create mode 100644 Project Manager/Properties/Resources.resx create mode 100644 Project Manager/Properties/Settings.Designer.cs create mode 100644 Project Manager/Properties/Settings.settings create mode 100644 Project Manager/frmMain.Designer.cs create mode 100644 Project Manager/frmMain.cs create mode 100644 Project Manager/frmMain.resx diff --git a/MUDEngine/Engine.cs b/MUDEngine/Engine.cs new file mode 100644 index 0000000..52f5573 --- /dev/null +++ b/MUDEngine/Engine.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace MUDEngine +{ + public class Engine + { + /// + /// Used to ensure that the paths needed to run the game exists. + /// + /// + public static void ValidateProjectPath(string validatedPath) + { + string dataPath = System.IO.Path.Combine(validatedPath, "Data"); + + if (!System.IO.Directory.Exists(dataPath)) + System.IO.Directory.CreateDirectory(dataPath); + + //begin checking directories + string[] paths = { "Rooms", "Zones", "Realms" }; + + foreach (var path in paths) + { + string createPath = System.IO.Path.Combine(dataPath, path); + if (!System.IO.Directory.Exists(createPath)) + System.IO.Directory.CreateDirectory(createPath); + } + } + } +} diff --git a/MUDEngine/Environment/Door.cs b/MUDEngine/Environment/Door.cs new file mode 100644 index 0000000..f685382 --- /dev/null +++ b/MUDEngine/Environment/Door.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace MUDEngine.Environment +{ + /// + /// Doors connect two Rooms together, allowing a player to move from one room to the next. + /// + public class Door + { + } +} diff --git a/MUDEngine/Environment/Realm.cs b/MUDEngine/Environment/Realm.cs new file mode 100644 index 0000000..9ed00ad --- /dev/null +++ b/MUDEngine/Environment/Realm.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace MUDEngine.Environment +{ + /// + /// A Realm contains an unlimited number of Zones, allowing developers to split their worlds up into chunks. + /// + public class Realm + { + /// + /// The name of the realm. + /// + public string Name + { + get; + set; + } + } +} diff --git a/MUDEngine/Environment/Room.cs b/MUDEngine/Environment/Room.cs new file mode 100644 index 0000000..976f433 --- /dev/null +++ b/MUDEngine/Environment/Room.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace MUDEngine.Environment +{ + /// + /// Rooms are traversable by players during gameplay. They are connected via Door objects, that allow players + /// to move from one room to another. + /// + public class Room + { + } +} diff --git a/MUDEngine/Environment/Zone.cs b/MUDEngine/Environment/Zone.cs new file mode 100644 index 0000000..18083c0 --- /dev/null +++ b/MUDEngine/Environment/Zone.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace MUDEngine.Environment +{ + /// + /// Zones contain an unlimited number of Rooms. + /// + public class Zone + { + } +} diff --git a/MUDEngine/MUDEngine.csproj b/MUDEngine/MUDEngine.csproj new file mode 100644 index 0000000..5740ac0 --- /dev/null +++ b/MUDEngine/MUDEngine.csproj @@ -0,0 +1,67 @@ + + + + Debug + AnyCPU + 9.0.21022 + 2.0 + {33828B3B-F227-4726-8FCD-3D9D780E643D} + Library + Properties + MUDEngine + MUDEngine + v3.5 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + 3.5 + + + 3.5 + + + 3.5 + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/MUDEngine/ProjectInformation.cs b/MUDEngine/ProjectInformation.cs new file mode 100644 index 0000000..6ac6943 --- /dev/null +++ b/MUDEngine/ProjectInformation.cs @@ -0,0 +1,83 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.ComponentModel; +using System.Collections.Generic; +using System.Xml.Serialization; +using System.Xml; + +namespace MUDEngine +{ + [XmlInclude(typeof(StartingLocation))] + public class ProjectInformation + { + + public struct StartingLocation + { + public Environment.Room Room; + public Environment.Zone Zone; + public Environment.Realm Realm; + } + + #region ====== Public Enumerators, Structures & Properties ====== + [Category("Company Information")] + /// + /// Gets or Sets the name of the company + /// + public string CompanyName { get; set; } + + [Category("Company Information")] + /// + /// Gets or Sets the companies website for this project + /// + public string Website { get; set; } + + [Category("Project Settings")] + [Description("The name of the project.")] + public string ProjectName { get; set; } + + [Category("Project Settings")] + /// + /// Gets or Sets if the game autosaves when the player changes locations. + /// + public bool AutoSave { get; set; } + + [Category("Project Settings")] + /// + /// Gets or Sets if room names are hidden during console output. + /// + public bool HideRoomNames { get; set; } + + [Category("Project Information")] + public string Version { get; set; } + public struct CurrencyInfo + { + public uint Amount; + public string Name; + public string Description; + public uint BaseValue; + } + + [Category("Project Information")] + [Description("Sets the amount that the base currency is valued at.")] + public uint BaseCurrencyAmount { get; set; } + + public uint BaseCurrencyName { get; set; } + + [Browsable(false)] + public List CurrencyList { get; set; } + + [Browsable(false)] + public string ProjectPath { get; set; } + + //TODO: Add Party support. + #endregion + + public StartingLocation InitialLocation + { + get; + set; + } + } +} diff --git a/MUDEngine/Properties/AssemblyInfo.cs b/MUDEngine/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..9973fe2 --- /dev/null +++ b/MUDEngine/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("MUDEngine")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("MUDEngine")] +[assembly: AssemblyCopyright("Copyright © 2009")] +[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("200fc850-33ab-4fdf-a945-b19b239a8c69")] + +// 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/MUDEngine/XmlSerialization.cs b/MUDEngine/XmlSerialization.cs new file mode 100644 index 0000000..54c840b --- /dev/null +++ b/MUDEngine/XmlSerialization.cs @@ -0,0 +1,42 @@ +#region ====== Using Statements ====== +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Reflection; +using System.Xml; +using System.Xml.Serialization; +using System.IO; +#endregion + +namespace MUDEngine +{ + public class XmlSerialization + { + public static void Save(string Filename, object o) + { + Stream stream = File.Create(Filename); + + XmlSerializer serializer = new XmlSerializer(o.GetType()); + serializer.Serialize(stream, o); + stream.Close(); + } + + + /// + /// Loads an item via Xml Deserialization + /// + /// The Xml document to deserialize. + /// + public static object Load(string Filename, object o) + { + Stream stream = File.OpenRead(Filename); + + object obj = new object(); + XmlSerializer serializer = new XmlSerializer(o.GetType()); + obj = (object)serializer.Deserialize(stream); + + stream.Close(); + return obj; + } + } +} diff --git a/MudDesigner.sln b/MudDesigner.sln new file mode 100644 index 0000000..422ebe8 --- /dev/null +++ b/MudDesigner.sln @@ -0,0 +1,32 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual C# Express 2008 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MudDesigner", "MudDesigner\MudDesigner.csproj", "{F782C36B-5A00-4BC9-BE4E-B631729DA40E}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MUDEngine", "MUDEngine\MUDEngine.csproj", "{33828B3B-F227-4726-8FCD-3D9D780E643D}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Project Manager", "Project Manager\Project Manager.csproj", "{1D77BC25-63FD-47BB-AE08-39D0D6E1272B}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {F782C36B-5A00-4BC9-BE4E-B631729DA40E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F782C36B-5A00-4BC9-BE4E-B631729DA40E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F782C36B-5A00-4BC9-BE4E-B631729DA40E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F782C36B-5A00-4BC9-BE4E-B631729DA40E}.Release|Any CPU.Build.0 = Release|Any CPU + {33828B3B-F227-4726-8FCD-3D9D780E643D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {33828B3B-F227-4726-8FCD-3D9D780E643D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {33828B3B-F227-4726-8FCD-3D9D780E643D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {33828B3B-F227-4726-8FCD-3D9D780E643D}.Release|Any CPU.Build.0 = Release|Any CPU + {1D77BC25-63FD-47BB-AE08-39D0D6E1272B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1D77BC25-63FD-47BB-AE08-39D0D6E1272B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1D77BC25-63FD-47BB-AE08-39D0D6E1272B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1D77BC25-63FD-47BB-AE08-39D0D6E1272B}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/MudDesigner/EditorList.txt b/MudDesigner/EditorList.txt new file mode 100644 index 0000000..db6f695 --- /dev/null +++ b/MudDesigner/EditorList.txt @@ -0,0 +1,14 @@ +Project Manager +Curreny Editor +Race Builder +Class Editor +Realm Editor +Zone Builder +Room Designer +Equipment Builder +Item Designer +Skill Designer +Book Editor +NPC Manager +Quest Builder +Monster Creator \ No newline at end of file diff --git a/MudDesigner/MudDesigner.csproj b/MudDesigner/MudDesigner.csproj new file mode 100644 index 0000000..c2123e4 --- /dev/null +++ b/MudDesigner/MudDesigner.csproj @@ -0,0 +1,132 @@ + + + + Debug + AnyCPU + 9.0.21022 + 2.0 + {F782C36B-5A00-4BC9-BE4E-B631729DA40E} + WinExe + Properties + MudDesigner + MudDesigner + v3.5 + 512 + publish\ + true + Disk + false + Background + 7 + Days + false + false + false + http://MudDesigner.CodePlex.com + true + 0 + 1.0.0.%2a + false + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + DEBUG;TRACE + prompt + 4 + + + + + 3.5 + + + 3.5 + + + 3.5 + + + + + + + + + + Form + + + frmMain.cs + + + + + frmMain.cs + Designer + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + False + .NET Framework 2.0 %28x86%29 + false + + + False + .NET Framework 3.0 %28x86%29 + false + + + False + .NET Framework 3.5 + true + + + False + Windows Installer 3.1 + true + + + + + + + + \ No newline at end of file diff --git a/MudDesigner/MudDesigner.csproj.user b/MudDesigner/MudDesigner.csproj.user new file mode 100644 index 0000000..f2c72e2 --- /dev/null +++ b/MudDesigner/MudDesigner.csproj.user @@ -0,0 +1,23 @@ + + + + + + + + + + + publish\ + + + + + + + + + en-US + false + + \ No newline at end of file diff --git a/MudDesigner/Program.cs b/MudDesigner/Program.cs new file mode 100644 index 0000000..405b212 --- /dev/null +++ b/MudDesigner/Program.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Windows.Forms; + +namespace MudDesigner +{ + static class Program + { + /// + /// The main entry point for the application. + /// + [STAThread] + static void Main() + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new frmMain()); + } + } +} diff --git a/MudDesigner/Properties/AssemblyInfo.cs b/MudDesigner/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..c17c9c0 --- /dev/null +++ b/MudDesigner/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("Mud Designer")] +[assembly: AssemblyDescription("Development tool set for creating MUD games")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Managed Designs")] +[assembly: AssemblyProduct("Mud Designer")] +[assembly: AssemblyCopyright("Copyright © 2009")] +[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("ba9ffbe1-8566-469a-87ea-fbdbfb17378a")] + +// 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/MudDesigner/Properties/Resources.Designer.cs b/MudDesigner/Properties/Resources.Designer.cs new file mode 100644 index 0000000..a5ec1d4 --- /dev/null +++ b/MudDesigner/Properties/Resources.Designer.cs @@ -0,0 +1,71 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:2.0.50727.4200 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace MudDesigner.Properties +{ + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources + { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() + { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager + { + get + { + if ((resourceMan == null)) + { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("MudDesigner.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture + { + get + { + return resourceCulture; + } + set + { + resourceCulture = value; + } + } + } +} diff --git a/MudDesigner/Properties/Resources.resx b/MudDesigner/Properties/Resources.resx new file mode 100644 index 0000000..ffecec8 --- /dev/null +++ b/MudDesigner/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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/MudDesigner/Properties/Settings.Designer.cs b/MudDesigner/Properties/Settings.Designer.cs new file mode 100644 index 0000000..912cb9f --- /dev/null +++ b/MudDesigner/Properties/Settings.Designer.cs @@ -0,0 +1,26 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:2.0.50727.4200 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace MudDesigner.Properties { + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default { + get { + return defaultInstance; + } + } + } +} diff --git a/MudDesigner/Properties/Settings.settings b/MudDesigner/Properties/Settings.settings new file mode 100644 index 0000000..2bd17f0 --- /dev/null +++ b/MudDesigner/Properties/Settings.settings @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/MudDesigner/frmMain.Designer.cs b/MudDesigner/frmMain.Designer.cs new file mode 100644 index 0000000..924a171 --- /dev/null +++ b/MudDesigner/frmMain.Designer.cs @@ -0,0 +1,127 @@ +namespace MudDesigner +{ + partial class frmMain + { + /// + /// 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 Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.splitContainer1 = new System.Windows.Forms.SplitContainer(); + this.btnLogo = new System.Windows.Forms.Button(); + this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); + this.btnProjectManager = new System.Windows.Forms.Button(); + this.splitContainer1.Panel1.SuspendLayout(); + this.splitContainer1.Panel2.SuspendLayout(); + this.splitContainer1.SuspendLayout(); + this.flowLayoutPanel1.SuspendLayout(); + this.SuspendLayout(); + // + // splitContainer1 + // + this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1; + this.splitContainer1.Location = new System.Drawing.Point(0, 0); + this.splitContainer1.Name = "splitContainer1"; + this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal; + // + // splitContainer1.Panel1 + // + this.splitContainer1.Panel1.Controls.Add(this.btnLogo); + // + // splitContainer1.Panel2 + // + this.splitContainer1.Panel2.Controls.Add(this.flowLayoutPanel1); + this.splitContainer1.Size = new System.Drawing.Size(627, 383); + this.splitContainer1.SplitterDistance = 154; + this.splitContainer1.TabIndex = 0; + // + // btnLogo + // + this.btnLogo.BackColor = System.Drawing.Color.Black; + this.btnLogo.Dock = System.Windows.Forms.DockStyle.Fill; + this.btnLogo.FlatAppearance.BorderColor = System.Drawing.Color.Gray; + this.btnLogo.FlatAppearance.BorderSize = 5; + this.btnLogo.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Black; + this.btnLogo.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Black; + this.btnLogo.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnLogo.Font = new System.Drawing.Font("Kootenay", 20.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnLogo.ForeColor = System.Drawing.Color.Gray; + this.btnLogo.Location = new System.Drawing.Point(0, 0); + this.btnLogo.Name = "btnLogo"; + this.btnLogo.Size = new System.Drawing.Size(627, 154); + this.btnLogo.TabIndex = 0; + this.btnLogo.Text = "MUD Designer \r\nBeta 1.0\r\n"; + this.btnLogo.UseVisualStyleBackColor = false; + // + // flowLayoutPanel1 + // + this.flowLayoutPanel1.Controls.Add(this.btnProjectManager); + this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.flowLayoutPanel1.Location = new System.Drawing.Point(0, 0); + this.flowLayoutPanel1.Name = "flowLayoutPanel1"; + this.flowLayoutPanel1.Size = new System.Drawing.Size(627, 225); + this.flowLayoutPanel1.TabIndex = 0; + // + // btnProjectManager + // + this.btnProjectManager.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnProjectManager.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnProjectManager.Location = new System.Drawing.Point(3, 3); + this.btnProjectManager.Name = "btnProjectManager"; + this.btnProjectManager.Size = new System.Drawing.Size(147, 55); + this.btnProjectManager.TabIndex = 0; + this.btnProjectManager.Text = "Project Manager"; + this.btnProjectManager.UseVisualStyleBackColor = true; + this.btnProjectManager.Click += new System.EventHandler(this.btnProjectManager_Click); + // + // frmMain + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(627, 383); + this.Controls.Add(this.splitContainer1); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "frmMain"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "Mud Designer Beta"; + this.splitContainer1.Panel1.ResumeLayout(false); + this.splitContainer1.Panel2.ResumeLayout(false); + this.splitContainer1.ResumeLayout(false); + this.flowLayoutPanel1.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.SplitContainer splitContainer1; + private System.Windows.Forms.Button btnLogo; + private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1; + private System.Windows.Forms.Button btnProjectManager; + } +} + diff --git a/MudDesigner/frmMain.cs b/MudDesigner/frmMain.cs new file mode 100644 index 0000000..928b9a8 --- /dev/null +++ b/MudDesigner/frmMain.cs @@ -0,0 +1,62 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Windows.Forms; + +namespace MudDesigner +{ + public partial class frmMain : Form + { + public const int VersionMajor = 1; + public const int VersionMinor = 0; + public const int VersionRevision = 0; + public string version = VersionMajor.ToString() + "." + VersionMinor.ToString() + "." + VersionRevision.ToString(); + public frmMain() + { + InitializeComponent(); + this.Text = "Mud Designer Beta " + version; + + if (!System.IO.Directory.Exists(Application.StartupPath + "\\Data")) + System.IO.Directory.CreateDirectory(Application.StartupPath + "\\Data"); + } + + private void btnProjectManager_Click(object sender, EventArgs e) + { + ExecuteApp("Project Manager.exe"); + } + + private void ExecuteApp(string appName) + { + System.Diagnostics.Process process = new System.Diagnostics.Process(); + System.Diagnostics.ProcessStartInfo info = new System.Diagnostics.ProcessStartInfo(); + + //If running in debug mode we need to hard-code the paths as during normal running of the apps + //all of the apps are running within the Apps directory. +#if DEBUG + info.FileName = @"C:\CodePlex\MudDesigner\Project Manager\bin\Debug\" + appName; +#else + info.FileName = appName; +#endif + info.WindowStyle = System.Diagnostics.ProcessWindowStyle.Normal; + info.WorkingDirectory = Application.StartupPath; + + //If running in debug mode we dont want the apps saving stuff outside of its debug folder +#if DEBUG + info.Arguments = ""; +#else + info.Arguments = Application.StartupPath + "\Data\"; +#endif + process.StartInfo = info; + process.Start(); + this.Hide(); + process.WaitForExit(); + + process = null; + this.Show(); + } + } +} diff --git a/MudDesigner/frmMain.resx b/MudDesigner/frmMain.resx new file mode 100644 index 0000000..9774d36 --- /dev/null +++ b/MudDesigner/frmMain.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + True + + \ No newline at end of file diff --git a/Project Manager/Program.cs b/Project Manager/Program.cs new file mode 100644 index 0000000..31e97f7 --- /dev/null +++ b/Project Manager/Program.cs @@ -0,0 +1,36 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Windows.Forms; + +namespace Project_Manager +{ + static class Program + { + internal static MUDEngine.ProjectInformation project; + + /// + /// The main entry point for the application. + /// + [STAThread] + static void Main() + { + project = new MUDEngine.ProjectInformation(); + //Make sure all our paths are created before we start working with the editor. + MUDEngine.Engine.ValidateProjectPath(Application.StartupPath); + + //check if a project file exists, or use the new instance + if (System.IO.File.Exists(Application.StartupPath + @"\project.xml")) + { + project = (MUDEngine.ProjectInformation)MUDEngine.XmlSerialization.Load(Application.StartupPath + @"\project.xml", project); + } + + //run the app + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new frmMain()); + + MUDEngine.XmlSerialization.Save(Application.StartupPath + @"\Data\project.xml", project); + } + } +} diff --git a/Project Manager/Project Manager.csproj b/Project Manager/Project Manager.csproj new file mode 100644 index 0000000..85ddca8 --- /dev/null +++ b/Project Manager/Project Manager.csproj @@ -0,0 +1,97 @@ + + + + Debug + AnyCPU + 9.0.21022 + 2.0 + {1D77BC25-63FD-47BB-AE08-39D0D6E1272B} + WinExe + Properties + ProjectManager + Project Manager + v3.5 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + 3.5 + + + 3.5 + + + 3.5 + + + + + + + + + + Form + + + frmMain.cs + + + + + frmMain.cs + Designer + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + True + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + {33828B3B-F227-4726-8FCD-3D9D780E643D} + MUDEngine + + + + + \ No newline at end of file diff --git a/Project Manager/Project Manager.csproj.user b/Project Manager/Project Manager.csproj.user new file mode 100644 index 0000000..1c7c6f7 --- /dev/null +++ b/Project Manager/Project Manager.csproj.user @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/Project Manager/Properties/AssemblyInfo.cs b/Project Manager/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..639e4a0 --- /dev/null +++ b/Project Manager/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("Project Manager")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Project Manager")] +[assembly: AssemblyCopyright("Copyright © 2009")] +[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("e97494d5-282d-4646-a7df-69a8f4c598f2")] + +// 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/Project Manager/Properties/Resources.Designer.cs b/Project Manager/Properties/Resources.Designer.cs new file mode 100644 index 0000000..bd310aa --- /dev/null +++ b/Project Manager/Properties/Resources.Designer.cs @@ -0,0 +1,63 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:2.0.50727.4200 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace ProjectManager.Properties { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ProjectManager.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + } +} diff --git a/Project Manager/Properties/Resources.resx b/Project Manager/Properties/Resources.resx new file mode 100644 index 0000000..ffecec8 --- /dev/null +++ b/Project Manager/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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/Project Manager/Properties/Settings.Designer.cs b/Project Manager/Properties/Settings.Designer.cs new file mode 100644 index 0000000..43f06d3 --- /dev/null +++ b/Project Manager/Properties/Settings.Designer.cs @@ -0,0 +1,26 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:2.0.50727.4200 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace ProjectManager.Properties { + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default { + get { + return defaultInstance; + } + } + } +} diff --git a/Project Manager/Properties/Settings.settings b/Project Manager/Properties/Settings.settings new file mode 100644 index 0000000..2bd17f0 --- /dev/null +++ b/Project Manager/Properties/Settings.settings @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/Project Manager/frmMain.Designer.cs b/Project Manager/frmMain.Designer.cs new file mode 100644 index 0000000..f136f9d --- /dev/null +++ b/Project Manager/frmMain.Designer.cs @@ -0,0 +1,183 @@ +namespace Project_Manager +{ + partial class frmMain + { + /// + /// 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 Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.splitContainer1 = new System.Windows.Forms.SplitContainer(); + this.propertyGrid1 = new System.Windows.Forms.PropertyGrid(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.groupBox2 = new System.Windows.Forms.GroupBox(); + this.comRealms = new System.Windows.Forms.ComboBox(); + this.groupBox3 = new System.Windows.Forms.GroupBox(); + this.lstZones = new System.Windows.Forms.ListBox(); + this.groupBox4 = new System.Windows.Forms.GroupBox(); + this.lstRooms = new System.Windows.Forms.ListBox(); + this.splitContainer1.Panel1.SuspendLayout(); + this.splitContainer1.Panel2.SuspendLayout(); + this.splitContainer1.SuspendLayout(); + this.groupBox1.SuspendLayout(); + this.groupBox2.SuspendLayout(); + this.groupBox3.SuspendLayout(); + this.groupBox4.SuspendLayout(); + this.SuspendLayout(); + // + // splitContainer1 + // + this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer1.Location = new System.Drawing.Point(0, 0); + this.splitContainer1.Name = "splitContainer1"; + // + // splitContainer1.Panel1 + // + this.splitContainer1.Panel1.Controls.Add(this.propertyGrid1); + // + // splitContainer1.Panel2 + // + this.splitContainer1.Panel2.Controls.Add(this.groupBox1); + this.splitContainer1.Size = new System.Drawing.Size(573, 390); + this.splitContainer1.SplitterDistance = 254; + this.splitContainer1.TabIndex = 0; + // + // propertyGrid1 + // + this.propertyGrid1.Dock = System.Windows.Forms.DockStyle.Fill; + this.propertyGrid1.Location = new System.Drawing.Point(0, 0); + this.propertyGrid1.Name = "propertyGrid1"; + this.propertyGrid1.Size = new System.Drawing.Size(254, 390); + this.propertyGrid1.TabIndex = 0; + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.groupBox4); + this.groupBox1.Controls.Add(this.groupBox3); + this.groupBox1.Controls.Add(this.groupBox2); + this.groupBox1.Location = new System.Drawing.Point(3, 0); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(309, 208); + this.groupBox1.TabIndex = 2; + this.groupBox1.TabStop = false; + this.groupBox1.Text = "Initial Room Setup"; + // + // groupBox2 + // + this.groupBox2.Controls.Add(this.comRealms); + this.groupBox2.Location = new System.Drawing.Point(3, 16); + this.groupBox2.Name = "groupBox2"; + this.groupBox2.Size = new System.Drawing.Size(152, 42); + this.groupBox2.TabIndex = 0; + this.groupBox2.TabStop = false; + this.groupBox2.Text = "Available Realms"; + // + // comRealms + // + this.comRealms.Dock = System.Windows.Forms.DockStyle.Fill; + this.comRealms.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.comRealms.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.comRealms.FormattingEnabled = true; + this.comRealms.Location = new System.Drawing.Point(3, 16); + this.comRealms.Name = "comRealms"; + this.comRealms.Size = new System.Drawing.Size(146, 21); + this.comRealms.TabIndex = 0; + // + // groupBox3 + // + this.groupBox3.Controls.Add(this.lstZones); + this.groupBox3.Location = new System.Drawing.Point(6, 64); + this.groupBox3.Name = "groupBox3"; + this.groupBox3.Size = new System.Drawing.Size(149, 138); + this.groupBox3.TabIndex = 1; + this.groupBox3.TabStop = false; + this.groupBox3.Text = "Available Zones"; + // + // lstZones + // + this.lstZones.Dock = System.Windows.Forms.DockStyle.Fill; + this.lstZones.FormattingEnabled = true; + this.lstZones.Location = new System.Drawing.Point(3, 16); + this.lstZones.Name = "lstZones"; + this.lstZones.Size = new System.Drawing.Size(143, 108); + this.lstZones.TabIndex = 0; + // + // groupBox4 + // + this.groupBox4.Controls.Add(this.lstRooms); + this.groupBox4.Location = new System.Drawing.Point(158, 16); + this.groupBox4.Name = "groupBox4"; + this.groupBox4.Size = new System.Drawing.Size(149, 186); + this.groupBox4.TabIndex = 2; + this.groupBox4.TabStop = false; + this.groupBox4.Text = "Available Rooms"; + // + // lstRooms + // + this.lstRooms.Dock = System.Windows.Forms.DockStyle.Fill; + this.lstRooms.FormattingEnabled = true; + this.lstRooms.Location = new System.Drawing.Point(3, 16); + this.lstRooms.Name = "lstRooms"; + this.lstRooms.Size = new System.Drawing.Size(143, 160); + this.lstRooms.TabIndex = 0; + // + // frmMain + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(573, 390); + this.Controls.Add(this.splitContainer1); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "frmMain"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "Mud Designer: Project Manager"; + this.Load += new System.EventHandler(this.frmMain_Load); + this.splitContainer1.Panel1.ResumeLayout(false); + this.splitContainer1.Panel2.ResumeLayout(false); + this.splitContainer1.ResumeLayout(false); + this.groupBox1.ResumeLayout(false); + this.groupBox2.ResumeLayout(false); + this.groupBox3.ResumeLayout(false); + this.groupBox4.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.SplitContainer splitContainer1; + private System.Windows.Forms.PropertyGrid propertyGrid1; + private System.Windows.Forms.GroupBox groupBox1; + private System.Windows.Forms.GroupBox groupBox2; + private System.Windows.Forms.ComboBox comRealms; + private System.Windows.Forms.GroupBox groupBox3; + private System.Windows.Forms.ListBox lstZones; + private System.Windows.Forms.GroupBox groupBox4; + private System.Windows.Forms.ListBox lstRooms; + + } +} + diff --git a/Project Manager/frmMain.cs b/Project Manager/frmMain.cs new file mode 100644 index 0000000..eb9f136 --- /dev/null +++ b/Project Manager/frmMain.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Windows.Forms; + +namespace Project_Manager +{ + public partial class frmMain : Form + { + public frmMain() + { + InitializeComponent(); + + propertyGrid1.SelectedObject = Program.project; + } + + private void frmMain_Load(object sender, EventArgs e) + { + //Get all of the realms currently created. + string[] realms = System.IO.Directory.GetFiles(Application.StartupPath + @"\Data\Realms"); + + //Add each realm found into the combo box of available realms. + foreach (string realm in realms) + { + //Instance a new realm + MUDEngine.Environment.Realm newRealm = new MUDEngine.Environment.Realm(); + //De-serialize the current realm. + newRealm = (MUDEngine.Environment.Realm)MUDEngine.XmlSerialization.Load(realm, newRealm); + //Add it to the available realms combo box. + comRealms.Items.Add(newRealm.Name); + } + + //If the project already has a starting realm, then select it. + if (Program.project.InitialLocation.Realm != null) + { + comRealms.SelectedIndex = comRealms.Items.IndexOf(Program.project.InitialLocation.Realm.Name); + } + //If there is no starting realm, but a realm does exist, select the first one in the list. + else if (comRealms.Items.Count != 0) + { + comRealms.SelectedIndex = 0; + } + } + } +} diff --git a/Project Manager/frmMain.resx b/Project Manager/frmMain.resx new file mode 100644 index 0000000..9774d36 --- /dev/null +++ b/Project Manager/frmMain.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + True + + \ No newline at end of file