93 lines
2.2 KiB
C#
93 lines
2.2 KiB
C#
using Microsoft.AspNetCore.Components;
|
|
using MP.Data.DatabaseModels;
|
|
using MP.Data.Services;
|
|
using System;
|
|
|
|
namespace MP_TAB3.Components
|
|
{
|
|
public partial class CurrOdlDetail
|
|
{
|
|
#region Public Properties
|
|
|
|
[Parameter]
|
|
public ODLExpModel CurrOdl { get; set; } = null!;
|
|
|
|
[Parameter]
|
|
public PODLExpModel CurrPodl { get; set; } = null!;
|
|
|
|
[Parameter]
|
|
public EventCallback<bool> EC_ToggleOdlDetail { get; set; }
|
|
|
|
[Parameter]
|
|
public EventCallback<bool> EC_TogglePOdl { get; set; }
|
|
|
|
[Parameter]
|
|
public bool ForceCloseOdl { get; set; }
|
|
|
|
[Parameter]
|
|
public int IdxPOdlSel { get; set; }
|
|
|
|
[Parameter]
|
|
public bool InAttr { get; set; }
|
|
|
|
[Parameter]
|
|
public bool ShowOdlDetail { get; set; }
|
|
|
|
#endregion Public Properties
|
|
|
|
#region Protected Properties
|
|
|
|
[Inject]
|
|
protected MessageService MsgServ { get; set; } = null!;
|
|
|
|
[Inject]
|
|
protected SharedMemService SMServ { get; set; } = null!;
|
|
|
|
#endregion Protected Properties
|
|
|
|
#region Protected Methods
|
|
|
|
protected async Task ToggleOdlDetail()
|
|
{
|
|
await EC_ToggleOdlDetail.InvokeAsync(true);
|
|
}
|
|
|
|
protected string Traduci(string lemma)
|
|
{
|
|
return SMServ.Traduci($"{baseLang}_{lemma}".ToUpper());
|
|
}
|
|
|
|
#endregion Protected Methods
|
|
|
|
#region Private Properties
|
|
|
|
private string baseLang
|
|
{
|
|
get => MsgServ.UserPrefGet("Lang");
|
|
}
|
|
|
|
private string cssDetailOdl
|
|
{
|
|
get => IdxPOdlSel > 0 ? "bg-info text-light" : "bg-warning";
|
|
}
|
|
|
|
private bool showPOdlData { get; set; } = true;
|
|
|
|
private string titleOdlDetail
|
|
{
|
|
get => IdxPOdlSel > 0 ? "Verifica parametri attrezzaggio NUOVO PODL" : InAttr ? "Parametri PODL in Attrezzaggio" : "Parametri PODL Corrente";
|
|
}
|
|
|
|
private string txtBtnOdlDetail
|
|
{
|
|
get => ShowOdlDetail ? "Nascondi Dettaglio PODL" : "MOSTRA Dettaglio ODL Corrente";
|
|
}
|
|
|
|
private string txtShowXDL
|
|
{
|
|
get => showPOdlData ? "PODL" : "ODL";
|
|
}
|
|
|
|
#endregion Private Properties
|
|
}
|
|
} |