5f227241f8
- Aggiunto componente per dimensioni split
78 lines
2.0 KiB
C#
78 lines
2.0 KiB
C#
using Microsoft.AspNetCore.Components;
|
|
using WebWindowComplex.Models;
|
|
|
|
namespace WebWindowComplex.Compo
|
|
{
|
|
public partial class EditSplitDimensions
|
|
{
|
|
#region Public Properties
|
|
|
|
[Parameter]
|
|
public SplitDimension CurrRec { get; set; } = null!;
|
|
|
|
[Parameter]
|
|
public string Name { get; set; } = null!;
|
|
|
|
[Parameter]
|
|
public int Index { get; set; } = -1;
|
|
|
|
[Parameter]
|
|
public EventCallback<DataUpdateSplitDimension> EC_Update { get; set; }
|
|
|
|
#endregion Public Properties
|
|
|
|
#region Private Properties
|
|
|
|
private double CurrVal
|
|
{
|
|
get => CurrRec.dDimension;
|
|
set
|
|
{
|
|
if (CurrRec.dDimension != value)
|
|
{
|
|
CurrRec.dDimension = value;
|
|
var args = new DataUpdateSplitDimension()
|
|
{
|
|
currSplit = CurrRec,
|
|
index = Index
|
|
};
|
|
_ = EC_Update.InvokeAsync(args);
|
|
}
|
|
}
|
|
}
|
|
|
|
private int CurrType
|
|
{
|
|
get => CurrRec.SelMeasureTypeIndex;
|
|
set
|
|
{
|
|
if (CurrRec.SelMeasureTypeIndex != value)
|
|
{
|
|
CurrRec.SelMeasureTypeIndex = value;
|
|
var args = new DataUpdateSplitDimension()
|
|
{
|
|
currSplit = CurrRec,
|
|
index=Index
|
|
};
|
|
_ = EC_Update.InvokeAsync(args);
|
|
}
|
|
}
|
|
}
|
|
|
|
private string SplitDimCss()
|
|
{
|
|
if (CurrRec.Parent.SelSplitShape.Equals(Json.WindowConst.SplitShapes.GRID))
|
|
return "";
|
|
else
|
|
return "col-md-12 col-lg-6";
|
|
}
|
|
|
|
#endregion Private Properties
|
|
}
|
|
|
|
public class DataUpdateSplitDimension
|
|
{
|
|
public SplitDimension currSplit { get; set; } = null!;
|
|
public int index { get; set; } = -1;
|
|
}
|
|
} |