Files
webwindowconfigurator/WebWindowComplex/Compo/AreaFrameArcElem.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

101 lines
2.5 KiB
C#

using Microsoft.AspNetCore.Components;
using WebWindowComplex.Models;
namespace WebWindowComplex.Compo
{
public partial class AreaFrameArcElem
{
#region Public Properties
/// <summary>
/// Frame corrente
/// </summary>
[Parameter]
public Frame CurrFrame { get; set; } = null!;
[Parameter]
public EventCallback<Frame> 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 (CurrFrame.FrameArcElem != null)
{
ans = CurrFrame.FrameArcElem.nQty;
}
return ans;
}
set
{
if (CurrFrame.FrameArcElem != null && CurrFrame.FrameArcElem.nQty != value)
{
CurrFrame.FrameArcElem.nQty = value;
_ = EC_UpdatePreview.InvokeAsync(CurrFrame);
}
}
}
private double ArcSection
{
get
{
double ans = 0;
if (CurrFrame.FrameArcElem != null)
{
ans = CurrFrame.FrameArcElem.nSection;
}
return ans;
}
set
{
if (CurrFrame.FrameArcElem != null && CurrFrame.FrameArcElem.nSection != value)
{
CurrFrame.FrameArcElem.nSection = value;
_ = EC_UpdatePreview.InvokeAsync(CurrFrame);
}
}
}
#endregion Private Properties
#region Private Methods
private void IsCheckedQty()
{
insertQty = !insertQty;
}
private void IsCheckCutEdge()
{
if (CurrFrame.FrameArcElem != null)
{
CurrFrame.FrameArcElem.bCutEdge = !CurrFrame.FrameArcElem.bCutEdge;
_ = EC_UpdatePreview.InvokeAsync(CurrFrame);
}
}
private void IsCheckAlign()
{
if (CurrFrame.FrameArcElem != null)
{
CurrFrame.FrameArcElem.bIsAlign = !CurrFrame.FrameArcElem.bIsAlign;
_ = EC_UpdatePreview.InvokeAsync(CurrFrame);
}
}
#endregion Private Methods
}
}