public void LoadLanguage(int langCode) { if (langCode != LangMan.LS_DEF_CODE) { bool loaded = false; foreach (LangRecord langRec in fLanguages) { if (langRec.Code == langCode) { loaded = LangMan.LoadFromFile(langRec.FileName); break; } } if (!loaded) { langCode = LangMan.LS_DEF_CODE; } } if (langCode == LangMan.LS_DEF_CODE) { LangMan.DefInit(); } fInterfaceLang = (ushort)langCode; }
public void SetUp() { WFAppHost.ConfigureBootstrap(false); LangMan.DefInit(); fContext = TestUtils.CreateContext(); TestUtils.FillContext(fContext); }
public void SetUp() { WFAppHost.ConfigureBootstrap(false); AppHost.Container.Register <IProgressController, ProgressStub>(LifeCycle.Singleton, true); LangMan.DefInit(); fContext = TestUtils.CreateContext(); TestUtils.FillContext(fContext); }
public void SetUp() { TestUtils.InitGEDCOMProviderTest(); WFAppHost.ConfigureBootstrap(false); TestUtils.InitProgressStub(); LangMan.DefInit(); fContext = TestUtils.CreateContext(); TestUtils.FillContext(fContext); }
public void SetUp() { TestUtils.InitGEDCOMProviderTest(); WFAppHost.ConfigureBootstrap(false); LangMan.DefInit(); fBaseWin = new BaseWindowStub(); TestUtils.InitProgressStub(); }
public void SetUp() { WFAppHost.ConfigureBootstrap(false); LangMan.DefInit(); fBaseWin = new BaseWindowStub(); AppHost.Container.Register <IProgressController, ProgressStub>(LifeCycle.Singleton, true); fProgress = new ProgressStub(); }
public void SetUp() { // for static initialization GEDCOMProvider.SkipEmptyTag((int)GEDCOMTagType._AWARD); WFAppHost.ConfigureBootstrap(false); LangMan.DefInit(); fContext = TestUtils.CreateContext(); TestUtils.FillContext(fContext); }
public void SetUp() { // for static initialization GEDCOMProvider.SkipEmptyTag((int)GEDCOMTagType._AWARD); WFAppHost.ConfigureBootstrap(false); AppHost.Container.Register <IProgressController, ProgressStub>(LifeCycle.Singleton, true); LangMan.DefInit(); fContext = TestUtils.CreateContext(); TestUtils.FillContext(fContext); }
public void SetUp() { // for static initialization GEDCOMProvider.SkipEmptyTag((int)GEDCOMTagType._AWARD); WFAppHost.ConfigureBootstrap(false); LangMan.DefInit(); fBaseWin = new BaseWindowStub(); AppHost.Container.Register <IProgressController, ProgressStub>(LifeCycle.Singleton, true); fProgress = new ProgressStub(); }
public void LoadLanguage(int langCode) { try { if (langCode <= 0) { langCode = RequestLanguage(); } if (langCode != LangMan.LS_DEF_CODE) { bool loaded = false; foreach (LangRecord langRec in AppHost.Options.Languages) { if (langRec.Code == langCode) { loaded = LangMan.LoadFromFile(langRec.FileName); break; } } if (!loaded) { langCode = LangMan.LS_DEF_CODE; } } if (langCode == LangMan.LS_DEF_CODE) { LangMan.DefInit(); } AppHost.Options.InterfaceLang = (ushort)langCode; AppHost.Plugins.OnLanguageChange(); UpdateLang(); } catch (Exception ex) { Logger.LogWrite("AppHost.LoadLanguage(): " + ex.Message); } }