public async void ExportAll() { _exportAll = false; try { var exportFilePath = _persistenceService.GetFilePath("*.config", L(nameof(Resources.LocalSourceViewModel_ConfigFiles), "(.config)|*.config")); if (string.IsNullOrEmpty(exportFilePath)) { return; } await _chocolateyService.ExportPackages(exportFilePath, true); await _dialogService.ShowMessageAsync( L(nameof(Resources.LocalSourceView_ButtonExport)), L(nameof(Resources.LocalSourceViewModel_ExportComplete), exportFilePath)) .ConfigureAwait(false); } catch (Exception ex) { Logger.Fatal("Export all has failed.", ex); throw; } finally { _exportAll = true; } }
private void BrowseLogFile(object value) { var filter = "{0}|{1}|{2}".format_with( L(nameof(Resources.FilePicker_LogFiles)) + "|*.log;*.klg", L(nameof(Resources.FilePicker_TextFiles)) + "|*.txt;*.text;*.plain", L(nameof(Resources.FilePicker_AllFiles)) + "|*.*"); var logFile = _persistenceService.GetFilePath("log", filter); if (!string.IsNullOrEmpty(logFile)) { LogFile = logFile; } }