comparison FrmMain.cs @ 13:f7f65d80951e

Closes #38 - Stop missing translation being fatal * Catch exception from translation initialisation and display dialog box
author IBBoard <dev@ibboard.co.uk>
date Tue, 19 May 2009 19:24:26 +0000
parents 19bdbb80999c
children 76a15df10fa6
comparison
equal deleted inserted replaced
12:fb55f9f0865e 13:f7f65d80951e
99 LogNotifierHandler.RegisterNotifierHandler(); 99 LogNotifierHandler.RegisterNotifierHandler();
100 100
101 InitializeComponent(); 101 InitializeComponent();
102 102
103 Preferences = new Preferences("WarFoundry"); 103 Preferences = new Preferences("WarFoundry");
104 Translation.InitialiseTranslations(Constants.ExecutablePath, Preferences["language"].ToString()); 104 try
105 {
106 Translation.InitialiseTranslations(Constants.ExecutablePath, Preferences["language"].ToString());
107 }
108 catch (TranslationLoadException ex)
109 {
110 logger.Error(ex);
111 MessageBox.Show(this, "Translation loading failed for language " + Preferences["language"].ToString(), "Translation failure", MessageBoxButtons.OK, MessageBoxIcon.Error);
112 }
105 113
106 //pnlRight.Left = ClientSize.Width - pnlRight.Width - 2; 114 //pnlRight.Left = ClientSize.Width - pnlRight.Width - 2;
107 //pnlRight.Top = toolBar.Height + 5; 115 //pnlRight.Top = toolBar.Height + 5;
108 //pnlRight.Height = ClientRectangle.Bottom - statusBar.Height - pnlRight.Top - 3; 116 //pnlRight.Height = ClientRectangle.Bottom - statusBar.Height - pnlRight.Top - 3;
109 117