public RecordTargetDownloaderViewModel([NotNull] StatusBarStateViewModel statusBarStateModel,
                                        [NotNull] IRecordTargetDownloaderPlugin recordTargetDownloaderPlugin,
                                        [NotNull] Func <IReadOnlyCollection <IAudioBook> > getSelectedRecordsFunc)
     : base(statusBarStateModel)
 {
     _recordTargetDownloaderPlugin = recordTargetDownloaderPlugin;
     _getSelectedRecordsFunc       = getSelectedRecordsFunc;
 }
Esempio n. 2
0
        public AbCatViewModel()
        {
            RecordsListUc =
                Context.I.ComponentFactory.CreateActual <IRecordsListPlugin>();
            RecordsListUc.Data  = new List <IAudioBook>();
            StatusBarStateModel = new StatusBarStateViewModel(IsCanCancelAsyncOperation, CancelAsyncOperation);

            SiteParserModel = new WebSiteParserViewModel(this, () => SelectedItems);

            RecordTargetDownloaderModel = new RecordTargetDownloaderViewModel(StatusBarStateModel,
                                                                              Context.I.ComponentFactory.CreateActual <IRecordTargetDownloaderPlugin>(), () => SelectedItems);
            Filter =
                Context.I.ComponentFactory.CreateActual <IFilteringLogicPlugin>();
            Filter.PropertyChanged += FilterPropertyChanged;
            //Filter.UpdateCache(UpdateTypes.Hidden | UpdateTypes.Loaded | UpdateTypes.Values);
            NormalizationSettingsEditorModel = new NormalizationSettingsEditorViewModel();
            GroupingLogicModel =
                new GroupingLogicViewModel(
                    Context.I.ComponentFactory.GetCreators <IGroupingLogicPlugin>()
                    .Select(item => item.GetInstance <IGroupingLogicPlugin>()));
            GroupingLogicModel.PropertyChanged += GroupingLogicModel_PropertyChanged;
            Context.I.EventAggregator.Subscribe(this);
        }
Esempio n. 3
0
 protected AsyncOperationViewModelBase([NotNull] StatusBarStateViewModel statusBarStateModel)
 {
     StatusBarStateModel = statusBarStateModel;
     Context.I.EventAggregator.Subscribe(this);
 }