private void Initialize()
 {
     localization         = MainModel.Localization.CurrentLanguage.SciMagSearchResultsTab;
     isArticleGridVisible = true;
     isStatusBarVisible   = true;
     UpdateArticleCount();
     Events.RaiseEvent(ViewModelEvent.RegisteredEventId.FOCUS_SEARCH_TEXT_BOX);
 }
예제 #2
0
        public Language(List <Translation> prioritizedTranslationList, decimal percentTranslated)
        {
            translations      = prioritizedTranslationList;
            mainWindow        = null;
            setupWizardWindow = null;
            setupWizardProxySettingsWindowLocalizator = null;
            searchTab = null;
            nonFictionSearchResultsTab = null;
            fictionSearchResultsTab    = null;
            sciMagSearchResultsTab     = null;
            commonDetailsTab           = null;
            nonFictionDetailsTab       = null;
            fictionDetailsTab          = null;
            sciMagDetailsTab           = null;
            import             = null;
            exportPanel        = null;
            nonFictionExporter = null;
            fictionExporter    = null;
            sciMagExporter     = null;
            synchronization    = null;
            database           = null;
            databaseError      = null;
            sqlDebugger        = null;
            downloadManager    = null;
            applicationUpdate  = null;
            settings           = null;
            about       = null;
            messageBox  = null;
            errorWindow = null;
            Translation mainTranslation = prioritizedTranslationList.First();

            Name          = mainTranslation.General?.Name?.Trim() ?? String.Empty;
            LocalizedName = mainTranslation.General?.LocalizedName?.Trim() ?? String.Empty;
            if (!String.IsNullOrEmpty(Name) && !String.IsNullOrEmpty(LocalizedName))
            {
                DisplayName = $"{Name} ({LocalizedName})";
            }
            else
            {
                DisplayName = "Error";
            }
            CultureCode       = mainTranslation.General?.CultureCode?.Trim() ?? String.Empty;
            TranslatorName    = mainTranslation.General?.TranslatorName ?? "unknown";
            PercentTranslated = percentTranslated;
            Formatter         = new LanguageFormatter(prioritizedTranslationList);
        }
 private void Initialize()
 {
     localization = MainModel.Localization.CurrentLanguage.SciMagSearchResultsTab;
     UpdateArticleCount();
 }