78 lines
2.0 KiB
C#
78 lines
2.0 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 EventCallback<Data> EC_CopySash { get; set; }
|
|
|
|
[Parameter]
|
|
public EventCallback<bool> EC_ReqClose { 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);
|
|
}
|
|
|
|
protected async Task CopySash(Data Args)
|
|
{
|
|
await EC_CopySash.InvokeAsync(Args);
|
|
}
|
|
|
|
#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";
|
|
}
|
|
|
|
#endregion Private Methods
|
|
|
|
private void ReqClose()
|
|
{
|
|
_ = EC_ReqClose.InvokeAsync(true);
|
|
}
|
|
}
|
|
} |