From a4d1f798f44ec7a72dca64ab15d235f790de7fad Mon Sep 17 00:00:00 2001 From: markosteger Date: Mon, 27 Feb 2023 13:17:31 +0100 Subject: [PATCH] ModalDialog - ModalDialogService.cs, ModalEvents.cs, ModalOptions.cs file location change --- .../Services/Modal/ModalDialogService.cs | 28 ------------------- .../Services/Modal/ModalEvent.cs | 12 -------- .../Services/Modal/ModalOptions.cs | 9 ------ 3 files changed, 49 deletions(-) delete mode 100644 src/Connected.Components/Services/Modal/ModalDialogService.cs delete mode 100644 src/Connected.Components/Services/Modal/ModalEvent.cs delete mode 100644 src/Connected.Components/Services/Modal/ModalOptions.cs diff --git a/src/Connected.Components/Services/Modal/ModalDialogService.cs b/src/Connected.Components/Services/Modal/ModalDialogService.cs deleted file mode 100644 index 12c94c0..0000000 --- a/src/Connected.Components/Services/Modal/ModalDialogService.cs +++ /dev/null @@ -1,28 +0,0 @@ -using Connected.Components; -using Connected.Models.Modal; -using Microsoft.AspNetCore.Components; - -namespace Connected.Services.Modal; -public class ModalDialogService -{ - public event Action, ModalOptions> OnShow; - public event Action OnClose; - - public void ShowDialog(string title, RenderFragment content, List buttons, ModalOptions options) - { - OnShow?.Invoke(title, content, buttons, options); - } - - public void ShowDialog(string title, MarkupString contentMarkup, List buttons, ModalOptions options) - { - var content = new RenderFragment(x => x.AddContent(1, contentMarkup)); - OnShow?.Invoke(title, content, buttons, options); - } - - public void Close(ModalButton? button) - { - OnClose?.Invoke(button); - } - - -} diff --git a/src/Connected.Components/Services/Modal/ModalEvent.cs b/src/Connected.Components/Services/Modal/ModalEvent.cs deleted file mode 100644 index 1876d01..0000000 --- a/src/Connected.Components/Services/Modal/ModalEvent.cs +++ /dev/null @@ -1,12 +0,0 @@ -namespace Connected.Services.Modal; -public class Event -{ - public Delegate Delegate; - public object[] args; - - public Event(Delegate Delegate, object[] Args) - { - this.Delegate = Delegate; - this.args = Args; - } -} diff --git a/src/Connected.Components/Services/Modal/ModalOptions.cs b/src/Connected.Components/Services/Modal/ModalOptions.cs deleted file mode 100644 index 7f44f94..0000000 --- a/src/Connected.Components/Services/Modal/ModalOptions.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace Connected.Services.Modal; -public class ModalOptions -{ - public bool CloseOnEscKey { get; set; } = true; - public bool DisableBackdropCLick { get; set; } = false; - public bool NoHeader { get; set; } = false; - - -}