Пример #1
0
        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;
        }
Пример #2
0
        public void SetUp()
        {
            WFAppHost.ConfigureBootstrap(false);

            LangMan.DefInit();

            fContext = TestUtils.CreateContext();
            TestUtils.FillContext(fContext);
        }
Пример #3
0
        public void SetUp()
        {
            WFAppHost.ConfigureBootstrap(false);
            AppHost.Container.Register <IProgressController, ProgressStub>(LifeCycle.Singleton, true);

            LangMan.DefInit();

            fContext = TestUtils.CreateContext();
            TestUtils.FillContext(fContext);
        }
Пример #4
0
        public void SetUp()
        {
            TestUtils.InitGEDCOMProviderTest();
            WFAppHost.ConfigureBootstrap(false);
            TestUtils.InitProgressStub();
            LangMan.DefInit();

            fContext = TestUtils.CreateContext();
            TestUtils.FillContext(fContext);
        }
Пример #5
0
        public void SetUp()
        {
            TestUtils.InitGEDCOMProviderTest();
            WFAppHost.ConfigureBootstrap(false);
            LangMan.DefInit();

            fBaseWin = new BaseWindowStub();

            TestUtils.InitProgressStub();
        }
Пример #6
0
        public void SetUp()
        {
            WFAppHost.ConfigureBootstrap(false);

            LangMan.DefInit();

            fBaseWin = new BaseWindowStub();

            AppHost.Container.Register <IProgressController, ProgressStub>(LifeCycle.Singleton, true);
            fProgress = new ProgressStub();
        }
Пример #7
0
        public void SetUp()
        {
            // for static initialization
            GEDCOMProvider.SkipEmptyTag((int)GEDCOMTagType._AWARD);

            WFAppHost.ConfigureBootstrap(false);

            LangMan.DefInit();

            fContext = TestUtils.CreateContext();
            TestUtils.FillContext(fContext);
        }
Пример #8
0
        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);
        }
Пример #9
0
        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();
        }
Пример #10
0
        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);
            }
        }