Files
gpw_next/GPW.CORE6.Smart/Components/NavBottom.razor.cs
T
Samuele Locatelli 848b6537d2 Update x nuovo proj 8
2024-08-22 16:03:31 +02:00

85 lines
1.8 KiB
C#

using GPW.CORE6.Smart.Data;
using Microsoft.AspNetCore.Components;
namespace GPW.CORE6.Smart.Components
{
public partial class NavBottom
{
#region Protected Fields
protected string hideButtonCSS = "visible";
protected string hideMenuCSS = "hidden";
protected bool isVisible = false;
protected Version? version = typeof(Program).Assembly.GetName().Version;
#endregion Protected Fields
#region Protected Properties
protected bool isActive { get; set; } = false;
[Inject]
protected MessageService MService { get; set; } = null!;
[Inject]
protected NavigationManager NavManager { get; set; } = null!;
#endregion Protected Properties
#region Protected Methods
protected void goTo(string target)
{
NavManager.NavigateTo(target, true);
}
protected void goToAbout()
{
goTo("About");
}
protected void goToAdmin()
{
goTo("Admin");
}
protected void goToIndex()
{
goTo("Index");
}
protected void goToMPF()
{
goTo("DayOff");
}
protected void hideMenu()
{
isVisible = false;
hideMenuCSS = "hidden; height: 0%;";
hideButtonCSS = "visible";
}
protected void showMenu()
{
if (MService.IdxDipendente > 0)
{
isVisible = true;
hideMenuCSS = "visible; height: 22%; display:block;";
hideButtonCSS = "hidden";
}
}
protected void slideIn()
{
isActive = false;
}
protected void slideOut()
{
isActive = true;
}
#endregion Protected Methods
}
}