public DownLoadManagerViewModel(DownLoadManagerModel downLoadManagerModel)
 {
     readerWriterLockSlim=new ReaderWriterLockSlim();
     DownLoadEntities = new ObservableCollection<DownloadEntityViewModel>();
     BindingOperations.EnableCollectionSynchronization(DownLoadEntities, syncobject);
     this.downLoadManagerModel = downLoadManagerModel;
     downLoadManagerModel.DownLoadEntitiesChange += downLoadManagerModel_DownLoadEntitiesChange;
 }
 public SubscribeManager(IListFileParser listFileParser, DownLoadManagerModel downLoadManagerModel)
 {
     DownLoadManagerModel = downLoadManagerModel;
     
     SerialModelsCollection = new ObservableCollection<SerialModel>();
     BindingOperations.EnableCollectionSynchronization(SerialModelsCollection, lockobject);
    
     cts = new CancellationTokenSource();
     Task.Factory.StartNew(async () =>await AddNewSeriesToDownloadQueue(cts.Token), cts.Token, TaskCreationOptions.LongRunning, TaskScheduler.Default);
 }
Esempio n. 3
0
        public Controller(ISerialsSearch serialsSearch, DownLoadManagerModel downLoadManagerModel, ISubscribeManager subscribeManager, IListFileParser listFileParser)
        {
            SerialsSearch = serialsSearch;
            DownLoadManagerModel = downLoadManagerModel;
            SubscribeManager = subscribeManager;
            saver = new Saver((SubscribeManager)subscribeManager);
            SubscribeManager.SerialModelsCollection = saver.Load(listFileParser);

            this.listFileParser = listFileParser;
              Application.Current.MainWindow.Closed += MainWindow_Closed;
        }