comparison FrmMain.cs @ 5:26fc79eeda37

Fixes #31 - Add log4net logging to WinForms interface * Reference IBBoard.Log4Net project * Register notify handler in main form
author IBBoard <dev@ibboard.co.uk>
date Sun, 01 Mar 2009 15:27:12 +0000
parents 8935971e307c
children 9828ba4f3f36
comparison
equal deleted inserted replaced
4:5064ad3b16f7 5:26fc79eeda37
9 using System.ComponentModel; 9 using System.ComponentModel;
10 using System.Windows.Forms; 10 using System.Windows.Forms;
11 using System.Data; 11 using System.Data;
12 using System.IO; 12 using System.IO;
13 using System.Threading; 13 using System.Threading;
14 using log4net;
14 using IBBoard; 15 using IBBoard;
15 using IBBoard.CustomMath; 16 using IBBoard.CustomMath;
16 using IBBoard.Commands; 17 using IBBoard.Commands;
17 using IBBoard.IO; 18 using IBBoard.IO;
18 using IBBoard.Lang; 19 using IBBoard.Lang;
20 using IBBoard.Log4Net;
21 using IBBoard.Windows.Forms;
22 using IBBoard.Windows.Forms.I18N;
23 using IBBoard.Xml;
19 using IBBoard.WarFoundry.API; 24 using IBBoard.WarFoundry.API;
20 using IBBoard.WarFoundry.API.Commands; 25 using IBBoard.WarFoundry.API.Commands;
21 using IBBoard.Windows.Forms;
22 using IBBoard.Xml;
23 using log4net;
24 using IBBoard.WarFoundry.API.Objects; 26 using IBBoard.WarFoundry.API.Objects;
25 using IBBoard.Windows.Forms.I18N;
26 using IBBoard.WarFoundry.API.Savers; 27 using IBBoard.WarFoundry.API.Savers;
27 28
28 namespace IBBoard.WarFoundry 29 namespace IBBoard.WarFoundry
29 { 30 {
30 /// <summary> 31 /// <summary>
89 private System.Windows.Forms.Panel pnlRight; 90 private System.Windows.Forms.Panel pnlRight;
90 91
91 public FrmMain(string[] args) 92 public FrmMain(string[] args)
92 { 93 {
93 this.Closing+=new CancelEventHandler(FrmMain_Closing); 94 this.Closing+=new CancelEventHandler(FrmMain_Closing);
94 CommandStack.CommandStackUpdated+=new MethodInvoker(commandStack_CommandStackUpdated); 95 CommandStack.CommandStackUpdated += new MethodInvoker(commandStack_CommandStackUpdated);
96 LogNotifierHandler.RegisterNotifierHandler();
95 97
96 InitializeComponent(); 98 InitializeComponent();
97 99
98 Preferences = new Preferences("WarFoundry"); 100 Preferences = new Preferences("WarFoundry");
99 Translation.InitialiseTranslations(Constants.ExecutablePath, Preferences["language"].ToString()); 101 Translation.InitialiseTranslations(Constants.ExecutablePath, Preferences["language"].ToString());