Example #1
0
        //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();
            }
        }
Example #2
0
 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);
        }
Example #4
0
        protected override async Task <Contact> ValidSubmitAsync()
        {
            Contact result = await base.ValidSubmitAsync();

            ModalService.Close(ModalResult.Ok(result));

            return(result);
        }
Example #5
0
        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);
        }
Example #7
0
        protected void Submit()
        {
            var parameters = new ModalDialogParameters
            {
                { "UserName", SignInForm.UserName }, { "OtherUser", SignInForm.OtherUser }, { "TeamName", SignInForm.TeamName }
            };

            ModalService.Close(true, parameters);
        }
Example #8
0
        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);
        }
Example #12
0
        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);
        }
Example #13
0
 public void Close()
 {
     _modalService.Close(this);
 }
Example #14
0
 void SubmitForm()
 {
     ShowForm = false;
     ModalService.Close(ModalResult.Ok <CategoryModel>(category));
 }
Example #15
0
        protected async Task DeleteAsync()
        {
            int deletedCount = await ContactService.DeleteAsync(ToDelete);

            ModalService.Close(ModalResult.Ok(deletedCount));
        }
Example #16
0
        public async Task AddNewPrize()
        {
            await PrizeService.AddRafflePrize(Prize);

            ModalService.Close(ModalResult.Ok(Prize));
        }
 void SubmitForm()
 {
     ShowForm = false;
     ModalService.Close(ModalResult.Ok <UserOrderHeaderModel>(OrderModel));
 }
Example #18
0
 void Cancel()
 {
     ShowForm = false;
     ModalService.Close(ModalResult.Cancel());
 }
Example #19
0
 void SubmitForm()
 {
     ShowForm = false;
     ModalService.Close(ModalResult.Ok <ProductModel>(product));
 }