private async Task DeleteFile(ProjectFile selectedFile) { var response = await ModalService.ShowMessageBoxAsync("Delete", $"Are you sure you want to delete {selectedFile.Name} from project?", MessageBoxButtons.YesNo); if (response != MessageBoxDialogResult.Yes) { return; } var parameters = new ModalDialogParameters { { "FileAction", "delete" }, { "DeletedCodeFile", selectedFile } }; ModalService.Close(true, parameters); }
private async void HandleSaveSnippet(string code) { await ModalService.ShowMessageBoxAsync("Save Fail", "If you want to save a code snippet, navigate to the 'Practice C#' tab"); }