/// <summary> /// Browses for the download folder. /// </summary> private void OnBrowse() { if (OpenFolderService.ShowDialog() == DialogResult.OK) { Settings.DownloadFolder = OpenFolderService.SelectedPath; } }
public MainWindowViewModel(OpenFolderService openFolderService, PersistedOptionsService persistedOptionsService) { this._openFolderService = openFolderService; this._persistedOptionsService = persistedOptionsService; this._logsBuilder = new StringBuilder(); this._tokenSource = new CancellationTokenSource(); this.LoadDefaultProperties(); this.ExportCommand = ReactiveCommand.Create(this.Export, this.CreateCanExportObservable()); this.CancelCommand = ReactiveCommand.Create(this.Cancel, this.CreateCanCancelObservable()); this.SelectDirectoryCommand = ReactiveCommand.Create(this.SelectDirectory, this.CreateCanSelectDirectoryObservable()); _ = LoadOptionsAsync(); }