internal ScanPageViewModel(ILogger logger, IScannedFileStore scannedFileStore, string userAppDataPath) : base(scannedFileStore, userAppDataPath) { _logger = logger; Locations = new List <ScanLocation>(); Progress = 0; ScanComplete += ShowResultPage; Loaded = AsyncCommand.Create(OnLoaded); }
/// <summary> /// Internally exposed constructor for Unit Testing /// </summary> internal HomePageViewModel( IFolderBrowserDialogWrapper folderBrowserDialog, IScannedFileStore scannedFileStore, string userAppDataPath) : base(scannedFileStore, userAppDataPath) { _folderBrowserDialog = folderBrowserDialog; _userAppDataPath = userAppDataPath; this.Locations = new ObservableCollection <ScanLocation>(); _add = DelegateCommand.Create(AddLocation); _remove = DelegateCommand.Create(RemoveLocation, false); _scan = DelegateCommand.Create(ShowScanPage, false); this.Add = _add; this.Remove = _remove; this.Scan = _scan; this.PageLoaded = AsyncCommand.Create(OnPageLoaded); }
internal ResultPageViewModel( ILogger logger, IProcess process, IRecycleFile recycleFile, string userAppDataPath, IScannedFileStore scannedFileStore) : base(scannedFileStore, userAppDataPath) { _logger = logger; _process = process; _recycle = AsyncCommand.Create(() => RecycleSelectionAsync()); _preview = AsyncCommand.Create(() => PreviewSelectionAsync(), false); _recycleFile = recycleFile; _userAppDataPath = userAppDataPath; Duplicates = new ObservableCollection <ScanResult>(); DuplicatesViewSource = new CollectionViewSource(); DuplicatesViewSource.Source = Duplicates; PageLoaded = AsyncCommand.Create(() => PageLoadedAsync()); Recycle = _recycle; Preview = _preview; SelectedItemsChangedCommand = DelegateCommand.Create(ToggleButtons); }
/// <summary> /// Set the ScannedFileStore for this ScanPageViewModel /// </summary> internal void SetScannedFileStore(IScannedFileStore scannedFileStore) { _scannedFileStore = scannedFileStore; }
public BaseViewModel(IScannedFileStore scannedFileStore, string userAppDataPath) { _scannedFileStore = scannedFileStore; }