68 lines
1.8 KiB
C#
68 lines
1.8 KiB
C#
using Microsoft.AspNetCore.Components;
|
|
using WebWindowComplex.Models;
|
|
using static WebWindowComplex.Json.WindowConst;
|
|
|
|
namespace WebWindowComplex.Compo
|
|
{
|
|
public partial class CardFill
|
|
{
|
|
#region Public Properties
|
|
|
|
[Parameter]
|
|
public int CurrIndex { get; set; } = 0;
|
|
|
|
[Parameter]
|
|
public Fill CurrItem { get; set; } = null!;
|
|
|
|
[Parameter]
|
|
public EventCallback<FillTypes> EC_ChangeAllType { get; set; }
|
|
|
|
[Parameter]
|
|
public EventCallback<FillTypes> EC_ChangeType { get; set; }
|
|
|
|
[Parameter]
|
|
public List<Fill> FillList { get; set; } = null!;
|
|
|
|
[Parameter]
|
|
public List<Sash> SashList { get; set; } = null!;
|
|
|
|
[Parameter]
|
|
public List<Splitted> SplittedList { get; set; } = null!;
|
|
|
|
#endregion Public Properties
|
|
|
|
#region Protected Methods
|
|
|
|
protected async Task ChangeAllFill(FillTypes reqFillType)
|
|
{
|
|
await EC_ChangeAllType.InvokeAsync(reqFillType);
|
|
}
|
|
|
|
protected async Task ChangeOneFill(FillTypes reqFillType)
|
|
{
|
|
await EC_ChangeType.InvokeAsync(reqFillType);
|
|
}
|
|
|
|
#endregion Protected Methods
|
|
|
|
#region Private Methods
|
|
|
|
/// <summary>
|
|
/// Calcola bottone selezionato per il Fill
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
private string buttonFillCss(FillTypes reqFillTypes)
|
|
{
|
|
return (FillList.ElementAt(CurrIndex).SelFillType == reqFillTypes) ? "btn btn-secondary btn-sm" : "btn btn-outline-secondary btn-sm";
|
|
|
|
#if false
|
|
if (FillList.ElementAt(CurrIndex).SelFillType == reqFillTypes)
|
|
return "btn btn-secondary btn-sm";
|
|
else
|
|
return "btn btn-outline-secondary btn-sm";
|
|
#endif
|
|
}
|
|
|
|
#endregion Private Methods
|
|
}
|
|
} |