Mercurial > repos > IBBoard.WarFoundry.GUI.WinForms
diff FrmMain.cs @ 46:1576f669b3eb
Fixes #137: Remove use of old collections
* Remove all references (lots unused) in WinForms code
* Remove DebugOutput window as it isn't used any more
* Remove unused static hashtable from UnitEquipmentChoice
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sun, 13 Sep 2009 17:33:36 +0000 |
parents | 740350673006 |
children | 93b3d23147ba |
line wrap: on
line diff
--- a/FrmMain.cs Wed Sep 09 19:56:24 2009 +0000 +++ b/FrmMain.cs Sun Sep 13 17:33:36 2009 +0000 @@ -5,7 +5,6 @@ using System; using System.Drawing; using System.Drawing.Drawing2D; -using System.Collections; using System.ComponentModel; using System.Windows.Forms; using System.Data; @@ -50,7 +49,6 @@ //public FailedUnitRequirementDelegate FailedUnitRequirementMethod; private FrmArmyTree armyTree; - private FrmDebugOutput debugWindow; private string loadedFilePath; private System.ComponentModel.IContainer components; @@ -81,7 +79,6 @@ private IBBoard.Windows.Forms.IBBMenuItem miUndo; private IBBoard.Windows.Forms.IBBMenuItem miRedo; private IBBoard.Windows.Forms.IBBMenuItem menuHelp; - private IBBoard.Windows.Forms.IBBMenuItem miDebugWindow; private IBBoard.Windows.Forms.IBBMenuItem miAbout; private IBBoard.Windows.Forms.ColorableStatusBarPanel sbMainPanel; private IBBoard.Windows.Forms.ColorableStatusBarPanel sbErrorPanel; @@ -243,14 +240,13 @@ this.miRedo = new IBBoard.Windows.Forms.IBBMenuItem(); this.menuHelp = new IBBoard.Windows.Forms.IBBMenuItem(); this.miAbout = new IBBoard.Windows.Forms.IBBMenuItem(); - this.miDebugWindow = new IBBoard.Windows.Forms.IBBMenuItem(); this.openArmyDialog = new System.Windows.Forms.OpenFileDialog(); this.saveArmyDialog = new System.Windows.Forms.SaveFileDialog(); this.pnlRight = new System.Windows.Forms.Panel(); this.statusBarTimer = new System.Windows.Forms.Timer(this.components); - ((System.ComponentModel.ISupportInitialize)(this.sbMainPanel)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.sbErrorPanel)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.sbPointsPanel)).BeginInit(); + ((System.ComponentModel.ISupportInitialize) (this.sbMainPanel)).BeginInit(); + ((System.ComponentModel.ISupportInitialize) (this.sbErrorPanel)).BeginInit(); + ((System.ComponentModel.ISupportInitialize) (this.sbPointsPanel)).BeginInit(); this.SuspendLayout(); // // statusBar @@ -350,7 +346,7 @@ // // buttonIcons // - this.buttonIcons.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("buttonIcons.ImageStream"))); + this.buttonIcons.ImageStream = ((System.Windows.Forms.ImageListStreamer) (resources.GetObject("buttonIcons.ImageStream"))); this.buttonIcons.TransparentColor = System.Drawing.Color.Transparent; this.buttonIcons.Images.SetKeyName(0, ""); this.buttonIcons.Images.SetKeyName(1, ""); @@ -492,8 +488,7 @@ // this.menuHelp.Index = 2; this.menuHelp.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { - this.miAbout, - this.miDebugWindow}); + this.miAbout}); this.menuHelp.Text = "&help"; // // miAbout @@ -502,19 +497,13 @@ this.miAbout.Index = 0; this.miAbout.Text = "&about"; // - // miDebugWindow - // - this.miDebugWindow.Index = 1; - this.miDebugWindow.Text = "&debug"; - this.miDebugWindow.Click += new System.EventHandler(this.miDebugWindow_Click); - // // saveArmyDialog // this.saveArmyDialog.Title = "Translatable:saveArmyDialog"; // // pnlRight // - this.pnlRight.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + this.pnlRight.Anchor = ((System.Windows.Forms.AnchorStyles) (((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Right))); this.pnlRight.BackColor = System.Drawing.SystemColors.AppWorkspace; this.pnlRight.Location = new System.Drawing.Point(726, 30); @@ -536,14 +525,14 @@ this.Controls.Add(this.pnlRight); this.Controls.Add(this.toolBar); this.Controls.Add(this.statusBar); - this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.Icon = ((System.Drawing.Icon) (resources.GetObject("$this.Icon"))); this.IsMdiContainer = true; this.Menu = this.mainMenu; this.Name = "FrmMain"; this.Text = "WarFoundry"; - ((System.ComponentModel.ISupportInitialize)(this.sbMainPanel)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.sbErrorPanel)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.sbPointsPanel)).EndInit(); + ((System.ComponentModel.ISupportInitialize) (this.sbMainPanel)).EndInit(); + ((System.ComponentModel.ISupportInitialize) (this.sbErrorPanel)).EndInit(); + ((System.ComponentModel.ISupportInitialize) (this.sbPointsPanel)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); @@ -1223,17 +1212,6 @@ statusBar.ColorableStatusBarDrawItem(sender, sbdevent); } - private void miDebugWindow_Click(object sender, EventArgs e) - { - if (debugWindow == null || debugWindow.IsDisposed) - { - debugWindow = new FrmDebugOutput(); - } - - debugWindow.Show(); - debugWindow.Focus(); - } - private void FrmMain_Closing(object sender, CancelEventArgs e) { if (!CloseCurrentArmy())