//protected async Task PreventDraggable() //{ // await TablerService.SetElementProperty(dragContainer, "draggable", false); //} //protected async Task SetDraggable() //{ // await TablerService.SetElementProperty(dragContainer, "draggable", true); //} protected void OnKeyDown(KeyboardEventArgs e) { if (e.Key == "Escape" && ModalModel.Options.CloseOnEsc) { ModalService.Close(); } }
protected void OnClickOutside(MouseEventArgs e) { if (ModalModel.Options.CloseOnClickOutside) { ModalService.Close(); } }
protected void UpdateCodeSnippet(string snippet) { var parameters = new ModalDialogParameters(); CodeSnippet = snippet; parameters.Add("CodeSnippet", snippet); ModalService.Close(true, parameters); }
protected override async Task <Contact> ValidSubmitAsync() { Contact result = await base.ValidSubmitAsync(); ModalService.Close(ModalResult.Ok(result)); return(result); }
protected void SelectChallenge(Challenge challenge) { var parameters = new ModalDialogParameters(); SelectedChallenge = challenge; parameters.Add("SelectedChallenge", challenge); ModalService.Close(true, parameters); }
protected void UpdateActiveFile(ProjectFile selectedFile) { var parameters = new ModalDialogParameters { { "FileAction", "select" }, { "ActiveCodeFile", selectedFile } }; ModalService.Close(true, parameters); }
protected void Submit() { var parameters = new ModalDialogParameters { { "UserName", SignInForm.UserName }, { "OtherUser", SignInForm.OtherUser }, { "TeamName", SignInForm.TeamName } }; ModalService.Close(true, parameters); }
private async Task Submit() { var codeFile = await GithubClient.CodeFromPublicRepo(FormModel.GithubName, FormModel.RepoName, FormModel.FilePath); var parameters = new ModalDialogParameters { { "FileCode", codeFile } }; ModalService.Close(true, parameters); }
private void JoinArena(Arena arena) { var userName = AppState.UserName; //ArenaService.JoinArena(arena.Name, userName); SelectedArena = arena; CreatedArena = false; var parameters = new ModalDialogParameters { { "SelectedArena", SelectedArena }, { "CreatedArena", CreatedArena } }; ModalService.Close(true, parameters); }
private void CreateArena() { var userName = AppState.UserName; NewArena.Creator = userName; SelectedArena = NewArena; //ArenaService.CreateArena(NewArena); CreatedArena = true; var parameters = new ModalDialogParameters { { "SelectedArena", SelectedArena }, { "CreatedArena", CreatedArena } }; ModalService.Close(true, parameters); }
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 Task Close(bool isClear = false) { if (isClear) { ChatContent = "<h2>Chat Cleared</h2>"; await InvokeAsync(StateHasChanged); await Task.Delay(2000); } var modalParams = new ModalDialogParameters { { "IsClear", isClear } }; ModalService.Close(true, modalParams); }
public void Close() { _modalService.Close(this); }
void SubmitForm() { ShowForm = false; ModalService.Close(ModalResult.Ok <CategoryModel>(category)); }
protected async Task DeleteAsync() { int deletedCount = await ContactService.DeleteAsync(ToDelete); ModalService.Close(ModalResult.Ok(deletedCount)); }
public async Task AddNewPrize() { await PrizeService.AddRafflePrize(Prize); ModalService.Close(ModalResult.Ok(Prize)); }
void SubmitForm() { ShowForm = false; ModalService.Close(ModalResult.Ok <UserOrderHeaderModel>(OrderModel)); }
void Cancel() { ShowForm = false; ModalService.Close(ModalResult.Cancel()); }
void SubmitForm() { ShowForm = false; ModalService.Close(ModalResult.Ok <ProductModel>(product)); }