Mercurial > repos > IBDev-IBBoard.WarFoundry.GUI.WinForms
changeset 15:76a15df10fa6
Re #88 - Complete initial WinForms UI
* Disable "New Army" button on start up in case we don't have a game system
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Mon, 25 May 2009 11:32:24 +0000 |
parents | 8379fa964dd3 |
children | e45af3c75b4e |
files | FrmMain.cs |
diffstat | 1 files changed, 11 insertions(+), 24 deletions(-) [+] |
line wrap: on
line diff
--- a/FrmMain.cs Mon May 25 10:30:42 2009 +0000 +++ b/FrmMain.cs Mon May 25 11:32:24 2009 +0000 @@ -100,15 +100,15 @@ InitializeComponent(); - Preferences = new Preferences("WarFoundry"); - try - { - Translation.InitialiseTranslations(Constants.ExecutablePath, Preferences["language"].ToString()); - } - catch (TranslationLoadException ex) - { - logger.Error(ex); - MessageBox.Show(this, "Translation loading failed for language " + Preferences["language"].ToString(), "Translation failure", MessageBoxButtons.OK, MessageBoxIcon.Error); + Preferences = new Preferences("WarFoundry"); + try + { + Translation.InitialiseTranslations(Constants.ExecutablePath, Preferences["language"].ToString()); + } + catch (TranslationLoadException ex) + { + logger.Error(ex); + MessageBox.Show(this, "Translation loading failed for language " + Preferences["language"].ToString(), "Translation failure", MessageBoxButtons.OK, MessageBoxIcon.Error); } //pnlRight.Left = ClientSize.Width - pnlRight.Width - 2; @@ -373,6 +373,7 @@ // // bttnSep1 // + this.bttnSep1.Name = ""; this.bttnSep1.Style = System.Windows.Forms.ToolBarButtonStyle.Separator; // // bttnUndo @@ -426,21 +427,19 @@ this.miSep3, this.miExit}); this.menuFile.Text = "&file"; - this.menuFile.Name = "menuFile"; // // miNewArmy // + this.miNewArmy.Enabled = false; this.miNewArmy.Index = 0; this.miNewArmy.Text = "&new army"; this.miNewArmy.Click += new System.EventHandler(this.miNewArmy_Click); - this.miNewArmy.Name = "miNewArmy"; // // miOpenArmy // this.miOpenArmy.Index = 1; this.miOpenArmy.Text = "&open army"; this.miOpenArmy.Click += new System.EventHandler(this.miOpenArmy_Click); - this.miOpenArmy.Name = "miOpenArmy"; // // miSaveArmy // @@ -448,7 +447,6 @@ this.miSaveArmy.Index = 2; this.miSaveArmy.Text = "&save army"; this.miSaveArmy.Click += new System.EventHandler(this.miSaveArmy_Click); - this.miSaveArmy.Name = "miSaveArmy"; // // miSaveArmyAs // @@ -456,7 +454,6 @@ this.miSaveArmyAs.Index = 3; this.miSaveArmyAs.Text = "save army &as..."; this.miSaveArmyAs.Click += new System.EventHandler(this.miSaveArmyAs_Click); - this.miSaveArmyAs.Name = "miSaveArmyAs"; // // miCloseArmy // @@ -464,7 +461,6 @@ this.miCloseArmy.Index = 4; this.miCloseArmy.Text = "&close army"; this.miCloseArmy.Click += new System.EventHandler(this.miCloseArmy_Click); - this.miCloseArmy.Name = "miCloseArmy"; // // miSep1 // @@ -476,7 +472,6 @@ this.miChangeSystem.Index = 6; this.miChangeSystem.Text = "change &game system"; this.miChangeSystem.Click += new System.EventHandler(this.miChangeSystem_Click); - this.miChangeSystem.Name = "miChangeSystem"; // // miSep2 // @@ -488,7 +483,6 @@ this.miReloadFiles.Index = 8; this.miReloadFiles.Text = "&reload files"; this.miReloadFiles.Click += new System.EventHandler(this.miReloadFiles_Click); - this.miReloadFiles.Name = "miReloadFiles"; // // miSep3 // @@ -500,7 +494,6 @@ this.miExit.Index = 10; this.miExit.Text = "e&xit"; this.miExit.Click += new System.EventHandler(this.miExit_Click); - this.miExit.Name = "miExit"; // // menuEdit // @@ -509,7 +502,6 @@ this.miUndo, this.miRedo}); this.menuEdit.Text = "&edit"; - this.menuEdit.Name = "menuEdit"; // // miUndo // @@ -517,7 +509,6 @@ this.miUndo.Index = 0; this.miUndo.Text = "&undo"; this.miUndo.Click += new System.EventHandler(this.miUndo_Click); - this.miUndo.Name = "miUndo"; // // miRedo // @@ -525,7 +516,6 @@ this.miRedo.Index = 1; this.miRedo.Text = "&redo"; this.miRedo.Click += new System.EventHandler(this.miRedo_Click); - this.miRedo.Name = "miRedo"; // // menuHelp // @@ -534,21 +524,18 @@ this.miAbout, this.miDebugWindow}); this.menuHelp.Text = "&help"; - this.menuHelp.Name = "menuHelp"; // // miAbout // this.miAbout.Enabled = false; this.miAbout.Index = 0; this.miAbout.Text = "&about"; - this.miAbout.Name = "miAbout"; // // miDebugWindow // this.miDebugWindow.Index = 1; this.miDebugWindow.Text = "&debug"; this.miDebugWindow.Click += new System.EventHandler(this.miDebugWindow_Click); - this.miDebugWindow.Name = "miDebugWindow"; // // saveArmyDialog //