Files
mapo-core/MP-TAB-SERV/Components/MachSel.razor.cs
T
Samuele Locatelli 0d32c8e1d4 bozza sel macchine
2023-10-04 19:29:20 +02:00

56 lines
1.5 KiB
C#

using global::Microsoft.AspNetCore.Components;
using MP.Data.DatabaseModels;
using MP.Data.Services;
using System.Reflection.Metadata;
namespace MP_TAB_SERV.Components
{
public partial class MachSel
{
#region Public Properties
[Parameter]
public EventCallback<string> E_MachSel { get; set; }
[Parameter]
public MappaStatoExpl? RecMSE { get; set; } = null;
#endregion Public Properties
#region Protected Properties
protected string IdxMaccSel { get; set; } = "";
protected Dictionary<string, string>? ListMacchineAll { get; set; } = null;
[Inject]
protected SharedMemService MServ { get; set; } = null!;
#endregion Protected Properties
#region Protected Methods
protected override async Task OnInitializedAsync()
{
// inizilamente riporto machcina corrente da MSE
if (RecMSE != null)
{
await E_MachSel.InvokeAsync(RecMSE?.IdxMacchina);
// verifico se la macchina sia configurata tra le MSFD...
if (MServ.DictMacchMulti.ContainsKey(RecMSE?.IdxMacchina))
{
isMulti = MServ.DictMacchMulti[RecMSE?.IdxMacchina] == 1;
}
ListMacchineAll = MServ.DictMacchine;
}
}
#endregion Protected Methods
#region Private Fields
private bool isMulti = false;
#endregion Private Fields
}
}