60 lines
1.5 KiB
C#
60 lines
1.5 KiB
C#
using Microsoft.AspNetCore.Components;
|
|
using WebWindowTest.DTO;
|
|
using WebWindowTest.Models;
|
|
|
|
namespace WebWindowTest.Compo
|
|
{
|
|
public partial class CardArcElement
|
|
{
|
|
#region Public Properties
|
|
|
|
/// <summary>
|
|
/// Frame corrente
|
|
/// </summary>
|
|
[Parameter]
|
|
public Frame CurrFrame { get; set; } = null!;
|
|
|
|
/// <summary>
|
|
/// Lista sash group
|
|
/// </summary>
|
|
[Parameter]
|
|
public List<Sash> SashList { get; set; } = null!;
|
|
|
|
[Parameter]
|
|
public EventCallback<DataUpdateFrame> EC_UpdatePreview { get; set; }
|
|
|
|
[Parameter]
|
|
public EventCallback<bool> 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);
|
|
}
|
|
}
|
|
|
|
} |