using Microsoft.AspNetCore.Components;
using WebWindowTest.DTO;
using WebWindowTest.Models;
namespace WebWindowTest.Compo
{
public partial class CardArcElement
{
#region Public Properties
///
/// Frame corrente
///
[Parameter]
public Frame CurrFrame { get; set; } = null!;
///
/// Lista sash group
///
[Parameter]
public List SashList { get; set; } = null!;
[Parameter]
public EventCallback EC_UpdatePreview { get; set; }
[Parameter]
public EventCallback EC_ReqClose { get; set; }
#endregion Public Properties
private async Task UpdatePreview()
{
var args = new DataUpdateFrame
{
currFrame = CurrFrame
};
await EC_UpdatePreview.InvokeAsync(args);
}
private async Task UpdatePreviewSash(Sash CurrSashGRoup)
{
var currRec = SashList.First(x => x.GroupId == CurrSashGRoup.GroupId);
if (currRec != null)
{
currRec = CurrSashGRoup;
var args = new DataUpdateFrame
{
currFrame = CurrFrame
};
await EC_UpdatePreview.InvokeAsync(args);
}
}
private void ReqClose()
{
_ = EC_ReqClose.InvokeAsync(true);
}
}
}