Example #1
0
        public DownloadSettingsHandler(ILocalSettingHandler settingHandler, ICurrent current, IEnumSettingsHandler enumSettingsHandler, ILocalSettingsContainer container)
        {
            this.settingHandler      = settingHandler;
            this.current             = current;
            this.enumSettingsHandler = enumSettingsHandler;
            this._container          = container;

            this.IsDownloadingVideoInfoEnable  = new ReactiveProperty <bool>(this.settingHandler.GetBoolSetting(SettingsEnum.DLVideoInfo)).AddTo(this.disposables);
            this.IsLimittingCommentCountEnable = new ReactiveProperty <bool>(this.settingHandler.GetBoolSetting(SettingsEnum.LimitCommentsCount)).AddTo(this.disposables);
            this.IsDownloadingVideoEnable      = new ReactiveProperty <bool>(this.settingHandler.GetBoolSetting(SettingsEnum.DLVideo)).AddTo(this.disposables);
            this.IsDownloadingCommentEnable    = new ReactiveProperty <bool>(this.settingHandler.GetBoolSetting(SettingsEnum.DLComment)).AddTo(this.disposables);
            this.IsDownloadingCommentLogEnable = new ReactiveProperty <bool>(this.settingHandler.GetBoolSetting(SettingsEnum.DLKako)).AddTo(this.disposables);
            this.IsDownloadingEasyComment      = new ReactiveProperty <bool>(this.settingHandler.GetBoolSetting(SettingsEnum.DLEasy)).AddTo(this.disposables);
            this.IsDownloadingThumbEnable      = new ReactiveProperty <bool>(this.settingHandler.GetBoolSetting(SettingsEnum.DLThumb)).AddTo(this.disposables);
            this.IsDownloadingOwnerComment     = new ReactiveProperty <bool>(this.settingHandler.GetBoolSetting(SettingsEnum.DLOwner)).AddTo(this.disposables);
            this.IsOverwriteEnable             = new ReactiveProperty <bool>(this.settingHandler.GetBoolSetting(SettingsEnum.DLOverwrite)).AddTo(this.disposables);
            this.IsSkippingEnable = new ReactiveProperty <bool>(this.settingHandler.GetBoolSetting(SettingsEnum.DLSkip)).AddTo(this.disposables);
            this.IsCopyFromAnotherFolderEnable = new ReactiveProperty <bool>(this.settingHandler.GetBoolSetting(SettingsEnum.DLCopy)).AddTo(this.disposables);
            this.IsLimittingCommentCountEnable = new ReactiveProperty <bool>(this.settingHandler.GetBoolSetting(SettingsEnum.LimitCommentsCount)).AddTo(this.disposables);
            this.MaxCommentsCount = new ReactiveProperty <int>(this.settingHandler.GetIntSetting(SettingsEnum.MaxCommentsCount)).AddTo(this.disposables);
            this.IsNoEncodeEnable = new ReactiveProperty <bool>(this.settingHandler.GetBoolSetting(SettingsEnum.DlWithoutEncode)).AddTo(this.disposables);
            this.IsDownloadingIchibaInfoEnable = new ReactiveProperty <bool>(this.settingHandler.GetBoolSetting(SettingsEnum.DlIchiba)).AddTo(this.disposables);
            this.ThumbnailSize            = new ReactiveProperty <VideoInfo::ThumbSize>(this.enumSettingsHandler.GetSetting <VideoInfo::ThumbSize>());
            this.IsAppendingCommentEnable = this._container.GetReactiveBoolSetting(SettingsEnum.AppendComment);

            this.IsDownloadingVideoInfoEnable.Subscribe(value => this.settingHandler.SaveSetting(value, SettingsEnum.DLVideoInfo));
            this.IsDownloadingVideoEnable.Subscribe(value => this.settingHandler.SaveSetting(value, SettingsEnum.DLVideo));
            this.IsDownloadingCommentEnable.Subscribe(value => this.settingHandler.SaveSetting(value, SettingsEnum.DLComment));
            this.IsDownloadingCommentLogEnable.Subscribe(value => this.settingHandler.SaveSetting(value, SettingsEnum.DLKako));
            this.IsDownloadingEasyComment.Subscribe(value => this.settingHandler.SaveSetting(value, SettingsEnum.DLEasy));
            this.IsDownloadingThumbEnable.Subscribe(value => this.settingHandler.SaveSetting(value, SettingsEnum.DLThumb));
            this.IsDownloadingOwnerComment.Subscribe(value => this.settingHandler.SaveSetting(value, SettingsEnum.DLOwner));
            this.IsOverwriteEnable.Subscribe(value => this.settingHandler.SaveSetting(value, SettingsEnum.DLOverwrite));
            this.IsSkippingEnable.Subscribe(value => this.settingHandler.SaveSetting(value, SettingsEnum.DLSkip));
            this.IsCopyFromAnotherFolderEnable.Subscribe(value => this.settingHandler.SaveSetting(value, SettingsEnum.DLCopy));
            this.IsLimittingCommentCountEnable.Subscribe(value => this.settingHandler.SaveSetting(value, SettingsEnum.LimitCommentsCount));
            this.MaxCommentsCount.Subscribe(value => this.settingHandler.SaveSetting(value, SettingsEnum.MaxCommentsCount));
            this.IsNoEncodeEnable.Subscribe(value => this.settingHandler.SaveSetting(value, SettingsEnum.DlWithoutEncode));
            this.IsDownloadingIchibaInfoEnable.Subscribe(value => this.settingHandler.SaveSetting(value, SettingsEnum.DlIchiba));
            this.ThumbnailSize.Subscribe(value => this.enumSettingsHandler.SaveSetting(value));

            this.Resolution = new ReactiveProperty <VideoInfo::IResolution>(new VideoInfo::Resolution("1920x1080"));
        }
 public ContentDownloadHelper(ILogger logger, ILocalContentHandler localContentHandler, ILocalSettingHandler localSettingHandler, IDomainModelConverter converter, IEnumSettingsHandler enumSettingsHander, IPathOrganizer pathOrganizer, IVideoInfoContainer container)
 {
     this.localContentHandler = localContentHandler;
     this.settingHandler      = localSettingHandler;
     this.converter           = converter;
     this.logger = logger;
     this.enumSettingsHandler = enumSettingsHander;
     this.pathOrganizer       = pathOrganizer;
     this.container           = container;
 }
Example #3
0
        public PostDownloadActionsManager(IComPowerManager comPowerManager, ILogger logger, IEnumSettingsHandler settingsHandler)
        {
            this.comPowerManager = comPowerManager;
            this.logger          = logger;
            this.settingsHandler = settingsHandler;

            this.PostDownloadAction = new ReactiveProperty <PostDownloadActions>(this.settingsHandler.GetSetting <PostDownloadActions>());
            this.PostDownloadAction.Subscribe(value =>
            {
                this.settingsHandler.SaveSetting(value);
            });
        }
Example #4
0
 public ThemeHandler(IEnumSettingsHandler settingsHandler, ILogger logger)
 {
     this.settingsHandler = settingsHandler;
     this.logger          = logger;
 }