changeset 12:6284c091b132

Merge local with IBBoard
author Tsudico
date Fri, 17 Dec 2010 22:14:43 -0600
parents b42ba80ec613 (diff) 38f0ed348ca8 (current diff)
children 372f921c20fc
files IBBoard.WarFoundry.Forge.WinForms.suo bin/Debug/IBBoard.WarFoundry.API.dll bin/Debug/IBBoard.dll bin/Debug/IBBoardWF.dll bin/Debug/ICSharpCode.SharpZipLib.dll bin/Debug/schemas/system.xsd obj/Debug/IBBoard.WarFoundry.Forge.WinForms.csproj.FileListAbsolute.txt obj/Debug/IBBoard.WarFoundry.Forge.WinForms.csproj.GenerateResource.Cache obj/Debug/ResolveAssemblyReference.cache
diffstat 1 files changed, 15 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/FrmMain.cs	Fri Dec 17 22:11:04 2010 -0600
+++ b/FrmMain.cs	Fri Dec 17 22:14:43 2010 -0600
@@ -39,12 +39,9 @@
 		private static readonly string AppTitle = "WarFoundry Forge";
 		internal static readonly string VERSION = "0.0.2";
 		const string DefaultDataDir = "data";
-
 		private Preferences preferences;
 		private readonly ILog log = LogManager.GetLogger(typeof(FrmMain));
-
 		private CommandStack commandStack;
-		
 		private string loadedFilePath;
 
 		// Form contents
@@ -197,8 +194,8 @@
 			// menuStrip
 			// 
 			this.menuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
-            this.menuFile,
-            this.menuHelp});
+			this.menuFile, 
+			this.menuHelp});
 			this.menuStrip.Location = new System.Drawing.Point(0, 0);
 			this.menuStrip.Name = "menuStrip";
 			this.menuStrip.Size = new System.Drawing.Size(790, 24);
@@ -208,10 +205,10 @@
 			// menuFile
 			// 
 			this.menuFile.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
-			this.menuNew,
-			this.menuOpen,
-			this.toolStripSeparator2,
-            this.miExit});
+			this.menuNew, 
+			this.menuOpen, 
+			this.toolStripSeparator2, 
+			this.miExit});
 			this.menuFile.Name = "menuFile";
 			this.menuFile.Size = new System.Drawing.Size(33, 20);
 			this.menuFile.Text = "&file";
@@ -261,7 +258,7 @@
 			// menuHelp
 			// 
 			this.menuHelp.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
-            this.miAbout});
+			this.miAbout});
 			this.menuHelp.Name = "menuHelp";
 			this.menuHelp.Size = new System.Drawing.Size(39, 20);
 			this.menuHelp.Text = "&help";
@@ -288,6 +285,7 @@
 			this.ResumeLayout(false);
 			this.PerformLayout();
 		}
+
 		#endregion
 
 		private void FileLoadingFinished(List<FileLoadFailure> failures)
@@ -297,22 +295,22 @@
 				log.Warn("Failed to load " + failure.FailedFile.FullName + ": " + failure.Message);
 			}
 		}
-		
+
 		private void miNewSystem_Click(object sender, System.EventArgs e)
 		{
-			FrmSystem system = new FrmSystem(new GameSystem(" ", " ", null));
+			FrmSystem system = new FrmSystem(new GameSystem(" ", " ", new DummyWarFoundryFactory()));
 			system.ShowDialog(this);
 		}
 
 		private void miOpenSystem_Click(object sender, System.EventArgs e)
 		{
-			if(OpenFile())
+			if (OpenFile())
 			{
 				FrmSystem system = new FrmSystem(CurrentGameSystem);
 				system.ShowDialog(this);
 			}
 		}
-		
+
 		private bool OpenFile()
 		{
 			if (openFile.Filter == "")
@@ -338,11 +336,11 @@
 					string newFilePath = openFile.FileName;
 					ICollection<IWarFoundryObject> fileContents = WarFoundryLoader.GetDefault().LoadFile(new FileInfo(newFilePath));
 					
-					if(fileContents.Count > 0)
+					if (fileContents.Count > 0)
 					{
-						foreach(IWarFoundryObject fileObject in fileContents)
+						foreach (IWarFoundryObject fileObject in fileContents)
 						{
-							if(fileObject is GameSystem)
+							if (fileObject is GameSystem)
 							{
 								CurrentGameSystem = (GameSystem)fileObject;
 							}