Files
webwindowconfigurator/WebWindowComplex/Compo/AreaSashArcElem.razor.cs
T
Annamaria Sassi e97383aa78 - Inserita gestione elementi per archi
- Aggiunto jwd per anta doppia profilo Saomad
2026-09-07 14:49:53 +02:00

94 lines
2.4 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
/// <summary>
/// Sash corrente
/// </summary>
[Parameter]
public Sash CurrSashGroup { get; set; } = null!;
[Parameter]
public EventCallback<Sash> EC_UpdatePreview { get; set; }
#endregion Public Properties
#region Private Fields
private bool insertQty = false;
#endregion Private Fields
#region Private Properties
private int ArcElementQty
{
get
{
int ans = 0;
if (CurrSashGroup.SashArcElem != null)
{
ans = CurrSashGroup.SashArcElem.nQty;
}
return ans;
}
set
{
if (CurrSashGroup.SashArcElem != null && CurrSashGroup.SashArcElem.nQty != value)
{
CurrSashGroup.SashArcElem.nQty = value;
_ = EC_UpdatePreview.InvokeAsync(CurrSashGroup);
}
}
}
private double ArcSection
{
get
{
double ans = 0;
if (CurrSashGroup.SashArcElem != null)
{
ans = CurrSashGroup.SashArcElem.nSection;
}
return ans;
}
set
{
if (CurrSashGroup.SashArcElem != null && CurrSashGroup.SashArcElem.nSection != value)
{
CurrSashGroup.SashArcElem.nSection = value;
_ = EC_UpdatePreview.InvokeAsync(CurrSashGroup);
}
}
}
#endregion Private Properties
#region Private Methods
private void IsCheckedQty()
{
insertQty = !insertQty;
}
private void IsCheckCutEdge()
{
if (CurrSashGroup.SashArcElem != null)
{
CurrSashGroup.SashArcElem.bCutEdge = !CurrSashGroup.SashArcElem.bCutEdge;
_ = EC_UpdatePreview.InvokeAsync(CurrSashGroup);
}
}
#endregion Private Methods
}
}