Changed the name of the Mud Designer to Mud Designer HUB to prevent confusion during references.

MudEngine Zones now have a Name property.
MudEngine.ProjectInformation.BaseCurrencyName is no longer filed under Misc. within the Project Manager.
The Project Managers Realms list now generates the Available Zones lists if Zones exist.
The Project Managers Zone and Room list boxes have been replaced with CheckedListBoxes to easily select Initial Room/Zones.
This commit is contained in:
Scionwest_cp 2009-11-05 20:11:28 -08:00
parent 6abf61aa63
commit 6004bd0c58
6 changed files with 84 additions and 37 deletions

View file

@ -10,5 +10,9 @@ namespace MUDEngine.Environment
/// </summary> /// </summary>
public class Zone public class Zone
{ {
/// <summary>
/// The name of the Zone.
/// </summary>
public string Name { get; set; }
} }
} }

View file

@ -21,7 +21,7 @@ namespace MUDEngine
} }
#region ====== Public Enumerators, Structures & Properties ====== #region ====== Public Enumerators, Structures & Properties ======
[Category("Company Information")] [Category("Company Information")]
/// <summary> /// <summary>
/// Gets or Sets the name of the company /// Gets or Sets the name of the company
/// </summary> /// </summary>
@ -63,7 +63,9 @@ namespace MUDEngine
[Description("Sets the amount that the base currency is valued at.")] [Description("Sets the amount that the base currency is valued at.")]
public uint BaseCurrencyAmount { get; set; } public uint BaseCurrencyAmount { get; set; }
public uint BaseCurrencyName { get; set; }
[Category("Project Information")]
public string BaseCurrencyName { get; set; }
[Browsable(false)] [Browsable(false)]
public List<CurrencyInfo> CurrencyList { get; set; } public List<CurrencyInfo> CurrencyList { get; set; }

View file

@ -1,7 +1,7 @@
 
Microsoft Visual Studio Solution File, Format Version 10.00 Microsoft Visual Studio Solution File, Format Version 10.00
# Visual C# Express 2008 # Visual C# Express 2008
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MudDesigner", "MudDesigner\MudDesigner.csproj", "{F782C36B-5A00-4BC9-BE4E-B631729DA40E}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MudHub", "MudDesigner\MudHub.csproj", "{F782C36B-5A00-4BC9-BE4E-B631729DA40E}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MUDEngine", "MUDEngine\MUDEngine.csproj", "{33828B3B-F227-4726-8FCD-3D9D780E643D}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MUDEngine", "MUDEngine\MUDEngine.csproj", "{33828B3B-F227-4726-8FCD-3D9D780E643D}"
EndProject EndProject

View file

@ -72,7 +72,7 @@
this.btnLogo.Name = "btnLogo"; this.btnLogo.Name = "btnLogo";
this.btnLogo.Size = new System.Drawing.Size(627, 154); this.btnLogo.Size = new System.Drawing.Size(627, 154);
this.btnLogo.TabIndex = 0; this.btnLogo.TabIndex = 0;
this.btnLogo.Text = "MUD Designer \r\nBeta 1.0\r\n"; this.btnLogo.Text = "MUD Designer HUB \r\nBeta 1.0\r\n";
this.btnLogo.UseVisualStyleBackColor = false; this.btnLogo.UseVisualStyleBackColor = false;
// //
// flowLayoutPanel1 // flowLayoutPanel1

View file

