public void FixtureInit() { #if FailsWithMessageAboutNeedingWebBrowseerToBeInSingleThreadedApartment m_app = new CabhabApp(); Form m_form = m_app.NewMainWindow(true); m_htmlviewer = (HtmlViewer)m_app.m_form.CurrentContentControl; #endif m_lang = new Language(); m_lang.AnswerFile = Path.Combine(m_ksTestData, "IsthmusZapotec2.paw"); m_lang.LoadAnswerFile(m_lang.AnswerFile); }
public void SaveInterfaceLanguage() { string sOldInterfaceLanguage = m_mediator.PropertyTable.GetStringProperty("CurrentInterfaceLanguage", "en"); if (sOldInterfaceLanguage != m_sInterfaceLanguage) { m_mediator.PropertyTable.SetProperty("CurrentInterfaceLanguage", m_sInterfaceLanguage); string[] asTemp = new string[2]; asTemp[0] = "CurrentInterfaceLanguage"; asTemp[1] = m_sInterfaceLanguage; m_mediator.PropertyTable.Save("CabhabCurrentInterfaceLanguage", asTemp); #if AfterHandleConfigMenuItemsGenerically CultureInfo ci = MiscUtils.GetCultureForWs(m_sInterfaceLanguage); if (ci != null) { #if !__MonoCS__ FormLanguageSwitchSingleton.Instance.ChangeCurrentThreadUICulture(ci); object mainWindowForm = m_mediator.PropertyTable.GetValue("window"); if (mainWindowForm != null) { FormLanguageSwitchSingleton.Instance.ChangeLanguage((Form)mainWindowForm); } #else // TODO-Linux: Investigate FormLanguageSwitchSingleton #endif } // Reload the mediator's string table with the appropriate language data. m_mediator.StringTbl.Reload(m_sInterfaceLanguage); #endif object mainWindowForm = m_mediator.PropertyTable.GetValue("window"); if (mainWindowForm != null) { CabhabApp ca = mainWindowForm as CabhabApp; ca.ReLoadMenuBarContents(); } m_mediator.StringTbl.Reload("en"); } }
public static int Main(string[] rgArgs) { Cursor.Current = Cursors.AppStarting; CabhabApp app; if (rgArgs.Length == 0) { app = new CabhabApp(); } else { // currently assuming a command line syntax of: // -x configfile answerfile // or // -x configfile // or // answerfile if (rgArgs[0] == "-x" && rgArgs.Length >= 2) { app = new CabhabApp(rgArgs[1]); if (rgArgs.Length >= 3) { app.SetAnswerFile(rgArgs[2]); } } else { // assume is case of being launched from explorer app = new CabhabApp(); app.SetAnswerFile(rgArgs[0]); } } Application.Run(app.NewMainWindow(false)); return(0); }
public static int Main(string[] rgArgs) { return(CabhabApp.Main(rgArgs)); }
public static int Main(string[] rgArgs) { Cursor.Current = Cursors.AppStarting; CabhabApp app; if (rgArgs.Length == 0) app = new CabhabApp(); else { // currently assuming a command line syntax of: // -x configfile answerfile // or // -x configfile // or // answerfile if (rgArgs[0] == "-x" && rgArgs.Length >= 2) { app = new CabhabApp(rgArgs[1]); if (rgArgs.Length >= 3) app.SetAnswerFile(rgArgs[2]); } else { // assume is case of being launched from explorer app = new CabhabApp(); app.SetAnswerFile(rgArgs[0]); } } Application.Run(app.NewMainWindow(false)); return 0; }