f5eda3686d
- continuo fix traduzione - inizio pagina tag mensili
64 lines
1.5 KiB
C#
64 lines
1.5 KiB
C#
using GPW.CORE.Data.DTO;
|
|
using GPW.CORE.Data.Services;
|
|
using Microsoft.AspNetCore.Components;
|
|
|
|
namespace GPW.CORE.ADM.Components.Pages
|
|
{
|
|
public partial class Home : IDisposable
|
|
{
|
|
#region Public Methods
|
|
|
|
public void Dispose()
|
|
{
|
|
AppMServ.EA_MenuUpdated -= AppMServ_EA_MenuUpdated;
|
|
}
|
|
|
|
#endregion Public Methods
|
|
|
|
#region Protected Properties
|
|
|
|
[Inject]
|
|
protected MessageService AppMServ { get; set; } = null!;
|
|
|
|
[Inject]
|
|
protected AppAuthService AuthServ { get; set; } = null!;
|
|
|
|
protected List<MenuItemDTO> ListMenu { get; set; } = new List<MenuItemDTO>();
|
|
|
|
#endregion Protected Properties
|
|
|
|
#region Protected Methods
|
|
|
|
protected override void OnInitialized()
|
|
{
|
|
AppMServ.ShowSearch = false;
|
|
AppMServ.PageName = "";
|
|
AppMServ.PageIcon = "";
|
|
AppMServ.EA_MenuUpdated += AppMServ_EA_MenuUpdated;
|
|
ReloadData();
|
|
}
|
|
|
|
protected string Traduci(string lemma)
|
|
{
|
|
return AuthServ.Traduci(lemma, AppMServ.UserLang);
|
|
}
|
|
|
|
#endregion Protected Methods
|
|
|
|
#region Private Methods
|
|
|
|
private void AppMServ_EA_MenuUpdated()
|
|
{
|
|
ReloadData();
|
|
InvokeAsync(StateHasChanged);
|
|
}
|
|
|
|
private void ReloadData()
|
|
{
|
|
// rilettura menù se mancasse
|
|
ListMenu = AppMServ.ListMenu;
|
|
}
|
|
|
|
#endregion Private Methods
|
|
}
|
|
} |