private async Task DeleteAsync() { var result = await ShowRemoveConfirmationDialogAsync(); if (result) { await _trashCanService.MoveToTrashAsync(Files); } }
public async Task DeleteAsync(string filePath) { var files = CreateFilesList(filePath); var result = await ShowRemoveConfirmationDialogAsync(files); if (result) { await _trashCanService.MoveToTrashAsync(files); } }
private async Task MoveToTrashAsync() { var nodesToRemove = GetSelectedNodes(); if (!nodesToRemove.Any()) { return; } var navigationParameter = new NodesRemovingNavigationParameter(nodesToRemove); var result = await ShowRemoveConfirmationDialogAsync(navigationParameter); if (result) { Execute(() => _trashCanService.MoveToTrashAsync(nodesToRemove)); } }
private async Task RemoveToTrashAsync() { var filesToRemove = GetSelectedFiles(); if (!filesToRemove.Any()) { return; } var navigationParameter = new NodesRemovingNavigationParameter(filesToRemove, true); var isConfirmed = await ShowRemoveConfirmationDialogAsync(navigationParameter); if (isConfirmed) { _trashCanService.MoveToTrashAsync(filesToRemove).Forget(); } }