@ -31,19 +31,19 @@
this.splitContainer1 = new System.Windows.Forms.SplitContainer(); this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.propertyGrid1 = new System.Windows.Forms.PropertyGrid(); this.propertyGrid1 = new System.Windows.Forms.PropertyGrid();
this.groupBox1 = new System.Windows.Forms.GroupBox(); this.groupBox1 = new System.Windows.Forms.GroupBox();
this.groupBox4 = new System.Windows.Forms.GroupBox();
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.groupBox2 = new System.Windows.Forms.GroupBox(); this.groupBox2 = new System.Windows.Forms.GroupBox();
this.comRealms = new System.Windows.Forms.ComboBox(); this.comRealms = new System.Windows.Forms.ComboBox();
this.groupBox3 = new System.Windows.Forms.GroupBox(); this.lstZones = new System.Windows.Forms.CheckedListBox();
this.lstZones = new System.Windows.Forms.ListBox(); this.lstRooms = new System.Windows.Forms.CheckedListBox();
this.groupBox4 = new System.Windows.Forms.GroupBox();
this.lstRooms = new System.Windows.Forms.ListBox();
this.splitContainer1.Panel1.SuspendLayout(); this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout(); this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout(); this.splitContainer1.SuspendLayout();
this.groupBox1.SuspendLayout(); this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.groupBox3.SuspendLayout();
this.groupBox4.SuspendLayout(); this.groupBox4.SuspendLayout();
this.groupBox3.SuspendLayout();
this.groupBox2.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
// splitContainer1 // splitContainer1
@ -83,6 +83,26 @@
this.groupBox1.TabStop = false; this.groupBox1.TabStop = false;
this.groupBox1.Text = "Initial Room Setup"; this.groupBox1.Text = "Initial Room Setup";
// //
// 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";
//
// 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";
//
// groupBox2 // groupBox2
// //
this.groupBox2.Controls.Add(this.comRealms); this.groupBox2.Controls.Add(this.comRealms);
@ -103,16 +123,7 @@
this.comRealms.Name = "comRealms"; this.comRealms.Name = "comRealms";
this.comRealms.Size = new System.Drawing.Size(146, 21); this.comRealms.Size = new System.Drawing.Size(146, 21);
this.comRealms.TabIndex = 0; this.comRealms.TabIndex = 0;
// this.comRealms.SelectedIndexChanged += new System.EventHandler(this.comRealms_SelectedIndexChanged);
// 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 // lstZones
// //
@ -120,18 +131,9 @@
this.lstZones.FormattingEnabled = true; this.lstZones.FormattingEnabled = true;
this.lstZones.Location = new System.Drawing.Point(3, 16); this.lstZones.Location = new System.Drawing.Point(3, 16);
this.lstZones.Name = "lstZones"; this.lstZones.Name = "lstZones";
this.lstZones.Size = new System.Drawing.Size(143, 108); this.lstZones.Size = new System.Drawing.Size(143, 109);
this.lstZones.TabIndex = 0; this.lstZones.TabIndex = 0;
// this.lstZones.ThreeDCheckBoxes = true;
// 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 // lstRooms
// //
@ -139,8 +141,9 @@
this.lstRooms.FormattingEnabled = true; this.lstRooms.FormattingEnabled = true;
this.lstRooms.Location = new System.Drawing.Point(3, 16); this.lstRooms.Location = new System.Drawing.Point(3, 16);
this.lstRooms.Name = "lstRooms"; this.lstRooms.Name = "lstRooms";
this.lstRooms.Size = new System.Drawing.Size(143, 160); this.lstRooms.Size = new System.Drawing.Size(143, 154);
this.lstRooms.TabIndex = 0; this.lstRooms.TabIndex = 1;
this.lstRooms.ThreeDCheckBoxes = true;
// //
// frmMain // frmMain
// //
@ -159,9 +162,9 @@
this.splitContainer1.Panel2.ResumeLayout(false); this.splitContainer1.Panel2.ResumeLayout(false);
this.splitContainer1.ResumeLayout(false); this.splitContainer1.ResumeLayout(false);
this.groupBox1.ResumeLayout(false); this.groupBox1.ResumeLayout(false);
this.groupBox2.ResumeLayout(false);
this.groupBox3.ResumeLayout(false);
this.groupBox4.ResumeLayout(false); this.groupBox4.ResumeLayout(false);
this.groupBox3.ResumeLayout(false);
this.groupBox2.ResumeLayout(false);
this.ResumeLayout(false); this.ResumeLayout(false);
} }
@ -174,9 +177,9 @@
private System.Windows.Forms.GroupBox groupBox2; private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.ComboBox comRealms; private System.Windows.Forms.ComboBox comRealms;
private System.Windows.Forms.GroupBox groupBox3; private System.Windows.Forms.GroupBox groupBox3;
private System.Windows.Forms.ListBox lstZones;
private System.Windows.Forms.GroupBox groupBox4; private System.Windows.Forms.GroupBox groupBox4;
private System.Windows.Forms.ListBox lstRooms; private System.Windows.Forms.CheckedListBox lstRooms;
private System.Windows.Forms.CheckedListBox lstZones;
} }
} }

View file

@ -45,5 +45,43 @@ namespace Project_Manager
comRealms.SelectedIndex = 0; comRealms.SelectedIndex = 0;
} }
} }
private void comRealms_SelectedIndexChanged(object sender, EventArgs e)
{
lstZones.Items.Clear();
//Check if we have any realms first.
if (comRealms.Items.Count == 0)
return;
string[] zones = System.IO.Directory.GetFiles(Application.StartupPath + @"\Data\Zones");
//Add each zone found into the list box.
foreach (string zone in zones)
{
MUDEngine.Environment.Zone newZone = new MUDEngine.Environment.Zone();
//De-serialize the current zone.
newZone = (MUDEngine.Environment.Zone)MUDEngine.XmlSerialization.Load(zone, newZone);
//Add it to the available zones list box
lstZones.Items.Add(newZone.Name);
}
//Check if we have an existing realm that's set as our startup.
if (Program.project.InitialLocation.Realm != null)
{
//Check if we have the Initial realm selected, if so we need to check the initial Zone as well
if (comRealms.SelectedItem.ToString() == Program.project.InitialLocation.Realm.Name)
{
//We have an initial zone, so lets check it in the list box
if (Program.project.InitialLocation.Zone != null)
{
if (lstZones.Items.Contains(Program.project.InitialLocation.Zone.Name))
{
lstZones.SelectedIndex = lstZones.Items.IndexOf(Program.project.InitialLocation.Zone.Name);
}
}
}
}
}
} }
} }