Files
webwindowconfigurator/WebWindowComplex/Compo/AreaSashArcElem.razor.cs
T
2025-12-02 16:44:01 +01:00

75 lines
1.7 KiB
C#

using Microsoft.AspNetCore.Components;
using System.Runtime.CompilerServices;
using WebWindowComplex.DTO;
using WebWindowComplex.Models;
namespace WebWindowComplex.Compo
{
public partial class AreaSashArcElem
{
#region Public Properties
[Parameter]
public Sash CurrSashGroup { get; set; } = null!;
[Parameter]
public EventCallback<Sash> EC_UpdatePreview { get; set; }
#endregion Public Properties
#region Protected Properties
protected int ArcElementQty
{
get => CurrSashGroup.SashArcElem.nQty;
set
{
CurrSashGroup.SashArcElem.nQty = value;
_ = EC_UpdatePreview.InvokeAsync(CurrSashGroup);
}
}
protected double ArcSection
{
get => CurrSashGroup.SashArcElem.nSection;
set
{
CurrSashGroup.SashArcElem.nSection = value;
_ = EC_UpdatePreview.InvokeAsync(CurrSashGroup);
}
}
#endregion Protected Properties
#region Protected Methods
protected void IsCheckedQty()
{
insertQty = !insertQty;
}
protected void IsCheckCutEdge()
{
CurrSashGroup.SashArcElem.bCutEdge = !CurrSashGroup.SashArcElem.bCutEdge;
_ = EC_UpdatePreview.InvokeAsync(CurrSashGroup);
}
protected string IsUsedQty()
{
if (insertQty)
return "form-control";
else
return "form-control disabled";
}
#endregion Protected Methods
#region Private Fields
private bool insertQty = false;
#endregion Private Fields
}
}