-
Notifications
You must be signed in to change notification settings - Fork 20
/
DirtyResourceUriInteractiveIconDisplay.razor.cs
40 lines (33 loc) · 1.23 KB
/
DirtyResourceUriInteractiveIconDisplay.razor.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
using Microsoft.AspNetCore.Components;
using Fluxor;
using Fluxor.Blazor.Web.Components;
using Luthetus.Common.RazorLib.Dialogs.Models;
using Luthetus.Common.RazorLib.Dynamics.Models;
using Luthetus.Common.RazorLib.Keys.Models;
using Luthetus.TextEditor.RazorLib.Edits.States;
namespace Luthetus.TextEditor.RazorLib.Edits.Displays;
public partial class DirtyResourceUriInteractiveIconDisplay : FluxorComponent
{
[Inject]
private IState<DirtyResourceUriState> DirtyResourceUriStateWrap { get; set; } = null!;
[Inject]
private IDialogService DialogService { get; set; } = null!;
[Parameter]
public string CssClassString { get; set; } = string.Empty;
[Parameter]
public string CssStyleString { get; set; } = string.Empty;
private const string _buttonId = "luth_web_dirty-text-editor-models-interactive-icon_id";
private static Key<IDynamicViewModel> _dialogRecordKey = Key<IDynamicViewModel>.NewKey();
private readonly IDialog _dialogRecord = new DialogViewModel(
_dialogRecordKey,
"Unsaved Files",
typeof(DirtyResourceUriViewDisplay),
null,
null,
true,
_buttonId);
private void ShowDialogOnClick()
{
DialogService.RegisterDialogRecord(_dialogRecord);
}
}