Exemplo n.º 1
0
        public override void Save()
        {
            base.Save();

            this.mangaSetting.CompressManga        = this.CompressManga;
            this.mangaSetting.DefaultCompression   = this.DefaultCompression;
            this.mangaSetting.Folder               = this.Folder;
            this.mangaSetting.OnlyUpdate           = this.OnlyUpdate;
            this.mangaSetting.FolderNamingStrategy = this.FolderNamingStrategy.Selected.Id;
            this.Login.Save();
            this.mangaSetting.Save();
        }
Exemplo n.º 2
0
        public MangaSettingModel(MangaSetting setting)
        {
            this.mangaSetting     = setting;
            this.Header           = setting.MangaName;
            this.CompressionModes = Generic.GetEnumValues <Compression.CompressionMode>();

            this.CompressManga      = this.mangaSetting.CompressManga;
            this.DefaultCompression = this.mangaSetting.DefaultCompression;
            this.Folder             = this.mangaSetting.Folder;
            this.OnlyUpdate         = this.mangaSetting.OnlyUpdate;
            this.Login = new LoginModel(this.mangaSetting.Login)
            {
                IsEnabled = true
            };

            this.FolderNamingStrategy = new FolderNamingModel();
            this.FolderNamingStrategy.Strategies.Insert(0, new FolderNamingStrategyDto()
            {
                Name = "Использовать общие настройки"
            });
            this.FolderNamingStrategy.SelectedGuid = mangaSetting.FolderNamingStrategy;
        }