using Microsoft.AspNetCore.Components; using WebWindowTest.DTO; using WebWindowTest.Models; namespace WebWindowTest.Compo { public partial class General { #region Public Properties /// /// Finestra corrente /// [Parameter] public Window CurrWindow { get; set; } = null!; [Parameter] public EventCallback EC_ReqClose { get; set; } /// /// Elenco anagrafiche di base /// [Parameter] public BaseListPayload ListPayload { get; set; } = null!; /// /// Elenco Warnings attivi /// [Parameter] public Dictionary ListWarnings { get; set; } = new Dictionary(); #endregion Public Properties #region Protected Properties /// /// Colore corrente /// protected string CurrColor { get => currColor; } /// /// Vetro corrente /// protected string CurrGlass { get => currGlass; } /// /// Materiale corrente /// protected string CurrMaterial { get => currMaterial; } /// /// Profilo corrente /// protected string CurrProfile { get => currProfile; } #endregion Protected Properties #region Protected Methods /// /// Calcola CSS warning /// /// /// protected string cssValid(string fKey) { return ListWarnings.ContainsKey(fKey) ? "border border-danger" : ""; } protected override void OnParametersSet() { currColor = CurrWindow.sColorMaterial; currGlass = CurrWindow.sGlass; currMaterial = CurrWindow.sMaterial; currProfile = CurrWindow.sProfilePath; } #endregion Protected Methods #region Private Fields private string currColor = ""; private string currGlass = ""; private string currMaterial = ""; private string currProfile = ""; #endregion Private Fields private void ReqClose() { _ = EC_ReqClose.InvokeAsync(true); } } }