예제 #1
0
        public FilesConvertingViewModel(IApplicationGadzhi applicationGadzhi, IStatusProcessingInformation statusProcessingInformation,
                                        IDialogService dialogService)
        {
            _applicationGadzhi           = applicationGadzhi;
            _statusProcessingInformation = statusProcessingInformation;
            DialogService = dialogService;

            FilesDataCollection = new ObservableCollection <FileDataViewModelItem>();
            applicationGadzhi.FileDataChange.Subscribe(OnFilesInfoUpdated);

            InitializeDelegateCommands();
        }
        public FilesErrorsViewModel(IApplicationGadzhi applicationGadzhi, IStatusProcessingInformation statusProcessingInformation,
                                    IDialogService dialogService)
        {
            if (applicationGadzhi == null)
            {
                throw new ArgumentNullException(nameof(applicationGadzhi));
            }
            DialogService = dialogService ?? throw new ArgumentNullException(nameof(dialogService));

            applicationGadzhi.FileDataChange.Subscribe(ActionOnTypeStatusChange);
            _statusProcessingInformation = statusProcessingInformation ?? throw new ArgumentNullException(nameof(statusProcessingInformation));

            FilesErrorsCollection = new ObservableCollection <FileErrorViewModelItem>();
            BindingOperations.EnableCollectionSynchronization(FilesErrorsCollection, _filesErrorsCollectionLock);
        }