Mercurial > repos > IBBoard.WarFoundry.GUI.WinForms
changeset 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 | 1c74b51abac1 |
children | 2f2e46cd4171 |
files | FrmDebugOutput.cs FrmDebugOutput.resources FrmDebugOutput.resx FrmEditUnitEquipment.cs FrmMain.cs FrmNewArmy.cs FrmNewUnit.cs FrmNewUnitEquipment.cs FrmReplaceUnitEquipment.cs FrmSelectSystem.cs IBBoard.WarFoundry.GUI.WinForms.csproj Util/UnitEquipmentChoice.cs |
diffstat | 12 files changed, 10 insertions(+), 564 deletions(-) [+] |
line wrap: on
line diff
--- a/FrmDebugOutput.cs Wed Sep 09 19:56:24 2009 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,309 +0,0 @@ -// This file (FrmDebugOutput.cs) is a part of the IBBoard.WarFoundry.GUI.WinForms project and is copyright 2009 IBBoard. -// -// The file and the library/program it is in are licensed and distributed, without warranty, under the GNU Affero GPL license, either version 3 of the License or (at your option) any later version. Please see COPYING for more information and the full license. - -using System; -using System.Drawing; -using System.Collections; -using System.ComponentModel; -using System.Text; -using System.Windows.Forms; -using IBBoard.Lang; -using IBBoard.Logging; -using IBBoard.Windows.Forms; - -namespace IBBoard.WarFoundry -{ - /// <summary> - /// Summary description for FrmDebugOutput. - /// </summary> - public class FrmDebugOutput : IBBForm - { - private System.Windows.Forms.ListBox lstDebugItems; - private System.Windows.Forms.ComboBox cmbDebugLevel; - private System.Windows.Forms.Label lblDebugLevel; - /// <summary> - /// Required designer variable. - /// </summary> - private System.ComponentModel.Container components = null; - private System.Windows.Forms.ContextMenu contextMenu; - private System.Windows.Forms.MenuItem miCopy; - private System.Windows.Forms.TextBox txtDetail; - private System.Windows.Forms.Splitter splitter1; - private System.Windows.Forms.Panel panel1; - //private int MAX_LIST_LENGTH = 50; - - public FrmDebugOutput() - { - //this.logger = logger; - //logger.LogUpdatedEvent+=new IBBoard.Logging.Logger.LogUpdatedDelegate(logger_LogUpdatedEvent); - // - // Required for Windows Form Designer support - // - InitializeComponent(); - - /*if (LogLevels.Debug >= logger.LogLevel) - { - cmbDebugLevel.Items.Add(LogLevels.Debug); - } - - if (LogLevels.Info >= logger.LogLevel) - { - cmbDebugLevel.Items.Add(LogLevels.Info); - } - - if (LogLevels.Warning >= logger.LogLevel) - { - cmbDebugLevel.Items.Add(LogLevels.Warning); - } - - if (LogLevels.Error >= logger.LogLevel) - { - cmbDebugLevel.Items.Add(LogLevels.Error); - } - - if (LogLevels.Critical >= logger.LogLevel) - { - cmbDebugLevel.Items.Add(LogLevels.Critical); - }*/ - - this.Name = "DebugOutputForm"; - - //cmbDebugLevel.SelectedItem = logger.LogLevel; - - Translation.Translate(this, true); - - fillDebugList(); - } - - /// <summary> - /// Clean up any resources being used. - /// </summary> - protected override void Dispose( bool disposing ) - { - if( disposing ) - { - if(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.lstDebugItems = new System.Windows.Forms.ListBox(); - this.contextMenu = new System.Windows.Forms.ContextMenu(); - this.miCopy = new System.Windows.Forms.MenuItem(); - this.cmbDebugLevel = new System.Windows.Forms.ComboBox(); - this.lblDebugLevel = new System.Windows.Forms.Label(); - this.txtDetail = new System.Windows.Forms.TextBox(); - this.splitter1 = new System.Windows.Forms.Splitter(); - this.panel1 = new System.Windows.Forms.Panel(); - this.SuspendLayout(); - // - // lstDebugItems - // - this.lstDebugItems.ContextMenu = this.contextMenu; - this.lstDebugItems.Dock = System.Windows.Forms.DockStyle.Fill; - this.lstDebugItems.IntegralHeight = false; - this.lstDebugItems.Location = new System.Drawing.Point(0, 24); - this.lstDebugItems.Name = "lstDebugItems"; - this.lstDebugItems.ScrollAlwaysVisible = true; - this.lstDebugItems.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended; - this.lstDebugItems.Size = new System.Drawing.Size(656, 144); - this.lstDebugItems.TabIndex = 0; - this.lstDebugItems.MouseDown += new System.Windows.Forms.MouseEventHandler(this.lstDebugItems_MouseDown); - this.lstDebugItems.SelectedIndexChanged += new System.EventHandler(this.lstDebugItems_SelectedIndexChanged); - // - // contextMenu - // - this.contextMenu.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { - this.miCopy}); - this.contextMenu.Popup += new System.EventHandler(this.contextMenu_Popup); - // - // miCopy - // - this.miCopy.Index = 0; - this.miCopy.Text = "&Copy"; - this.miCopy.Click += new System.EventHandler(this.miCopy_Click); - // - // cmbDebugLevel - // - this.cmbDebugLevel.Location = new System.Drawing.Point(190, 2); - this.cmbDebugLevel.Name = "cmbDebugLevel"; - this.cmbDebugLevel.Size = new System.Drawing.Size(464, 21); - this.cmbDebugLevel.TabIndex = 1; - this.cmbDebugLevel.SelectedIndexChanged += new System.EventHandler(this.cmbDebugLevel_SelectedIndexChanged); - // - // lblDebugLevel - // - this.lblDebugLevel.Location = new System.Drawing.Point(16, 0); - this.lblDebugLevel.Name = "lblDebugLevel"; - this.lblDebugLevel.Size = new System.Drawing.Size(168, 21); - this.lblDebugLevel.TabIndex = 2; - this.lblDebugLevel.Text = "debug level:"; - this.lblDebugLevel.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // txtDetail - // - this.txtDetail.Dock = System.Windows.Forms.DockStyle.Bottom; - this.txtDetail.Location = new System.Drawing.Point(0, 172); - this.txtDetail.Multiline = true; - this.txtDetail.Name = "txtDetail"; - this.txtDetail.ReadOnly = true; - this.txtDetail.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; - this.txtDetail.Size = new System.Drawing.Size(656, 64); - this.txtDetail.TabIndex = 3; - this.txtDetail.TabStop = false; - this.txtDetail.Text = ""; - this.txtDetail.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtDetail_KeyDown); - // - // splitter1 - // - this.splitter1.Cursor = System.Windows.Forms.Cursors.HSplit; - this.splitter1.Dock = System.Windows.Forms.DockStyle.Bottom; - this.splitter1.Location = new System.Drawing.Point(0, 168); - this.splitter1.MinExtra = 50; - this.splitter1.MinSize = 50; - this.splitter1.Name = "splitter1"; - this.splitter1.Size = new System.Drawing.Size(656, 4); - this.splitter1.TabIndex = 4; - this.splitter1.TabStop = false; - // - // panel1 - // - this.panel1.Dock = System.Windows.Forms.DockStyle.Top; - this.panel1.Location = new System.Drawing.Point(0, 0); - this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(656, 24); - this.panel1.TabIndex = 5; - // - // FrmDebugOutput - // - this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); - this.ClientSize = new System.Drawing.Size(656, 236); - this.Controls.Add(this.lblDebugLevel); - this.Controls.Add(this.cmbDebugLevel); - this.Controls.Add(this.lstDebugItems); - this.Controls.Add(this.splitter1); - this.Controls.Add(this.panel1); - this.Controls.Add(this.txtDetail); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; - this.Name = "FrmDebugOutput"; - this.ShowInTaskbar = false; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; - this.Text = "FrmDebugOutput"; - this.ResumeLayout(false); - - } - #endregion - - private void cmbDebugLevel_SelectedIndexChanged(object sender, System.EventArgs e) - { - fillDebugList(); - } - - private void fillDebugList() - { - lstDebugItems.Items.Clear(); - /*LogItem[] items = logger.GetLogItems((LogLevels)cmbDebugLevel.SelectedItem); - int last = items.Length - 1; - int stop = last - MAX_LIST_LENGTH; - - if (stop < 0) - { - stop = 0; - } - - //reverse fill the list so that we can have newest items at the top - for (int i = last; i >= stop; i--) - { - lstDebugItems.Items.Add(items[i]); - }*/ - } - - private void logger_LogUpdatedEvent(LogItem item) - { - /*if (item.Level >= (LogLevels)cmbDebugLevel.SelectedItem) - { - lock (lstDebugItems) - { - lstDebugItems.Items.Insert(0, item); - - if (lstDebugItems.Items.Count > MAX_LIST_LENGTH) - { - lstDebugItems.Items.RemoveAt(lstDebugItems.Items.Count - 1); - } - } - }*/ - } - - private void miCopy_Click(object sender, System.EventArgs e) - { - if (lstDebugItems.SelectedIndices.Count==1) - { - Clipboard.SetDataObject(lstDebugItems.SelectedItem.ToString()); - } - else if (lstDebugItems.SelectedIndices.Count > 1) - { - StringBuilder sb = new StringBuilder(); - - foreach (int idx in lstDebugItems.SelectedIndices) - { - sb.Append(lstDebugItems.Items[idx].ToString()+Environment.NewLine); - } - - Clipboard.SetDataObject(sb.ToString().Trim()); - } - } - - private void contextMenu_Popup(object sender, System.EventArgs e) - { - foreach (MenuItem mi in contextMenu.MenuItems) - { - mi.Visible = lstDebugItems.SelectedIndex > -1; - } - } - - private void lstDebugItems_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e) - { - if (e.Button == MouseButtons.Right) - { - int idx = lstDebugItems.IndexFromPoint(e.X, e.Y); - - if (lstDebugItems.SelectedIndices.Contains(idx)) - { - lstDebugItems.SelectedIndex = idx; - } - } - } - - private void lstDebugItems_SelectedIndexChanged(object sender, System.EventArgs e) - { - if (lstDebugItems.SelectedIndex > -1) - { - LogItem item = (LogItem)lstDebugItems.SelectedItem; - txtDetail.Text = item.ToString() + Environment.NewLine + Environment.NewLine + "Stack Trace: "+ item.StackTrace; - } - else - { - txtDetail.Text = ""; - } - } - - private void txtDetail_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e) - { - if(e.KeyData == (Keys.Control|Keys.A) && e.Control) - { - txtDetail.SelectAll(); - } - } - } -}
--- a/FrmDebugOutput.resx Wed Sep 09 19:56:24 2009 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,208 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<root> - <!-- - Microsoft ResX Schema - - Version 1.3 - - 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">1.3</resheader> - <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> - <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> - <data name="Name1">this is my long string</data> - <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> - <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> - [base64 mime encoded serialized .NET Framework object] - </data> - <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> - [base64 mime encoded string representing a byte array form of the .NET Framework object] - </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 forserialized 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="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>1.3</value> - </resheader> - <resheader name="reader"> - <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> - <resheader name="writer"> - <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> - <data name="lstDebugItems.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>Private</value> - </data> - <data name="lstDebugItems.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>False</value> - </data> - <data name="lstDebugItems.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>Private</value> - </data> - <data name="contextMenu.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>Private</value> - </data> - <data name="contextMenu.Location" type="System.Drawing.Point, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>17, 17</value> - </data> - <data name="contextMenu.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>Private</value> - </data> - <data name="miCopy.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>Private</value> - </data> - <data name="miCopy.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>Private</value> - </data> - <data name="cmbDebugLevel.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>Private</value> - </data> - <data name="cmbDebugLevel.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>False</value> - </data> - <data name="cmbDebugLevel.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>Private</value> - </data> - <data name="lblDebugLevel.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>False</value> - </data> - <data name="lblDebugLevel.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>Private</value> - </data> - <data name="lblDebugLevel.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>Private</value> - </data> - <data name="txtDetail.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>Private</value> - </data> - <data name="txtDetail.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>Private</value> - </data> - <data name="txtDetail.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>False</value> - </data> - <data name="splitter1.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>False</value> - </data> - <data name="splitter1.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>Private</value> - </data> - <data name="splitter1.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>Private</value> - </data> - <data name="panel1.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>False</value> - </data> - <data name="panel1.SnapToGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>True</value> - </data> - <data name="panel1.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>Private</value> - </data> - <data name="panel1.GridSize" type="System.Drawing.Size, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>8, 8</value> - </data> - <data name="panel1.DrawGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>True</value> - </data> - <data name="panel1.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>Private</value> - </data> - <data name="$this.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>False</value> - </data> - <data name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>False</value> - </data> - <data name="$this.Localizable" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>False</value> - </data> - <data name="$this.GridSize" type="System.Drawing.Size, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>8, 8</value> - </data> - <data name="$this.Language" type="System.Globalization.CultureInfo, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>(Default)</value> - </data> - <data name="$this.DrawGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>True</value> - </data> - <data name="$this.Name"> - <value>FrmDebugOutput</value> - </data> - <data name="$this.TrayHeight" type="System.Int32, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>80</value> - </data> - <data name="$this.SnapToGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>True</value> - </data> - <data name="$this.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>Private</value> - </data> -</root> \ No newline at end of file
--- a/FrmEditUnitEquipment.cs Wed Sep 09 19:56:24 2009 +0000 +++ b/FrmEditUnitEquipment.cs Sun Sep 13 17:33:36 2009 +0000 @@ -4,7 +4,6 @@ using System; using System.Drawing; -using System.Collections; using System.ComponentModel; using System.Windows.Forms; using IBBoard.Commands;
--- 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())
--- a/FrmNewArmy.cs Wed Sep 09 19:56:24 2009 +0000 +++ b/FrmNewArmy.cs Sun Sep 13 17:33:36 2009 +0000 @@ -4,7 +4,6 @@ using System; using System.Drawing; -using System.Collections; using System.ComponentModel; using System.Windows.Forms; using IBBoard;
--- a/FrmNewUnit.cs Wed Sep 09 19:56:24 2009 +0000 +++ b/FrmNewUnit.cs Sun Sep 13 17:33:36 2009 +0000 @@ -4,7 +4,6 @@ using System; using System.Drawing; -using System.Collections; using System.ComponentModel; using System.Windows.Forms; using IBBoard;
--- a/FrmNewUnitEquipment.cs Wed Sep 09 19:56:24 2009 +0000 +++ b/FrmNewUnitEquipment.cs Sun Sep 13 17:33:36 2009 +0000 @@ -4,7 +4,6 @@ using System; using System.Drawing; -using System.Collections; using System.ComponentModel; using System.Windows.Forms; using IBBoard;
--- a/FrmReplaceUnitEquipment.cs Wed Sep 09 19:56:24 2009 +0000 +++ b/FrmReplaceUnitEquipment.cs Sun Sep 13 17:33:36 2009 +0000 @@ -4,7 +4,6 @@ using System; using System.Drawing; -using System.Collections; using System.ComponentModel; using System.Windows.Forms; using IBBoard;
--- a/FrmSelectSystem.cs Wed Sep 09 19:56:24 2009 +0000 +++ b/FrmSelectSystem.cs Sun Sep 13 17:33:36 2009 +0000 @@ -5,7 +5,6 @@ using System; using System.IO; using System.Drawing; -using System.Collections; using System.ComponentModel; using System.Windows.Forms; using IBBoard;
--- a/IBBoard.WarFoundry.GUI.WinForms.csproj Wed Sep 09 19:56:24 2009 +0000 +++ b/IBBoard.WarFoundry.GUI.WinForms.csproj Sun Sep 13 17:33:36 2009 +0000 @@ -118,9 +118,6 @@ <Compile Include="FrmArmyTree.cs"> <SubType>Form</SubType> </Compile> - <Compile Include="FrmDebugOutput.cs"> - <SubType>Form</SubType> - </Compile> <Compile Include="FrmEditUnitEquipment.cs"> <SubType>Form</SubType> </Compile> @@ -158,9 +155,6 @@ <EmbeddedResource Include="FrmArmyTree.resx"> <DependentUpon>FrmArmyTree.cs</DependentUpon> </EmbeddedResource> - <EmbeddedResource Include="FrmDebugOutput.resx"> - <DependentUpon>FrmDebugOutput.cs</DependentUpon> - </EmbeddedResource> <EmbeddedResource Include="FrmEditUnitEquipment.resx"> <DependentUpon>FrmEditUnitEquipment.cs</DependentUpon> </EmbeddedResource>
--- a/Util/UnitEquipmentChoice.cs Wed Sep 09 19:56:24 2009 +0000 +++ b/Util/UnitEquipmentChoice.cs Sun Sep 13 17:33:36 2009 +0000 @@ -3,7 +3,6 @@ // The file and the library/program it is in are licensed and distributed, without warranty, under the GNU Affero GPL license, either version 3 of the License or (at your option) any later version. Please see COPYING for more information and the full license. using System; -using System.Collections; using IBBoard.WarFoundry.API.Objects; @@ -19,8 +18,6 @@ private Unit unit; private UnitEquipmentItem item; - private static Hashtable equipObjs = new Hashtable(); - public UnitEquipmentChoice(Unit unit, UnitEquipmentItem unitItem) { this.unit = unit;