New Project added: Currency Editor. Allows for creating and managing of the games currencies.
Mud Designer HUB: * frmMain.cs - HUB now scans entire solution directory to find the correct app to launch rather than just checking the Project Manager directory. * frmMain.cs - HUB now has the app launch precess wrapped within a try/catch/finally. No exception handling added as of yet within the catch. MUDEngine: * Engine.cs - ValidateProjectPath method now creates the Currency directory. * Objects namespace added. * Moved the Environment namespace and folder within the new Objects namespace. * BaseObject.cs created. All Game objects will inherit from this, or a child of this class. * Currency.cs created. * ProjectInformation.cs - Added using statements. Project Manager: * Added Using statements for MUDEngine
This commit is contained in:
parent
cd56036ee7
commit
035fdf96d9
24 changed files with 944 additions and 108 deletions
133
CurrencyEditor/CurrencyEditor.csproj
Normal file
133
CurrencyEditor/CurrencyEditor.csproj
Normal file
|
@ -0,0 +1,133 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>9.0.21022</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{FF28EB1C-F811-40CF-91B1-1D9F5EB5A233}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>CurrencyEditor</RootNamespace>
|
||||
<AssemblyName>Currency Editor</AssemblyName>
|
||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<PublishUrl>publish\</PublishUrl>
|
||||
<Install>true</Install>
|
||||
<InstallFrom>Disk</InstallFrom>
|
||||
<UpdateEnabled>false</UpdateEnabled>
|
||||
<UpdateMode>Foreground</UpdateMode>
|
||||
<UpdateInterval>7</UpdateInterval>
|
||||
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
|
||||
<UpdatePeriodically>false</UpdatePeriodically>
|
||||
<UpdateRequired>false</UpdateRequired>
|
||||
<MapFileExtensions>true</MapFileExtensions>
|
||||
<ApplicationRevision>0</ApplicationRevision>
|
||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core">
|
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml.Linq">
|
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="System.Data.DataSetExtensions">
|
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="frmMain.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="frmMain.Designer.cs">
|
||||
<DependentUpon>frmMain.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<EmbeddedResource Include="frmMain.resx">
|
||||
<DependentUpon>frmMain.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 2.0 %28x86%29</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.0">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.0 %28x86%29</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>Windows Installer 3.1</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\MUDEngine\MUDEngine.csproj">
|
||||
<Project>{33828B3B-F227-4726-8FCD-3D9D780E643D}</Project>
|
||||
<Name>MUDEngine</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
15
CurrencyEditor/CurrencyEditor.csproj.user
Normal file
15
CurrencyEditor/CurrencyEditor.csproj.user
Normal file
|
@ -0,0 +1,15 @@
|
|||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<PublishUrlHistory>publish\</PublishUrlHistory>
|
||||
<InstallUrlHistory>
|
||||
</InstallUrlHistory>
|
||||
<SupportUrlHistory>
|
||||
</SupportUrlHistory>
|
||||
<UpdateUrlHistory>
|
||||
</UpdateUrlHistory>
|
||||
<BootstrapperUrlHistory>
|
||||
</BootstrapperUrlHistory>
|
||||
<FallbackCulture>en-US</FallbackCulture>
|
||||
<VerifyUploadedFiles>false</VerifyUploadedFiles>
|
||||
</PropertyGroup>
|
||||
</Project>
|
24
CurrencyEditor/Program.cs
Normal file
24
CurrencyEditor/Program.cs
Normal file
|
@ -0,0 +1,24 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace CurrencyEditor
|
||||
{
|
||||
static class Program
|
||||
{
|
||||
/// <summary>
|
||||
/// The main entry point for the application.
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
static void Main()
|
||||
{
|
||||
MUDEngine.Engine.ValidateProjectPath(Application.StartupPath);
|
||||
MUDEngine.FileSystem.FileSystem.FileType = MUDEngine.FileSystem.FileSystem.OutputFormats.XML;
|
||||
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
Application.Run(new frmMain());
|
||||
}
|
||||
}
|
||||
}
|
36
CurrencyEditor/Properties/AssemblyInfo.cs
Normal file
36
CurrencyEditor/Properties/AssemblyInfo.cs
Normal file
|
@ -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("Currency Editor")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("Currency Editor")]
|
||||
[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("5f283635-f313-48df-8ca5-61ebfe3c839f")]
|
||||
|
||||
// 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")]
|
71
CurrencyEditor/Properties/Resources.Designer.cs
generated
Normal file
71
CurrencyEditor/Properties/Resources.Designer.cs
generated
Normal file
|
@ -0,0 +1,71 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 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.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace CurrencyEditor.Properties
|
||||
{
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
// 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()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager
|
||||
{
|
||||
get
|
||||
{
|
||||
if ((resourceMan == null))
|
||||
{
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("CurrencyEditor.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture
|
||||
{
|
||||
get
|
||||
{
|
||||
return resourceCulture;
|
||||
}
|
||||
set
|
||||
{
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
117
CurrencyEditor/Properties/Resources.resx
Normal file
117
CurrencyEditor/Properties/Resources.resx
Normal file
|
@ -0,0 +1,117 @@
|
|||
<?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.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: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" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
</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" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</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>
|
30
CurrencyEditor/Properties/Settings.Designer.cs
generated
Normal file
30
CurrencyEditor/Properties/Settings.Designer.cs
generated
Normal file
|
@ -0,0 +1,30 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 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.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace CurrencyEditor.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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
7
CurrencyEditor/Properties/Settings.settings
Normal file
7
CurrencyEditor/Properties/Settings.settings
Normal file
|
@ -0,0 +1,7 @@
|
|||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
<Settings />
|
||||
</SettingsFile>
|
161
CurrencyEditor/frmMain.Designer.cs
generated
Normal file
161
CurrencyEditor/frmMain.Designer.cs
generated
Normal file
|
@ -0,0 +1,161 @@
|
|||
namespace CurrencyEditor
|
||||
{
|
||||
partial class frmMain
|
||||
{
|
||||
/// <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.groupBox2 = new System.Windows.Forms.GroupBox();
|
||||
this.propertyGrid1 = new System.Windows.Forms.PropertyGrid();
|
||||
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||
this.lstCurrencies = new System.Windows.Forms.ListBox();
|
||||
this.groupBox3 = new System.Windows.Forms.GroupBox();
|
||||
this.btnNewCurrency = new System.Windows.Forms.Button();
|
||||
this.btnSaveCurrency = new System.Windows.Forms.Button();
|
||||
this.btnDeleteCurrency = new System.Windows.Forms.Button();
|
||||
this.groupBox2.SuspendLayout();
|
||||
this.groupBox1.SuspendLayout();
|
||||
this.groupBox3.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// groupBox2
|
||||
//
|
||||
this.groupBox2.Controls.Add(this.propertyGrid1);
|
||||
this.groupBox2.Location = new System.Drawing.Point(1, 136);
|
||||
this.groupBox2.Name = "groupBox2";
|
||||
this.groupBox2.Size = new System.Drawing.Size(323, 214);
|
||||
this.groupBox2.TabIndex = 6;
|
||||
this.groupBox2.TabStop = false;
|
||||
this.groupBox2.Text = "Currency Setup";
|
||||
//
|
||||
// propertyGrid1
|
||||
//
|
||||
this.propertyGrid1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.propertyGrid1.Location = new System.Drawing.Point(3, 16);
|
||||
this.propertyGrid1.Name = "propertyGrid1";
|
||||
this.propertyGrid1.Size = new System.Drawing.Size(317, 195);
|
||||
this.propertyGrid1.TabIndex = 0;
|
||||
//
|
||||
// groupBox1
|
||||
//
|
||||
this.groupBox1.Controls.Add(this.lstCurrencies);
|
||||
this.groupBox1.Location = new System.Drawing.Point(1, 0);
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.Size = new System.Drawing.Size(323, 130);
|
||||
this.groupBox1.TabIndex = 5;
|
||||
this.groupBox1.TabStop = false;
|
||||
this.groupBox1.Text = "Currencies";
|
||||
//
|
||||
// lstCurrencies
|
||||
//
|
||||
this.lstCurrencies.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.lstCurrencies.FormattingEnabled = true;
|
||||
this.lstCurrencies.Location = new System.Drawing.Point(3, 16);
|
||||
this.lstCurrencies.Name = "lstCurrencies";
|
||||
this.lstCurrencies.Size = new System.Drawing.Size(317, 108);
|
||||
this.lstCurrencies.TabIndex = 0;
|
||||
this.lstCurrencies.SelectedIndexChanged += new System.EventHandler(this.lstCurrencies_SelectedIndexChanged);
|
||||
//
|
||||
// groupBox3
|
||||
//
|
||||
this.groupBox3.Controls.Add(this.btnDeleteCurrency);
|
||||
this.groupBox3.Controls.Add(this.btnSaveCurrency);
|
||||
this.groupBox3.Controls.Add(this.btnNewCurrency);
|
||||
this.groupBox3.Location = new System.Drawing.Point(1, 353);
|
||||
this.groupBox3.Name = "groupBox3";
|
||||
this.groupBox3.Size = new System.Drawing.Size(323, 54);
|
||||
this.groupBox3.TabIndex = 7;
|
||||
this.groupBox3.TabStop = false;
|
||||
this.groupBox3.Text = "Options";
|
||||
//
|
||||
// btnNewCurrency
|
||||
//
|
||||
this.btnNewCurrency.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.btnNewCurrency.Location = new System.Drawing.Point(3, 16);
|
||||
this.btnNewCurrency.Name = "btnNewCurrency";
|
||||
this.btnNewCurrency.Size = new System.Drawing.Size(100, 31);
|
||||
this.btnNewCurrency.TabIndex = 0;
|
||||
this.btnNewCurrency.Text = "New Currency";
|
||||
this.btnNewCurrency.UseVisualStyleBackColor = true;
|
||||
this.btnNewCurrency.Click += new System.EventHandler(this.btnNewCurrency_Click);
|
||||
//
|
||||
// btnSaveCurrency
|
||||
//
|
||||
this.btnSaveCurrency.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.btnSaveCurrency.Location = new System.Drawing.Point(109, 16);
|
||||
this.btnSaveCurrency.Name = "btnSaveCurrency";
|
||||
this.btnSaveCurrency.Size = new System.Drawing.Size(100, 31);
|
||||
this.btnSaveCurrency.TabIndex = 1;
|
||||
this.btnSaveCurrency.Text = "Save Currency";
|
||||
this.btnSaveCurrency.UseVisualStyleBackColor = true;
|
||||
this.btnSaveCurrency.Click += new System.EventHandler(this.btnSaveCurrency_Click);
|
||||
//
|
||||
// btnDeleteCurrency
|
||||
//
|
||||
this.btnDeleteCurrency.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.btnDeleteCurrency.Location = new System.Drawing.Point(215, 16);
|
||||
this.btnDeleteCurrency.Name = "btnDeleteCurrency";
|
||||
this.btnDeleteCurrency.Size = new System.Drawing.Size(100, 31);
|
||||
this.btnDeleteCurrency.TabIndex = 2;
|
||||
this.btnDeleteCurrency.Text = "Delete Currency";
|
||||
this.btnDeleteCurrency.UseVisualStyleBackColor = true;
|
||||
this.btnDeleteCurrency.Click += new System.EventHandler(this.btnDeleteCurrency_Click);
|
||||
//
|
||||
// frmMain
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(326, 410);
|
||||
this.Controls.Add(this.groupBox3);
|
||||
this.Controls.Add(this.groupBox2);
|
||||
this.Controls.Add(this.groupBox1);
|
||||
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 = "Currency Editor";
|
||||
this.groupBox2.ResumeLayout(false);
|
||||
this.groupBox1.ResumeLayout(false);
|
||||
this.groupBox3.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.GroupBox groupBox2;
|
||||
private System.Windows.Forms.PropertyGrid propertyGrid1;
|
||||
private System.Windows.Forms.GroupBox groupBox1;
|
||||
private System.Windows.Forms.ListBox lstCurrencies;
|
||||
private System.Windows.Forms.GroupBox groupBox3;
|
||||
private System.Windows.Forms.Button btnNewCurrency;
|
||||
private System.Windows.Forms.Button btnSaveCurrency;
|
||||
private System.Windows.Forms.Button btnDeleteCurrency;
|
||||
|
||||
}
|
||||
}
|
||||
|
83
CurrencyEditor/frmMain.cs
Normal file
83
CurrencyEditor/frmMain.cs
Normal file
|
@ -0,0 +1,83 @@
|
|||
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;
|
||||
|
||||
//MudEngine
|
||||
using MUDEngine.FileSystem;
|
||||
using MUDEngine.Objects;
|
||||
using MUDEngine.Objects.Environment;
|
||||
|
||||
namespace CurrencyEditor
|
||||
{
|
||||
public partial class frmMain : Form
|
||||
{
|
||||
Currency _Currency;
|
||||
|
||||
public frmMain()
|
||||
{
|
||||
InitializeComponent();
|
||||
_Currency = new Currency();
|
||||
propertyGrid1.SelectedObject = _Currency;
|
||||
}
|
||||
|
||||
private void btnNewCurrency_Click(object sender, EventArgs e)
|
||||
{
|
||||
_Currency = new Currency();
|
||||
propertyGrid1.SelectedObject = _Currency;
|
||||
}
|
||||
|
||||
private void btnSaveCurrency_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (lstCurrencies.Items.Contains(_Currency.Name))
|
||||
{
|
||||
MessageBox.Show("Currency already exists!", "Currency Creation", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
return;
|
||||
}
|
||||
|
||||
FileSystem.Save(Application.StartupPath + @"\Data\Currency\" + _Currency.Name + ".xml", _Currency);
|
||||
lstCurrencies.Items.Add(_Currency.Name);
|
||||
}
|
||||
|
||||
private void lstCurrencies_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
//nothing selected.
|
||||
if (lstCurrencies.SelectedIndex == -1)
|
||||
return;
|
||||
|
||||
_Currency = (Currency)FileSystem.Load(Application.StartupPath + @"\Data\Currency\" + lstCurrencies.SelectedItem.ToString() + ".xml", _Currency);
|
||||
propertyGrid1.SelectedObject = _Currency;
|
||||
}
|
||||
|
||||
private void btnDeleteCurrency_Click(object sender, EventArgs e)
|
||||
{
|
||||
//Check if a currency is selected.
|
||||
if (lstCurrencies.SelectedIndex == -1)
|
||||
{
|
||||
MessageBox.Show("Select a currency to delete first!", "Currency Deletion", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
return;
|
||||
}
|
||||
|
||||
//Ask if its ok to delete first.
|
||||
DialogResult result = MessageBox.Show("Are you sure you want to delete " + _Currency.Name + "?",
|
||||
"Currency Deletion",
|
||||
MessageBoxButtons.YesNo,
|
||||
MessageBoxIcon.Question);
|
||||
|
||||
if (result == DialogResult.No)
|
||||
return;
|
||||
|
||||
//Delete the files and remove from the list.
|
||||
System.IO.File.Delete(Application.StartupPath + @"\Data\Currency\" + lstCurrencies.SelectedItem.ToString() + ".xml");
|
||||
lstCurrencies.Items.Remove(lstCurrencies.SelectedItem);
|
||||
|
||||
//Re-instance the currency and set it within the propertygrid.
|
||||
_Currency = new Currency();
|
||||
propertyGrid1.SelectedObject = _Currency;
|
||||
}
|
||||
}
|
||||
}
|
120
CurrencyEditor/frmMain.resx
Normal file
120
CurrencyEditor/frmMain.resx
Normal file
|
@ -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>
|
|
@ -19,7 +19,7 @@ namespace MUDEngine
|
|||
System.IO.Directory.CreateDirectory(dataPath);
|
||||
|
||||
//begin checking directories
|
||||
string[] paths = { "Rooms", "Zones", "Realms" };
|
||||
string[] paths = { "Rooms", "Zones", "Realms", "Currency" };
|
||||
|
||||
foreach (var path in paths)
|
||||
{
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace MUDEngine.Environment
|
||||
{
|
||||
/// <summary>
|
||||
/// Doors connect two Rooms together, allowing a player to move from one room to the next.
|
||||
/// </summary>
|
||||
public class Door
|
||||
{
|
||||
}
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace MUDEngine.Environment
|
||||
{
|
||||
/// <summary>
|
||||
/// A Realm contains an unlimited number of Zones, allowing developers to split their worlds up into chunks.
|
||||
/// </summary>
|
||||
public class Realm
|
||||
{
|
||||
/// <summary>
|
||||
/// The name of the realm.
|
||||
/// </summary>
|
||||
public string Name
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Description of the Realm.
|
||||
/// </summary>
|
||||
public string Description
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace MUDEngine.Environment
|
||||
{
|
||||
/// <summary>
|
||||
/// Rooms are traversable by players during gameplay. They are connected via Door objects, that allow players
|
||||
/// to move from one room to another.
|
||||
/// </summary>
|
||||
public class Room : Zone
|
||||
{
|
||||
}
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace MUDEngine.Environment
|
||||
{
|
||||
/// <summary>
|
||||
/// Zones contain an unlimited number of Rooms.
|
||||
/// </summary>
|
||||
public class Zone : Realm
|
||||
{
|
||||
}
|
||||
}
|
|
@ -50,12 +50,14 @@
|
|||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Engine.cs" />
|
||||
<Compile Include="Environment\Door.cs" />
|
||||
<Compile Include="Environment\Realm.cs" />
|
||||
<Compile Include="Environment\Room.cs" />
|
||||
<Compile Include="Environment\Zone.cs" />
|
||||
<Compile Include="Objects\BaseObject.cs" />
|
||||
<Compile Include="Objects\Environment\Door.cs" />
|
||||
<Compile Include="Objects\Environment\Realm.cs" />
|
||||
<Compile Include="Objects\Environment\Room.cs" />
|
||||
<Compile Include="Objects\Environment\Zone.cs" />
|
||||
<Compile Include="FileSystem\FileSystem.cs" />
|
||||
<Compile Include="FileSystem\XmlSerialization.cs" />
|
||||
<Compile Include="Objects\Currency.cs" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
|
|
27
MUDEngine/Objects/BaseObject.cs
Normal file
27
MUDEngine/Objects/BaseObject.cs
Normal file
|
@ -0,0 +1,27 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
using System.ComponentModel;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace MUDEngine.Objects
|
||||
{
|
||||
public class BaseObject
|
||||
{
|
||||
[Category("Object Setup")]
|
||||
public string Name
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[Category("Object Setup")]
|
||||
public string Description
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
}
|
||||
}
|
28
MUDEngine/Objects/Currency.cs
Normal file
28
MUDEngine/Objects/Currency.cs
Normal file
|
@ -0,0 +1,28 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.ComponentModel;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace MUDEngine.Objects
|
||||
{
|
||||
public class Currency : BaseObject
|
||||
{
|
||||
[Category("Currency Settings")]
|
||||
/// <summary>
|
||||
/// The value of this currency. It should be how many 'base currency' it takes to equal 1 of this currency
|
||||
/// </summary>
|
||||
public int Value
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public Currency()
|
||||
{
|
||||
this.Name = "New Currency";
|
||||
this.Value = 100;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -7,6 +7,11 @@ using System.Collections.Generic;
|
|||
using System.Xml.Serialization;
|
||||
using System.Xml;
|
||||
|
||||
//MudEngine
|
||||
using MUDEngine.Objects;
|
||||
using MUDEngine.Objects.Environment;
|
||||
using MUDEngine.FileSystem;
|
||||
|
||||
namespace MUDEngine
|
||||
{
|
||||
[XmlInclude(typeof(StartingLocation))]
|
||||
|
@ -15,17 +20,9 @@ namespace MUDEngine
|
|||
|
||||
public struct StartingLocation
|
||||
{
|
||||
public Environment.Room Room;
|
||||
public Environment.Zone Zone;
|
||||
public Environment.Realm Realm;
|
||||
}
|
||||
|
||||
public struct CurrencyInfo
|
||||
{
|
||||
public uint Amount;
|
||||
public string Name;
|
||||
public string Description;
|
||||
public uint BaseValue;
|
||||
public Room Room;
|
||||
public Zone Zone;
|
||||
public Realm Realm;
|
||||
}
|
||||
|
||||
public enum TimeOfDayOptions
|
||||
|
@ -101,7 +98,7 @@ namespace MUDEngine
|
|||
|
||||
//TODO: Add Party support.
|
||||
[Browsable(false)]
|
||||
public List<CurrencyInfo> CurrencyList { get; set; }
|
||||
public List<Currency> CurrencyList { get; set; }
|
||||
|
||||
[Browsable(false)]
|
||||
public string ProjectPath { get; set; }
|
||||
|
|
|
@ -7,6 +7,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MUDEngine", "MUDEngine\MUDE
|
|||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Project Manager", "Project Manager\Project Manager.csproj", "{1D77BC25-63FD-47BB-AE08-39D0D6E1272B}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CurrencyEditor", "CurrencyEditor\CurrencyEditor.csproj", "{FF28EB1C-F811-40CF-91B1-1D9F5EB5A233}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
|
@ -25,6 +27,10 @@ Global
|
|||
{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
|
||||
{FF28EB1C-F811-40CF-91B1-1D9F5EB5A233}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{FF28EB1C-F811-40CF-91B1-1D9F5EB5A233}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{FF28EB1C-F811-40CF-91B1-1D9F5EB5A233}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{FF28EB1C-F811-40CF-91B1-1D9F5EB5A233}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
|
15
MudDesigner/frmMain.Designer.cs
generated
15
MudDesigner/frmMain.Designer.cs
generated
|
@ -32,6 +32,7 @@
|
|||
this.btnLogo = new System.Windows.Forms.Button();
|
||||
this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
|
||||
this.btnProjectManager = new System.Windows.Forms.Button();
|
||||
this.btnCurrencyEditor = new System.Windows.Forms.Button();
|
||||
this.splitContainer1.Panel1.SuspendLayout();
|
||||
this.splitContainer1.Panel2.SuspendLayout();
|
||||
this.splitContainer1.SuspendLayout();
|
||||
|
@ -78,6 +79,7 @@
|
|||
// flowLayoutPanel1
|
||||
//
|
||||
this.flowLayoutPanel1.Controls.Add(this.btnProjectManager);
|
||||
this.flowLayoutPanel1.Controls.Add(this.btnCurrencyEditor);
|
||||
this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.flowLayoutPanel1.Location = new System.Drawing.Point(0, 0);
|
||||
this.flowLayoutPanel1.Name = "flowLayoutPanel1";
|
||||
|
@ -96,6 +98,18 @@
|
|||
this.btnProjectManager.UseVisualStyleBackColor = true;
|
||||
this.btnProjectManager.Click += new System.EventHandler(this.btnProjectManager_Click);
|
||||
//
|
||||
// btnCurrencyEditor
|
||||
//
|
||||
this.btnCurrencyEditor.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.btnCurrencyEditor.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.btnCurrencyEditor.Location = new System.Drawing.Point(156, 3);
|
||||
this.btnCurrencyEditor.Name = "btnCurrencyEditor";
|
||||
this.btnCurrencyEditor.Size = new System.Drawing.Size(147, 55);
|
||||
this.btnCurrencyEditor.TabIndex = 1;
|
||||
this.btnCurrencyEditor.Text = "Currency Editor";
|
||||
this.btnCurrencyEditor.UseVisualStyleBackColor = true;
|
||||
this.btnCurrencyEditor.Click += new System.EventHandler(this.btnCurrencyEditor_Click);
|
||||
//
|
||||
// frmMain
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
|
@ -122,6 +136,7 @@
|
|||
private System.Windows.Forms.Button btnLogo;
|
||||
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
|
||||
private System.Windows.Forms.Button btnProjectManager;
|
||||
private System.Windows.Forms.Button btnCurrencyEditor;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -35,7 +35,29 @@ namespace MudDesigner
|
|||
//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;
|
||||
string[] apps = System.IO.Directory.GetFiles(@"C:\CodePlex\MudDesigner\", "*.exe", System.IO.SearchOption.AllDirectories);
|
||||
List<string> legalApps = new List<string>();
|
||||
|
||||
foreach(string app in apps)
|
||||
{
|
||||
if ((!app.EndsWith(".vshost.exe"))
|
||||
&& (!app.EndsWith(".vshost.exe.manifest"))
|
||||
&& System.IO.Directory.GetParent(app).Name == "Debug"
|
||||
&& System.IO.Directory.GetParent(app).Parent.Name == "bin")
|
||||
{
|
||||
legalApps.Add(app);
|
||||
}
|
||||
}
|
||||
string filename = "" ;
|
||||
foreach(string app in legalApps)
|
||||
{
|
||||
if (System.IO.Path.GetFileName(app).ToLower() == appName.ToLower())
|
||||
{
|
||||
filename = app;
|
||||
break;
|
||||
}
|
||||
}
|
||||
info.FileName = filename;
|
||||
#else
|
||||
info.FileName = appName;
|
||||
#endif
|
||||
|
@ -49,12 +71,23 @@ namespace MudDesigner
|
|||
info.Arguments = Application.StartupPath + "\Data\";
|
||||
#endif
|
||||
process.StartInfo = info;
|
||||
process.Start();
|
||||
this.Hide();
|
||||
process.WaitForExit();
|
||||
try
|
||||
{
|
||||
process.Start();
|
||||
this.Hide();
|
||||
process.WaitForExit();
|
||||
}
|
||||
catch { }
|
||||
finally
|
||||
{
|
||||
process = null;
|
||||
this.Show();
|
||||
}
|
||||
}
|
||||
|
||||
process = null;
|
||||
this.Show();
|
||||
private void btnCurrencyEditor_Click(object sender, EventArgs e)
|
||||
{
|
||||
ExecuteApp("Currency Editor.exe");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,18 +7,23 @@ using System.Linq;
|
|||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
//MudEngine
|
||||
using MUDEngine.FileSystem;
|
||||
using MUDEngine.Objects;
|
||||
using MUDEngine.Objects.Environment;
|
||||
|
||||
namespace Project_Manager
|
||||
{
|
||||
public partial class frmMain : Form
|
||||
{
|
||||
List<MUDEngine.Environment.Zone> zones;
|
||||
List<MUDEngine.Environment.Room> rooms;
|
||||
List<Zone> zones;
|
||||
List<Room> rooms;
|
||||
|
||||
public frmMain()
|
||||
{
|
||||
InitializeComponent();
|
||||
zones = new List<MUDEngine.Environment.Zone>();
|
||||
rooms = new List<MUDEngine.Environment.Room>();
|
||||
zones = new List<Zone>();
|
||||
rooms = new List<Room>();
|
||||
}
|
||||
|
||||
private void frmMain_Load(object sender, EventArgs e)
|
||||
|
@ -34,9 +39,9 @@ namespace Project_Manager
|
|||
foreach (string realm in files)
|
||||
{
|
||||
//Instance a new realm
|
||||
MUDEngine.Environment.Realm newRealm = new MUDEngine.Environment.Realm();
|
||||
Realm newRealm = new Realm();
|
||||
//De-serialize the current realm.
|
||||
newRealm = (MUDEngine.Environment.Realm)MUDEngine.FileSystem.FileSystem.Load(realm, newRealm);
|
||||
newRealm = (Realm)FileSystem.Load(realm, newRealm);
|
||||
//Add it to the available realms combo box.
|
||||
comRealms.Items.Add(newRealm.Name);
|
||||
}
|
||||
|
@ -66,9 +71,9 @@ namespace Project_Manager
|
|||
//Add each zone found into the list box.
|
||||
foreach (string zone in files)
|
||||
{
|
||||
MUDEngine.Environment.Zone newZone = new MUDEngine.Environment.Zone();
|
||||
Zone newZone = new Zone();
|
||||
//De-serialize the current zone.
|
||||
newZone = (MUDEngine.Environment.Zone)MUDEngine.FileSystem.FileSystem.Load(zone, newZone);
|
||||
newZone = (Zone)FileSystem.Load(zone, newZone);
|
||||
//Add it to the available zones list box
|
||||
lstZones.Items.Add(newZone.Name);
|
||||
zones.Add(newZone);
|
||||
|
@ -108,9 +113,9 @@ namespace Project_Manager
|
|||
//Add each room found into the list box.
|
||||
foreach (string room in files)
|
||||
{
|
||||
MUDEngine.Environment.Room newRoom = new MUDEngine.Environment.Room();
|
||||
Room newRoom = new Room();
|
||||
//De-serialize the current Room.
|
||||
newRoom = (MUDEngine.Environment.Room)MUDEngine.FileSystem.FileSystem.Load(room, newRoom);
|
||||
newRoom = (Room)FileSystem.Load(room, newRoom);
|
||||
//Add it to the available rooms list box
|
||||
lstRooms.Items.Add(newRoom.Name);
|
||||
rooms.Add(newRoom);
|
||||
|
@ -125,7 +130,7 @@ namespace Project_Manager
|
|||
//The realm and zone that matches the initial are selected, so lets select the initial room next.
|
||||
if ((initialRealm == selectedRealm) && (initialZone == selectedZone))
|
||||
{
|
||||
foreach (MUDEngine.Environment.Room room in rooms)
|
||||
foreach (Room room in rooms)
|
||||
{
|
||||
if (lstRooms.Items.Contains(room.Name))
|
||||
lstRooms.SelectedIndex = lstRooms.Items.IndexOf(room.Name);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue