comparison FrmMain.cs @ 85:0bb9f40d44eb

Re #88: Complete initial WinForms UI * Add basic initial "about" box * Translations (below) Re #179: Make sure that translations are used throughout UI * Make all controls translatable * Supply translations for all controls Re #204: Use new limits in WinForms UI * Warn the user and cap the number if we try to go out of range for equipment
author IBBoard <dev@ibboard.co.uk>
date Sat, 31 Oct 2009 20:54:42 +0000
parents c243b043aa62
children 4c5c8f91937a
comparison
equal deleted inserted replaced
84:1e85a0687e4d 85:0bb9f40d44eb
34 /// Summary description for Form1. 34 /// Summary description for Form1.
35 /// </summary> 35 /// </summary>
36 public class FrmMain : System.Windows.Forms.Form 36 public class FrmMain : System.Windows.Forms.Form
37 { 37 {
38 private static readonly string AppTitle = "WarFoundry"; 38 private static readonly string AppTitle = "WarFoundry";
39 internal static readonly string VERSION = "0.1b4";
39 const string DefaultDataDir = "data"; 40 const string DefaultDataDir = "data";
40 41
41 private Preferences preferences; 42 private Preferences preferences;
42 private readonly ILog log = LogManager.GetLogger(typeof(FrmMain)); 43 private readonly ILog log = LogManager.GetLogger(typeof(FrmMain));
43 44
496 this.menuHelp.Text = "&help"; 497 this.menuHelp.Text = "&help";
497 this.menuHelp.Name = "menuHelp"; 498 this.menuHelp.Name = "menuHelp";
498 // 499 //
499 // miAbout 500 // miAbout
500 // 501 //
501 this.miAbout.Enabled = false;
502 this.miAbout.Index = 0; 502 this.miAbout.Index = 0;
503 this.miAbout.Text = "&about"; 503 this.miAbout.Text = "&about";
504 this.miAbout.Name = "miAbout"; 504 this.miAbout.Name = "miAbout";
505 this.miAbout.Click += new System.EventHandler(this.miAbout_Click);
505 // 506 //
506 // saveArmyDialog 507 // saveArmyDialog
507 // 508 //
508 this.saveArmyDialog.Title = "Translatable:saveArmyDialog"; 509 this.saveArmyDialog.Title = "Translatable:saveArmyDialog";
509 // 510 //
1306 WarFoundryCore.CurrentGameSystem = sys; 1307 WarFoundryCore.CurrentGameSystem = sys;
1307 log.InfoFormat("Loaded game system {0} from properties", gameSystemID); 1308 log.InfoFormat("Loaded game system {0} from properties", gameSystemID);
1308 } 1309 }
1309 } 1310 }
1310 } 1311 }
1312
1313 private void miAbout_Click(object sender, EventArgs e)
1314 {
1315 FrmAbout about = new FrmAbout();
1316 about.ShowDialog(this);
1317 }
1311 } 1318 }
1312 } 1319 }