コード例 #1
0
 protected override void UpdateLocalizableProperties()
 {
     localization = CurrentLanguage.FictionDetailsTab;
     NotifyPropertyChanged(nameof(Year));
     NotifyPropertyChanged(nameof(Pages));
     NotifyPropertyChanged(nameof(FileSize));
     NotifyPropertyChanged(nameof(AddedDateTime));
     NotifyPropertyChanged(nameof(LastModifiedDateTime));
 }
コード例 #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);
        }
コード例 #3
0
 public FictionDetailsItemViewModel(FictionBook libgenObject, Language currentLanguage)
     : base(libgenObject, currentLanguage)
 {
     localization = currentLanguage.FictionDetailsTab;
 }
コード例 #4
0
 public FictionDetailsTabViewModel(MainModel mainModel, IWindowContext parentWindowContext, FictionBook book, bool isInModalWindow)
     : base(mainModel, parentWindowContext, book, book.Title, isInModalWindow, mainModel.AppSettings.Mirrors.FictionBooksMirrorName,
            mainModel.AppSettings.Mirrors.FictionCoversMirrorName)
 {
     localization = mainModel.Localization.CurrentLanguage.FictionDetailsTab;
 }