Files
gpw_next/GPW.CORE.Smart8.Client/Components/CmpTop.razor.cs
T
2025-03-22 11:05:20 +01:00

74 lines
1.6 KiB
C#

using Microsoft.AspNetCore.Components;
using Microsoft.JSInterop;
namespace GPW.CORE.Smart8.Client.Components
{
public partial class CmpTop : IDisposable
{
#region Public Properties
[Parameter]
public ConfigDTO CurrConf { get; set; } = null!;
[Parameter]
public UserDTO? CurrUser { get; set; } = null;
[Parameter]
public EventCallback<bool> EC_ForceReset { get; set; }
[Parameter]
public EventCallback<bool> EC_ReturnHome { get; set; }
[Parameter]
public bool IpIsLocal { get; set; } = false;
#endregion Public Properties
#region Public Methods
public void Dispose()
{
GC.Collect();
}
#endregion Public Methods
#region Protected Properties
protected string currDip
{
get => CurrUser != null ? CurrUser.DisplayName : "N.A. [0]";
}
protected string homeCss
{
get => IpIsLocal ? "text-light" : "text-danger";
}
protected string homeMessage
{
get => IpIsLocal ? "INT" : "EXT";
}
[Inject]
protected NavigationManager NavMan { get; set; } = null!;
protected string Nome { get; set; } = "";
#endregion Protected Properties
#region Protected Methods
protected async Task ForceReset()
{
await EC_ForceReset.InvokeAsync(true);
}
protected async Task ReturnHome()
{
await EC_ReturnHome.InvokeAsync(true);
}
#endregion Protected Methods
}
}