61 lines
1.4 KiB
C#
61 lines
1.4 KiB
C#
using Microsoft.AspNetCore.Components;
|
|
using MagMan.UI.Components;
|
|
using System.Security.Claims;
|
|
using Microsoft.AspNetCore.Components.Authorization;
|
|
using MagMan.Core.Services;
|
|
|
|
namespace MagMan.UI.Components
|
|
{
|
|
public partial class CmpTop
|
|
{
|
|
#region Public Methods
|
|
|
|
public void Dispose()
|
|
{
|
|
AppMessages.EA_PageUpdated -= OnPageUpdate;
|
|
}
|
|
|
|
public void OnPageUpdate()
|
|
{
|
|
PageName = AppMessages.PageName;
|
|
PageIcon = AppMessages.PageIcon;
|
|
InvokeAsync(() =>
|
|
{
|
|
StateHasChanged();
|
|
});
|
|
}
|
|
|
|
#endregion Public Methods
|
|
|
|
#region Protected Properties
|
|
|
|
[Inject]
|
|
protected MessageService AppMessages { get; set; } = null!;
|
|
|
|
#endregion Protected Properties
|
|
|
|
#region Protected Methods
|
|
|
|
protected override void OnInitialized()
|
|
{
|
|
AppMessages.EA_PageUpdated += OnPageUpdate;
|
|
}
|
|
|
|
#endregion Protected Methods
|
|
|
|
#region Private Properties
|
|
|
|
private string PageIcon { get; set; } = "";
|
|
|
|
private string PageName { get; set; } = "";
|
|
|
|
[CascadingParameter(Name = "ShowSearch")]
|
|
private bool ShowSearch { get; set; } = false;
|
|
|
|
|
|
[CascadingParameter(Name = "ShowCustomers")]
|
|
private bool ShowCustomers { get; set; } = true;
|
|
|
|
#endregion Private Properties
|
|
}
|
|
} |