Merge branch 'release/AddDeprecatedManaged_01'

This commit is contained in:
Samuele Locatelli
2026-01-22 16:12:54 +01:00
14 changed files with 221 additions and 58 deletions
+2 -2
View File
@@ -154,8 +154,8 @@ namespace Test.UI.Components.Pages
Glass = AvailGlassList,
Hardware = AvailHardwareList,
Material = AvailMaterialList,
Profile = AvailProfileList,
Threshold = AvailThreshold
//Profile = AvailProfileList,
//Threshold = AvailThreshold
};
CurrData = new LivePayload()
{
+1
View File
@@ -69,6 +69,7 @@
<WebWindowComplex.TableComp ListPayload="SetupList"
LiveData="CurrData"
SelectionData="SelectList"
baseUser="User"
EC_ActionReq="DoAction"
EC_DoUpdate="ExecRequest"
+77 -5
View File
@@ -1,6 +1,7 @@
using Egw.Window.Data;
using EgwCoreLib.Lux.Core;
using EgwCoreLib.Lux.Core.RestPayload;
using EgwCoreLib.Lux.Data.DbModel.Config;
using EgwCoreLib.Lux.Data.Services;
using Microsoft.AspNetCore.Components;
using Newtonsoft.Json;
@@ -57,6 +58,11 @@ namespace Test.UI.Components.Pages
/// </summary>
protected BaseListPayload SetupList = new BaseListPayload();
/// <summary>
/// Configurazione selezionati
/// </summary>
protected SelectPayload SelectList = new SelectPayload();
#endregion Protected Fields
#region Protected Properties
@@ -65,7 +71,8 @@ namespace Test.UI.Components.Pages
{
new string("White"),
new string("Black"),
new string("Blu")
new string("Blu"),
new string("Wood")
};
protected List<string> AvailFamilyHardwareList { get; set; } = new List<string>()
@@ -92,18 +99,68 @@ namespace Test.UI.Components.Pages
new string("Abete")
};
protected List<string> AvailProfileList { get; set; } = new List<string>()
protected List<string> AvailProfileListOld { get; set; } = new List<string>()
{
new string("Profilo78"),
new string("ProfiloSaomad")
};
protected Dictionary<string, List<Threshold>> AvailThreshold { get; set; } = new Dictionary<string, List<Threshold>>()
protected Dictionary<string, List<Threshold>> AvailThresholdOld { get; set; } = new Dictionary<string, List<Threshold>>()
{
{"Profilo78", new List<Threshold>() { new Threshold(3, "Bottom"), new Threshold(1, "Threshold")}},
{"ProfiloSaomad", new List<Threshold>(){ new Threshold(3, "Bottom"), new Threshold(2, "BottomWaterdrip"), new Threshold(1, "Threshold")}}
};
/// <summary>
/// Lista profili da DB
/// </summary>
private List<ProfilePayload> AvailProfileList = new List<ProfilePayload>();
private List<Threshold> ThresholdProfilo78 = new List<Threshold>()
{
{ new Threshold(3, "Bottom") },
{ new Threshold(1, "Threshold") }
};
private List<Threshold> ThresholdProfiloSaomad = new List<Threshold>()
{
{ new Threshold(3, "Bottom") },
{ new Threshold(2, "BottomWaterdrip") },
{ new Threshold(1, "Threshold") }
};
private Dictionary<string, double> ParamProfilo78 = new Dictionary<string, double>()
{
{"Frame_BottomRail_Overlap", 33.2},
{"Frame_Fill_Rail_DimMax", 85},
{"Frame_Fill_Rail_DimMin", 70},
{"Frame_Fill_Rail_DimStd", 72},
{"Frame_Fixed_Bottom_DimMax", 80},
{"Frame_Fixed_Bottom_DimMin", 70},
{"Frame_Fixed_Bottom_DimStd", 78},
{"Frame_Fixed_Top_DimMax", 80},
{"Frame_Fixed_Top_DimMin", 70},
{"Frame_Fixed_Top_DimStd", 78}
};
private Dictionary<string, double> ParamProfiloSaomad = new Dictionary<string, double>()
{
{"Frame_Frame_Split_DimMax", 85},
{"Frame_Frame_Split_DimMin", 55},
{"Frame_Frame_Split_DimStd", 60},
{"Frame_Mixed_Bottom_DimMax", 80},
{"Frame_Mixed_Bottom_DimMin", 70},
{"Frame_Mixed_Bottom_DimStd", 78},
{"Frame_Mixed_Split_DimMax", 110},
{"Frame_Mixed_Split_DimMin", 70},
{"Frame_Mixed_Split_DimStd", 90},
{"Frame_Mixed_Top_DimMax", 80},
{"Frame_Mixed_Top_DimMin", 70},
{"Frame_Mixed_Top_DimStd", 78},
{"Frame_Rail_Bottom_DimMax", 80}
};
[Inject]
protected IConfiguration Config { get; set; } = null!;
@@ -150,6 +207,20 @@ namespace Test.UI.Components.Pages
currJwd = InitialJwd;
// rileggo altri dati
await ReloadData();
// costruisco lista profili
ProfilePayload pp1 = new ProfilePayload()
{
ProfileName = "Profilo78",
ThresholdList = ThresholdProfilo78,
ParameterDict = ParamProfilo78
};
ProfilePayload pp2 = new ProfilePayload()
{
ProfileName = "ProfiloSaomad",
ThresholdList = ThresholdProfiloSaomad,
ParameterDict = ParamProfiloSaomad
};
AvailProfileList = new List<ProfilePayload> { pp1, pp2 };
// preparo conf oggetti x controllo
SetupList = new BaseListPayload()
{
@@ -158,8 +229,9 @@ namespace Test.UI.Components.Pages
Glass = AvailGlassList,
Hardware = AvailHardwareList,
Material = AvailMaterialList,
Profile = AvailProfileList,
Threshold = AvailThreshold
ProfileList = AvailProfileList,
//Profile = AvailProfileListOld,
//Threshold = AvailThresholdOld
};
CurrData = new LivePayload()
{
+2 -2
View File
@@ -356,8 +356,8 @@ namespace Test.UI.Components.Pages
Glass = AvailGlassList,
Hardware = AvailHardwareList,
Material = AvailMaterialList,
Profile = AvailProfileList,
Threshold = AvailThreshold
//Profile = AvailProfileList,
//Threshold = AvailThreshold
};
}
+1
View File
@@ -1,4 +1,5 @@
{
"DetailedErrors": true,
"Logging": {
"LogLevel": {
"Default": "Information",
+1
View File
@@ -1,4 +1,5 @@
{
"DetailedErrors": true,
"Logging": {
"LogLevel": {
"Default": "Information",
+7 -4
View File
@@ -40,9 +40,12 @@
{
<label class="input-group-text">Profile</label>
<select class="form-select @(cssValid("Profile"))" @bind="@CurrProfile">
@foreach (string profile in ListPayload.Profile)
@if (ListPayload.ProfileList != null)
{
<option value="@profile">@profile</option>
foreach (var profile in ListPayload.ProfileList)
{
<option value="@profile.ProfileName">@profile.ProfileName</option>
}
}
</select>
}
@@ -87,7 +90,7 @@
<div class="row">
<h5 class="card-title">Color</h5>
</div>
<div class ="row">
<div class="row">
<div class="input-group mb-2">
@if (User)
{
@@ -107,7 +110,7 @@
</div>
<div class="input-group mb-2">
<label class="input-group-text">Trunking</label>
<select class="form-select" >
<select class="form-select">
<option value="0">Black</option>
<option value="1">Silver</option>
<option value="2">White</option>
+12 -6
View File
@@ -67,9 +67,12 @@ namespace WebWindowComplex.DTO
bool glassOK = Glass != null && Glass.Count > 0;
bool matOK = Material != null && Material.Count > 0;
bool colorOK = ColorMaterial != null && ColorMaterial.Count > 0;
bool profileOK = Profile != null && Profile.Count > 0;
bool thresholdOK = Threshold != null && Threshold.Count > 0;
return famHwOK && glassOK && hwOK && colorOK && matOK && profileOK && thresholdOK;
bool profileOK = ProfileList != null && ProfileList.Count > 0;
#if false
bool profileOKOld = Profile != null && Profile.Count > 0;
bool thresholdOK = Threshold != null && Threshold.Count > 0;
#endif
return famHwOK && glassOK && hwOK && colorOK && matOK && profileOK;
}
/// <summary>
/// Verifica che Payload sia almeno parzialmente popolato
@@ -82,9 +85,12 @@ namespace WebWindowComplex.DTO
bool glassOK = Glass != null && Glass.Count > 0;
bool matOK = Material != null && Material.Count > 0;
bool colorOK = ColorMaterial != null && ColorMaterial.Count > 0;
bool profileOK = Profile != null && Profile.Count > 0;
bool thresholdOK = Threshold != null && Threshold.Count > 0;
return famHwOK || glassOK || hwOK || colorOK || matOK || profileOK || thresholdOK;
bool profileOK = ProfileList != null && ProfileList.Count > 0;
#if false
bool profileOKOld = Profile != null && Profile.Count > 0;
bool thresholdOK = Threshold != null && Threshold.Count > 0;
#endif
return famHwOK || glassOK || hwOK || colorOK || matOK || profileOK;
}
}
}
+14
View File
@@ -52,5 +52,19 @@ namespace WebWindowComplex.DTO
bool profileOK = !string.IsNullOrEmpty(Profile);
return famHwOK && colorOK && matOK && glassOk && profileOK;
}
/// <summary>
/// Verifica che Payload sia almeno parzialmente popolato
/// </summary>
/// <returns></returns>
public bool IsPopulated()
{
bool famHwOK = FamilyHardware != null;
bool glassOK = Glass != null;
bool matOK = Material != null;
bool colorOK = ColorMaterial != null;
bool profileOK = Profile != null;
return famHwOK || glassOK || colorOK || matOK || profileOK;
}
}
}
+6 -4
View File
@@ -12,10 +12,12 @@ namespace WebWindowComplex.Models
public class Frame : Area
{
#region Public Fields
// Lista hardware completa passata dal chiamante del componente
public static Dictionary<string, List<Threshold>> m_AllThresholdList = new Dictionary<string, List<Threshold>>();
public static Dictionary<string, List<Threshold>> m_AllThresholdListOld = new Dictionary<string, List<Threshold>>();
// Lista soglie completa passata dal chiamante del componente
public static List<Threshold> m_AllThresholdList = new List<Threshold>();
#endregion Public Fields
#region Public Constructors
@@ -361,7 +363,7 @@ namespace WebWindowComplex.Models
public void RefreshThresholdList()
{
m_ThresholdList.Clear();
m_ThresholdList = m_AllThresholdList.GetValueOrDefault(ParentWindow.sProfilePath);
m_ThresholdList = m_AllThresholdList;
}
public double HeightFrame()
@@ -413,7 +415,7 @@ namespace WebWindowComplex.Models
newFrame.RefreshThresholdList();
if (m_AllThresholdList != null && m_AllThresholdList.Any())
{
newFrame.SetSelThresholdFromName(m_AllThresholdList.GetValueOrDefault(Window.sProfilePath)?.FirstOrDefault()?.Name ?? "");
newFrame.SetSelThresholdFromName(m_AllThresholdList.FirstOrDefault().Name ?? "");
}
//newFrame.FrameArcElem = null;
return newFrame;
+4 -5
View File
@@ -17,13 +17,12 @@ namespace WebWindowComplex.Models
{
public class Window
{
#region Public Events
#region Public Fields
//public event EventHandler<OnPreviewEventArgs> OnPreview = delegate { };
//public event EventHandler<OnReqShapeEventArgs> OnReqShape = delegate { };
//public event EventHandler<OnReqHwOptEventArgs> OnReqHwOption = delegate { };
// Lista dei parametri del profilo passata dal chiamante del componente
public static Dictionary<string, double> m_ParameterList = new Dictionary<string, double>();
#endregion Public Events
#endregion Public Fields
#region Public Properties
+52 -28
View File
@@ -52,7 +52,7 @@ namespace WebWindowComplex
/// Preselezione valori
/// </summary>
[Parameter]
public SelectPayload? CurrSelection { get; set; } = null;
public SelectPayload? SelectionData { get; set; } = null;
/// <summary>
/// Richiesta azione al parent
@@ -557,6 +557,7 @@ namespace WebWindowComplex
try
{
WindowFromJson = JsonConvert.DeserializeObject<JsonWindow>(LiveData.CurrJwd, new PolymorphicJsonConverter()) ?? new JsonWindow("", "", "", "");
UpdateInputList(WindowFromJson);
setCurrWindow(WindowFromJson);
//SOLO SE non sono in edit...
if (!editLock)
@@ -636,10 +637,10 @@ namespace WebWindowComplex
{
// chiedo SVG
//prevReq = (int)DataReq.ReqSvg;
if(prevReq != (int)DataReq.ReqSvg || !prevLiveData.JwdEqual(LiveData.CurrJwd))
if (prevReq != (int)DataReq.ReqSvg || !prevLiveData.JwdEqual(LiveData.CurrJwd))
{
if(prevReq != (int)DataReq.ReqHwOpt)
await DoPreviewSvg(true);
if (prevReq != (int)DataReq.ReqHwOpt)
await DoPreviewSvg(true);
else if (LiveData.DictOptionsXml.Count > 0)
await DoPreviewSvg(true);
}
@@ -670,7 +671,7 @@ namespace WebWindowComplex
{
for (int i = 0; i < 2; i++)
m_CurrWindow.AreaList.First().DimensionList[i].dDimension = m_PreviousWindow.AreaList.First().DimensionList[i].dDimension;
if(m_CurrWindow.AreaList.First().Shape == Shapes.TRIANGLE)
if (m_CurrWindow.AreaList.First().Shape == Shapes.TRIANGLE)
{
for (int i = 0; i < 2; i++)
m_CurrWindow.AreaList.First().JointList[i].SetSelJointType(m_PreviousWindow.AreaList.First().JointList[i].SelJointType);
@@ -707,11 +708,12 @@ namespace WebWindowComplex
sashFromGroupId.SashShape = item.Value;
sashFromGroupId.UpdateShape(item.Value);
}
if(prevReq == (int)DataReq.ReqShape){
if(reqHwOpt > 0)
if (prevReq == (int)DataReq.ReqShape)
{
if (reqHwOpt > 0)
{
List<int> reqList = SashList.Select(x => x.GroupId).ToList();
_=DoReqOptHardware(reqList);
_ = DoReqOptHardware(reqList);
}
}
}
@@ -748,18 +750,28 @@ namespace WebWindowComplex
/// <summary>
/// Metodo per settare i parmateri di ingresso selezionati
/// </summary>
protected void UpdateSelParameter()
protected void UpdateInputList(JsonWindow WindowFromJson)
{
Frame.m_AllThresholdList = ListPayload.Threshold;
//Frame.m_AllThresholdList = ListPayload.Threshold;
string profile = WindowFromJson.ProfilePath;
Window.m_ParameterList = ListPayload.ProfileList.FirstOrDefault(x => x.ProfileName.Equals(profile)).ParameterDict;
Frame.m_AllThresholdList = ListPayload.ProfileList.FirstOrDefault(x => x.ProfileName.Equals(profile)).ThresholdList;
Sash.m_HardwareCompleteList = ListPayload.Hardware;
Sash.s_FamilyHardwareList = ListPayload.FamilyHardware;
if (CurrSelection != null && CurrSelection.IsValid())
}
/// <summary>
/// Metodo per settare i parmateri di ingresso selezionati
/// </summary>
protected void UpdateSelParameter()
{
if (SelectionData != null && SelectionData.IsValid())
{
SelFamilyHardware = CurrSelection.FamilyHardware ?? "";
SelColorMaterial = CurrSelection.ColorMaterial ?? "";
SelMaterial = CurrSelection.Material ?? "";
SelGlass = CurrSelection.Glass ?? "";
SelProfile = CurrSelection.Profile ?? "";
SelFamilyHardware = SelectionData.FamilyHardware ?? "";
SelColorMaterial = SelectionData.ColorMaterial ?? "";
SelMaterial = SelectionData.Material ?? "";
SelGlass = SelectionData.Glass ?? "";
SelProfile = SelectionData.Profile ?? "";
}
}
@@ -883,10 +895,16 @@ namespace WebWindowComplex
{
listErrPre.Add("ColorMaterial", "Missing ColorMaterial List!");
}
if (ListPayload.Profile == null || ListPayload.Profile.Count == 0)
if (ListPayload.ProfileList == null || ListPayload.ProfileList.Count == 0)
{
listErrPre.Add("Profile", "Missing Profile List!");
}
#if false
if (ListPayload.Profile == null || ListPayload.Profile.Count == 0)
{
listErrPre.Add("Profile", "Missing Profile List!");
}
#endif
}
/// <summary>
@@ -912,10 +930,16 @@ namespace WebWindowComplex
{
listWarnings.Add("Material", $"Missing Material: {m_CurrWindow.sMaterial}");
}
if (!ListPayload.Profile.Contains(m_CurrWindow.sProfilePath))
if (ListPayload.ProfileList == null || !ListPayload.ProfileList.Any(x => x.ProfileName.Contains(m_CurrWindow.sProfilePath)))
{
listWarnings.Add("Profile", $"Missing Profile: {m_CurrWindow.sProfilePath}");
}
#if false
if (!ListPayload.Profile.Contains(m_CurrWindow.sProfilePath))
{
listWarnings.Add("Profile", $"Missing Profile: {m_CurrWindow.sProfilePath}");
}
#endif
}
}
}
@@ -1008,7 +1032,7 @@ namespace WebWindowComplex
}
private Area SearchArea(Area currentArea, int idSearch, Area itemSearch)
{
{
if (currentArea.GroupId == idSearch && currentArea.AreaType.Equals(itemSearch.AreaType))
{
return currentArea;
@@ -1033,7 +1057,7 @@ namespace WebWindowComplex
string Color = args.Color;
string Glass = args.Glass;
string Material = args.Material;
string Profile = args.Profile;
string Profile = args.Profile;
if (m_CurrWindow != null)
{
if (!string.IsNullOrEmpty(Color))
@@ -1042,7 +1066,7 @@ namespace WebWindowComplex
m_CurrWindow.sGlass = Glass;
else if (!string.IsNullOrEmpty(Material))
m_CurrWindow.sMaterial = Material;
else if(!string.IsNullOrEmpty(Profile))
else if (!string.IsNullOrEmpty(Profile))
m_CurrWindow.sProfilePath = Profile;
_ = DoPreviewSvg();
}
@@ -1141,8 +1165,8 @@ namespace WebWindowComplex
var currRec = m_CurrWindow.AreaList.FirstOrDefault(x => x.GroupId == newFrame.GroupId);
// lo aggiorno
currRec = newFrame;
if(forceSvgNoHw)
await DoPreviewSvg(true,true);
if (forceSvgNoHw)
await DoPreviewSvg(true, true);
else
await DoPreviewSvg();
}
@@ -1192,10 +1216,10 @@ namespace WebWindowComplex
//reqHwOpt++;
//if(prevReq == (int)DataReq.ReqShape)
//{
// richiesta calcolo opzioni hardware per la singola sash group
List<int> reqList = SashList.Select(x => x.GroupId).ToList();
// chiamo con gruppo della nuova sash
await DoReqOptHardware(reqList);
// richiesta calcolo opzioni hardware per la singola sash group
List<int> reqList = SashList.Select(x => x.GroupId).ToList();
// chiamo con gruppo della nuova sash
await DoReqOptHardware(reqList);
//}
}
}
@@ -1294,7 +1318,7 @@ namespace WebWindowComplex
if (newSash != null && item != null)
{
item = newSash;
if(!noSvg)
if (!noSvg)
await DoPreviewSvg();
}
}
+19 -1
View File
@@ -6,7 +6,7 @@
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<Version>2.8.1.2209</Version>
<Version>2.8.1.2216</Version>
<Authors>Annamaria Sassi</Authors>
<Company>Egalware</Company>
<Description>Componente gestione Configurazioni avanzate Window per LUX</Description>
@@ -48,5 +48,23 @@
@@ -6,7 +6,7 @@
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<Version>2.8.1.2209</Version>
<Version>2.8.1.2216</Version>
<Authors>Annamaria Sassi</Authors>
<Company>Egalware</Company>
<Description>Componente gestione JWD per LUX</Description>
@@ -56,6 +56,28 @@