6355f1eaca
- fix yaml - fix conf appsettings.json + production - global refresh
68 lines
1.4 KiB
C#
68 lines
1.4 KiB
C#
using Microsoft.AspNetCore.Components;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace MP.Prog.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 Methods
|
|
|
|
protected override void OnInitialized()
|
|
{
|
|
AppMessages.EA_PageUpdated += OnPageUpdate;
|
|
}
|
|
|
|
protected override async Task OnInitializedAsync()
|
|
{
|
|
await forceReload();
|
|
}
|
|
|
|
#endregion Protected Methods
|
|
|
|
#region Private Fields
|
|
|
|
private string userName = "";
|
|
|
|
#endregion Private Fields
|
|
|
|
#region Private Properties
|
|
|
|
private string PageIcon { get; set; }
|
|
|
|
private string PageName { get; set; }
|
|
|
|
[CascadingParameter(Name = "ShowSearch")]
|
|
private bool ShowSearch { get; set; }
|
|
|
|
#endregion Private Properties
|
|
|
|
#region Private Methods
|
|
|
|
private async Task forceReload()
|
|
{
|
|
userName = "N.A.";
|
|
await Task.Delay(1);
|
|
}
|
|
|
|
#endregion Private Methods
|
|
}
|
|
} |