Files
webwindowconfigurator/WebWindowComplex/Compo/CardFrame.razor.cs
T
2025-10-13 13:36:03 +02:00

99 lines
2.6 KiB
C#

using Microsoft.AspNetCore.Components;
using WebWindowComplex.Models;
namespace WebWindowComplex.Compo
{
public partial class CardFrame
{
/// <summary>
/// Frame corrente
/// </summary>
[Parameter]
public Frame FrameWindow { get; set; } = null!;
/// <summary>
/// Lista di sash
/// </summary>
[Parameter]
public List<Sash> SashList { get; set; } = null!;
/// <summary>
/// Lista di split
/// </summary>
[Parameter]
public List<Split> SplitList { get; set; } = null!;
/// <summary>
/// Evento per cambiare tutti i Joints
/// </summary>
[Parameter]
public EventCallback<DataChangeJoints> EC_ChangeAllJoints { get; set; }
/// <summary>
/// Evento per aggiungere sash
/// </summary>
[Parameter]
public EventCallback<bool> EC_AddSash { get; set; }
/// <summary>
/// Evento per aggiungere split
/// </summary>
[Parameter]
public EventCallback<bool> EC_AddSplit { get; set; }
/// <summary>
/// Evento per tornare nella pagine Tree
/// </summary>
[Parameter]
public EventCallback<bool> EC_ReqClose { get; set; }
/// <summary>
/// Sollevo evento richiesta copia sash
/// </summary>
/// <returns></returns>
private async Task ChangeAllJoints(Json.WindowConst.Joints JointType, Area a)
{
var Args = new DataChangeJoints
{
currJointType = JointType,
currArea = a,
};
await EC_ChangeAllJoints.InvokeAsync(Args);
}
/// <summary>
/// Sollevo evento richiesta aggiunta sash
/// </summary>
/// <returns></returns>
private async Task AddSash()
{
await EC_AddSash.InvokeAsync(true);
}
/// <summary>
/// Sollevo evento richiesta aggiunta window
/// </summary>
/// <returns></returns>
private async Task AddSplit()
{
await EC_AddSplit.InvokeAsync(true);
}
/// <summary>
/// Sollevo evento per tornare alla pagina Tree
/// </summary>
private void ReqClose()
{
_ = EC_ReqClose.InvokeAsync(true);
}
}
/// <summary>
/// Classe per raggruppare oggetti che servono per copiare Sash
/// </summary>
public class DataChangeJoints
{
public Json.WindowConst.Joints currJointType { get; set; }
public Area currArea { get; set; }
}
}