Files
Annamaria Sassi 2aa207d0d7 - Gestione soglia quando viene eliminata anta
- Gestione spessore split in anta o meno
2026-03-04 14:48:23 +01:00

80 lines
2.1 KiB
C#

using Microsoft.AspNetCore.Components;
using WebWindowComplex.Models;
using static WebWindowComplex.Json.WindowConst;
namespace WebWindowComplex.Compo
{
public partial class CardFill
{
#region Public Properties
/// <summary>
/// Indice del fill corrente rispetto alla lista fill
/// </summary>
[Parameter]
public int CurrIndex { get; set; } = 0;
/// <summary>
/// Fill corrente rispetto alla lista fill
/// </summary>
[Parameter]
public Fill CurrFill { get; set; } = null!;
/// <summary>
/// Livello di accesso (utente base)
/// </summary>
[Parameter]
public bool User { get; set; } = false!;
/// <summary>
/// Evento per cambiare tutti i fill
/// </summary>
[Parameter]
public EventCallback<Fill> EC_UpdateFill { get; set; }
/// <summary>
/// Evento per tornare nella pagine Tree
/// </summary>
[Parameter]
public EventCallback<bool> EC_ReqClose { get; set; }
#endregion Public Properties
#region Protected Methods
/// <summary>
/// Metodo per cambiare solo il Fill corrente
/// </summary>
/// <param name="reqFillType"> Tipo di fill richiesto </param>
/// <returns></returns>
protected Task ChangeOneFill(FillTypes reqFillType)
{
CurrFill.SelFillType = reqFillType;
return EC_UpdateFill.InvokeAsync(CurrFill);
}
#endregion Protected Methods
#region Private Methods
/// <summary>
/// Metodo per tornare alla pagina Tree
/// </summary>
private void ReqClose()
{
_ = EC_ReqClose.InvokeAsync(true);
}
/// <summary>
/// Calcola bottone selezionato per il Fill
/// </summary>
/// <returns></returns>
private string buttonFillCss(FillTypes reqFillTypes)
{
return (CurrFill.SelFillType == reqFillTypes) ? "btn btn-secondary btn-sm" : "btn btn-outline-secondary btn-sm";
}
#endregion Private Methods
}
}