|
|
@ -3,18 +3,18 @@
|
|
|
|
namespace Connected.Services.Modal;
|
|
|
|
namespace Connected.Services.Modal;
|
|
|
|
public class ModalDialogService
|
|
|
|
public class ModalDialogService
|
|
|
|
{
|
|
|
|
{
|
|
|
|
public event Action<string, RenderFragment, Event, string, string> OnShow;
|
|
|
|
public event Action<string, RenderFragment, Event, Event, ModalOptions, string, string> OnShow;
|
|
|
|
public event Action<bool> OnClose;
|
|
|
|
public event Action<bool> OnClose;
|
|
|
|
|
|
|
|
|
|
|
|
public void ShowDialog(string title, RenderFragment content, Event OnConfirm, string CancelButtonText="Cancel", string OKButtonText="OK")
|
|
|
|
public void ShowDialog(string title, RenderFragment content, Event OnConfirm, Event OnCancel, ModalOptions options, string CancelButtonText="Cancel", string OKButtonText="OK")
|
|
|
|
{
|
|
|
|
{
|
|
|
|
OnShow?.Invoke(title, content, OnConfirm, OKButtonText, CancelButtonText);
|
|
|
|
OnShow?.Invoke(title, content, OnConfirm, OnCancel, options, OKButtonText, CancelButtonText);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public void ShowDialog(string title, MarkupString contentMarkup, Event OnConfirm, string CancelButtonText = "Cancel", string OKButtonText = "OK")
|
|
|
|
public void ShowDialog(string title, MarkupString contentMarkup, Event OnConfirm, Event OnCancel, ModalOptions options, string CancelButtonText = "Cancel", string OKButtonText = "OK")
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var content = new RenderFragment(x => x.AddContent(1, contentMarkup));
|
|
|
|
var content = new RenderFragment(x => x.AddContent(1, contentMarkup));
|
|
|
|
OnShow?.Invoke(title, content, OnConfirm, OKButtonText, CancelButtonText);
|
|
|
|
OnShow?.Invoke(title, content, OnConfirm, OnCancel, options, OKButtonText, CancelButtonText);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public void Close(bool OkClicked)
|
|
|
|
public void Close(bool OkClicked)
|
|
|
|