Files
webwindowconfigurator/WebWindowComplex/Compo/CardFill.razor.cs
T
Annamaria Sassi 3d092b53fb - Modificata gestione elementi split (su dimensione secondaria si specifica solo una larghezza per split)
- Aggiunta gestione profili bottom rail per sash e frame
- Iniziato a gestire dimensione solo luce per sash
2026-02-06 17:48:03 +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.SetFillType(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
}
}