Cambiata gestione lista threshold

This commit is contained in:
Annamaria Sassi
2025-12-23 14:29:43 +01:00
parent 703931868a
commit cb2fa4cf4f
11 changed files with 69 additions and 26 deletions
-3
View File
@@ -88,9 +88,6 @@ else if (!string.IsNullOrEmpty(outSave))
}
<div class="card">
<div class="card-body small">
WindowUid: @windowUid
</div>
<div class="card-body small">
@JsonSer
</div>
+4 -4
View File
@@ -91,10 +91,10 @@ namespace Test.UI.Components.Pages
new string("ProfiloSaomad")
};
protected List<Threshold> AvailThresholdList { get; set; } = new List<Threshold>()
protected Dictionary<string, List<Threshold>> AvailThreshold { get; set; } = new Dictionary<string, List<Threshold>>()
{
new Threshold(1, "Bottom"),
new Threshold(3, "Threshold")
{"Profilo78", new List<Threshold>() { new Threshold(1, "Bottom"), new Threshold(3, "Threshold")}},
{"ProfiloSaomad", new List<Threshold>(){ new Threshold(1, "Bottom"), new Threshold(2, "BottomWaterdrip"), new Threshold(3, "Threshold")}}
};
[Inject]
@@ -150,7 +150,7 @@ namespace Test.UI.Components.Pages
Hardware = AvailHardwareList,
Material = AvailMaterialList,
Profile = AvailProfileList,
Threshold = AvailThresholdList
Threshold = AvailThreshold
};
CurrData = new LivePayload()
{
+4 -4
View File
@@ -91,10 +91,10 @@ namespace Test.UI.Components.Pages
new string("ProfiloSaomad")
};
protected List<Threshold> AvailThresholdList { get; set; } = new List<Threshold>()
protected Dictionary<string, List<Threshold>> AvailThreshold { get; set; } = new Dictionary<string, List<Threshold>>()
{
new Threshold(1, "Bottom"),
new Threshold(3, "Threshold")
{"Profilo78", new List<Threshold>() { new Threshold(1, "Bottom"), new Threshold(3, "Threshold")}},
{"ProfiloSaomad", new List<Threshold>(){ new Threshold(1, "Bottom"), new Threshold(2, "BottomWaterdrip"), new Threshold(3, "Threshold")}}
};
[Inject]
@@ -357,7 +357,7 @@ namespace Test.UI.Components.Pages
Hardware = AvailHardwareList,
Material = AvailMaterialList,
Profile = AvailProfileList,
Threshold = AvailThresholdList
Threshold = AvailThreshold
};
}
+1 -1
View File
@@ -43,7 +43,7 @@
<div class="input-group mb-2">
<label class="input-group-text">Tipology</label>
<select class="form-select" @bind="SelThreshold">
@foreach (var item in Frame.m_ThresholdList)
@foreach (var item in CurrFrameWindow.ThresholdList)
{
<option value="@(item.Type)">@(item.Name)</option>
}
+1 -1
View File
@@ -47,7 +47,7 @@ namespace WebWindowComplex.DTO
/// <summary>
/// Elenco profili ammessi
/// </summary>
public List<Threshold> Threshold { get; set; } = null!;
public Dictionary<string,List<Threshold>> Threshold { get; set; } = null!;
/// <summary>
/// Verifica di validità dell'intero Payload
+1
View File
@@ -277,6 +277,7 @@ namespace WebWindowComplex.Json
newFrame.SetGroupId(GroupId);
newFrame.SetAreaType(AreaTypes.FRAME);
newFrame.SetSelShape(m_Shape);
newFrame.RefreshThresholdList();
newFrame.SetSelThresholdFromName(m_Threshold);
newFrame.SetBottomRail(m_bBottomRail);
newFrame.SetBottomRailQty(m_nBottomRailQty);
+22 -2
View File
@@ -14,7 +14,7 @@ namespace WebWindowComplex.Models
#region Public Fields
// Lista hardware completa passata dal chiamante del componente
public static List<Threshold> m_ThresholdList = new List<Threshold>();
public static Dictionary<string,List<Threshold>> m_AllThresholdList = new Dictionary<string, List<Threshold>>();
#endregion Public Fields
@@ -52,6 +52,18 @@ namespace WebWindowComplex.Models
}
}
public List<Threshold> ThresholdList
{
get
{
return m_ThresholdList;
}
set
{
m_ThresholdList = value;
}
}
public Threshold SelThreshold
{
get
@@ -340,6 +352,11 @@ namespace WebWindowComplex.Models
#region Public Methods
public void RefreshThresholdList()
{
m_ThresholdList.Clear();
m_ThresholdList = m_AllThresholdList.GetValueOrDefault(ParentWindow.sProfilePath);
}
public override Frame Copy(Area ParentArea)
{
return null;
@@ -361,7 +378,8 @@ namespace WebWindowComplex.Models
newFrame.SetSelShape(Shapes.RECTANGLE);
newFrame.SetBottomRail(false);
newFrame.SetBottomRailQty(0);
newFrame.SetSelThresholdFromName(m_ThresholdList.FirstOrDefault().Name);
newFrame.RefreshThresholdList();
newFrame.SetSelThresholdFromName(m_AllThresholdList.GetValueOrDefault(Window.sProfilePath).FirstOrDefault().Name);
//newFrame.FrameArcElem = null;
return newFrame;
}
@@ -525,6 +543,8 @@ namespace WebWindowComplex.Models
private Threshold m_SelThreshold;
private List<Threshold> m_ThresholdList = new List<Threshold>();
private List<FrameDimension> m_DimensionList = new List<FrameDimension>();
private List<Joint> m_JointList = new List<Joint>();
+11 -8
View File
@@ -170,13 +170,16 @@
</div>
</div>
</div>
Splitted currSplitted = SplittedList.Where(x => x.AreaList.First().Equals(FillList[currFillIndex])).FirstOrDefault();
@if (currSplitted != null) {
<AreaSplit SashList="SashList"
SplittedList="SplittedList"
CurrSplitted="currSplitted"
EC_UpdateSplitted="UpdatePreviewSplitted">
</AreaSplit>
@if(SplittedList != null && SplittedList.Count > 0)
{
Splitted currSplitted = SplittedList.Where(x => x.AreaList.First().Equals(FillList[currFillIndex])).FirstOrDefault();
@if (currSplitted != null) {
<AreaSplit SashList="SashList"
SplittedList="SplittedList"
CurrSplitted="currSplitted"
EC_UpdateSplitted="UpdatePreviewSplitted">
</AreaSplit>
}
}
@* @foreach (var currSplitted in m_SplittedList)
{
@@ -192,7 +195,7 @@
<General CurrWindow="m_CurrWindow"
ListPayload="ListPayload"
ListWarnings="listWarnings"
EC_UpdateGeneral="UpdatePreviewGeneral"
EC_UpdateGeneral="UpdatePreviewGeneral"
EC_ReqClose="ReturnTree">
</General>
}
+1 -1
View File
@@ -744,7 +744,7 @@ namespace WebWindowComplex
/// </summary>
protected void UpdateSelParameter()
{
Frame.m_ThresholdList = ListPayload.Threshold;
Frame.m_AllThresholdList = ListPayload.Threshold;
Sash.m_HardwareCompleteList = ListPayload.Hardware;
Sash.s_FamilyHardwareList = ListPayload.FamilyHardware;
if (CurrSelection != null && CurrSelection.IsValid())
+6 -1
View File
@@ -6,7 +6,7 @@
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<Version>2.7.12.2312</Version>
<Version>2.7.12.2314</Version>
<Authors>Annamaria Sassi</Authors>
<Company>Egalware</Company>
<Description>Componente gestione Configurazioni avanzate Window per LUX</Description>
@@ -429,6 +429,11 @@
@@ -6,7 +6,7 @@
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<Version>2.7.12.2312</Version>
<Version>2.7.12.2314</Version>
<Authors>Annamaria Sassi</Authors>
<Company>Egalware</Company>
<Description>Componente gestione JWD per LUX</Description>
@@ -528,6 +528,23 @@