Files
webwindowconfigurator/WebWindowComplex/Compo/EditElement.razor.cs
T
Annamaria Sassi 04d2b8201e - Eliminate aree deprecate
- Aggiunti parametri min e max degli elementi del frame e split
2026-01-23 09:24:49 +01:00

81 lines
2.0 KiB
C#

using Microsoft.AspNetCore.Components;
using WebWindowComplex.Models;
namespace WebWindowComplex.Compo
{
public partial class EditElement
{
#region Public Properties
/// <summary>
/// Joint corrente
/// </summary>
[Parameter]
public ElementDimension CurrRec { get; set; } = null!;
[Parameter]
public EventCallback<ElementDimension> EC_Update { get; set; }
/// <summary>
/// Livello di accesso (utente base)
/// </summary>
[CascadingParameter(Name = "User")]
public bool User { get; set; } = false!;
#endregion Public Properties
#region Private Properties
/// <summary>
/// Metodo per aggiornare element corrente
/// </summary>
private string name()
{
if(CurrRec.ParentArea is Frame || CurrRec.ParentArea is Sash)
{
switch (CurrRec.nIndex)
{
case 1:
{
return "B";
}
case 2:
{
return "R";
}
case 3:
{
return "T";
}
case 4:
{
return "L";
}
}
}
else
{
return CurrRec.nIndex.ToString();
}
return "";
}
/// <summary>
/// Metodo per aggiornare element corrente
/// </summary>
private double updateVal
{
get => CurrRec.dDimension;
set
{
if (CurrRec.dDimension != value)
{
CurrRec.dDimension = value;
_ = EC_Update.InvokeAsync(CurrRec);
}
}
}
#endregion Private Properties
}
}