|
@@ -1,3 +1,26 @@
|
|
|
@page "/"
|
|
|
+@inject DialogService DialogService
|
|
|
|
|
|
<h1>Добро пожаловать!</h1>
|
|
|
+
|
|
|
+<RadzenButton Text="Show confirm dialog" Click=@(args => DialogService.Confirm("Are you sure?", "MyTitle", new ConfirmOptions() { OkButtonText = "Yes", CancelButtonText = "No" })) />
|
|
|
+
|
|
|
+@code {
|
|
|
+ protected override void OnInitialized()
|
|
|
+ {
|
|
|
+ DialogService.OnOpen += Open;
|
|
|
+ DialogService.OnClose += Close;
|
|
|
+ }
|
|
|
+
|
|
|
+ void Open(string title, Type type, Dictionary<string, object> parameters, DialogOptions options)
|
|
|
+ {
|
|
|
+ //console.Log("Dialog opened");
|
|
|
+ Console.WriteLine("Dialog opened");
|
|
|
+ }
|
|
|
+
|
|
|
+ void Close(dynamic result)
|
|
|
+ {
|
|
|
+ //console.Log($"Dialog closed with result: {result}");
|
|
|
+ Console.WriteLine($"Dialog closed with result: {result}");
|
|
|
+ }
|
|
|
+}
|