74 lines
1.9 KiB
C#
74 lines
1.9 KiB
C#
using Microsoft.AspNetCore.Components;
|
|
using WebWindowComplex.Models;
|
|
|
|
namespace WebWindowComplex.Compo
|
|
{
|
|
public partial class EditFrameDimensions
|
|
{
|
|
#region Public Properties
|
|
|
|
/// <summary>
|
|
/// Frame dimension corrente
|
|
/// </summary>
|
|
[Parameter]
|
|
public FrameDimension CurrRec { get; set; } = null!;
|
|
|
|
[Parameter]
|
|
public EventCallback<FrameDimension> EC_Update { get; set; }
|
|
|
|
/// <summary>
|
|
/// Livello di accesso (utente base)
|
|
/// </summary>
|
|
[CascadingParameter(Name = "User")]
|
|
public bool BaseUser { get; set; } = false!;
|
|
|
|
#endregion Public Properties
|
|
|
|
#region Protected Methods
|
|
|
|
protected override void OnParametersSet()
|
|
{
|
|
ShapeFrame();
|
|
}
|
|
|
|
#endregion Protected Methods
|
|
|
|
#region Private Fields
|
|
|
|
private string shapeFrame = "";
|
|
|
|
#endregion Private Fields
|
|
|
|
#region Private Properties
|
|
|
|
private string GetImageDimensionPath(string fileDir, string fileName) => $"_content/Egw.Lux.WebWindowComplex/icone/frame/dimension/{fileDir}/{fileName}.svg";
|
|
|
|
/// <summary>
|
|
/// Metodo per aggiornare valore dimension
|
|
/// </summary>
|
|
private double CurrVal
|
|
{
|
|
get => CurrRec.dDimension;
|
|
set
|
|
{
|
|
if (CurrRec.dDimension != value)
|
|
{
|
|
CurrRec.dDimension = value;
|
|
CurrRec.dDimension = value;
|
|
_ = EC_Update.InvokeAsync(CurrRec);
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion Private Properties
|
|
|
|
#region Private Methods
|
|
|
|
private void ShapeFrame()
|
|
{
|
|
shapeFrame = CurrRec.ParentFrame.ShapeList.FirstOrDefault(x => x.Id == (int)CurrRec.ParentFrame.Shape).Name;
|
|
}
|
|
|
|
#endregion Private Methods
|
|
}
|
|
} |