Example #1
0
        public SortInfoHandler(IPlaylistHandler playlistHandler, ICurrent current, IVideoListContainer container, ILogger logger)
        {
            this.playlistHandler = playlistHandler;
            this.current         = current;
            this.container       = container;
            this.logger          = logger;

            this.SortType             = new ReactiveProperty <VideoSortType>(current.SelectedPlaylist.Value?.VideoSortType ?? VideoSortType.Register);
            this.IsDescending         = new ReactiveProperty <bool>(current.SelectedPlaylist.Value?.IsVideoDescending ?? false);
            this.IdColumnTitle        = new ReactiveProperty <string>(DefaultIdColumnTitle);
            this.TitleColumnTitle     = new ReactiveProperty <string>(DefaultTitleColumnTitle);
            this.UploadColumnTitle    = new ReactiveProperty <string>(DefaultUploadColumnTitle);
            this.DlFlagColumnTitle    = new ReactiveProperty <string>(DefaultDlFlagColumnTitle);
            this.ViewCountColumnTitle = new ReactiveProperty <string>(DefaultViewCountColumnTitle);
            this.StateColumnTitle     = new ReactiveProperty <string>(DefaultStateColumnTitle);
            this.EconomyColumnTitle   = new ReactiveProperty <string>(DefaultEconomyColumnTitle);
            this.SortTypeStr          = this.SortType.Select(value => value switch
            {
                VideoSortType.NiconicoID => DefaultIdColumnTitle,
                VideoSortType.Title => DefaultTitleColumnTitle,
                VideoSortType.UploadedDT => DefaultUploadColumnTitle,
                VideoSortType.ViewCount => DefaultViewCountColumnTitle,
                VideoSortType.Custom => "カスタム",
                VideoSortType.State => DefaultStateColumnTitle,
                VideoSortType.Economy => DefaultEconomyColumnTitle,
                _ => "登録順",
            }).ToReactiveProperty().AddTo(this.disposables);
Example #2
0
 public OnlineVideoRefreshManager(ICurrent current, IVideoListContainer container, INetworkVideoHandler netVideoHandler, IRemotePlaylistHandler remotePlaylistHandler, IMessageHandler message, IVideosUnchecker unchecker)
 {
     this._current               = current;
     this._container             = container;
     this._netVideoHandler       = netVideoHandler;
     this._remotePlaylistHandler = remotePlaylistHandler;
     this._message               = message;
     this._unchcecker            = unchecker;
 }
 public VideoRegistrationHandler(IVideoIDHandler idHandler, IMessageHandler messageHandler, ICurrent current, IVideoListContainer container)
 {
     this.IsProcessing    = idHandler.IsProcessing.ToReadOnlyReactivePropertySlim();
     this._idHandler      = idHandler;
     this._messageHandler = messageHandler;
     this._currrent       = current;
     this._container      = container;
 }
Example #4
0
    public DownloadTask(IPlaylistHandler playlistHandler, IMessageHandler messageHandler, IContentDownloadHelper contentDownloadHelper, IVideoListContainer container, IVideosUnchecker unchecker)
    {
        this._cts                   = new CancellationTokenSource();
        this._messageHandler        = messageHandler;
        this._contentDownloadHelper = contentDownloadHelper;
        this._playlistHandler       = playlistHandler;
        this._container             = container;
        this._unchecker             = unchecker;

        this.OnWait       = _ => { };
        this.TaskFunction = async(_, _) => await this.DownloadAsync();

        this.IsCompleted  = new ReactiveProperty <bool>().AddTo(this.disposables);
        this.IsProcessing = new ReactiveProperty <bool>().AddTo(this.disposables);
        this.IsCanceled   = new ReactiveProperty <bool>().AddTo(this.disposables);
        this.Message      = new ReactiveProperty <string>("未初期化").AddTo(this.disposables);

        this.Resolution.Subscribe(value =>
        {
            if (this._settings is not null)
            {
                this._settings.VerticalResolution = value;
            }
        });
    }