private async Task <CreateArchiveDialogResult> ShowPackDialogAsync(string fullPath) { var parameter = new CreateArchiveNavigationParameter(fullPath, true); return(await _dialogService.ShowDialogAsync <CreateArchiveDialogResult, CreateArchiveNavigationParameter>( nameof(CreateArchiveDialogViewModel), parameter)); }
private async Task PackAsync() { var selectedNodes = _nodesSelectionService .SelectedNodes .ToArray(); if (!selectedNodes.Any()) { return; } var defaultPath = _pathService.Combine(_directoryService.SelectedDirectory, selectedNodes.First()); var parameter = new CreateArchiveNavigationParameter(defaultPath, selectedNodes.Length == 1); var dialogResult = await _dialogService.ShowDialogAsync <CreateArchiveDialogResult, CreateArchiveNavigationParameter>( nameof(CreateArchiveDialogViewModel), parameter); if (dialogResult is null) { return; } await _archiveService.PackAsync(selectedNodes, dialogResult.ArchivePath, dialogResult.ArchiveType); }