minor fix condizioni su profile/profileList + fix togliendo old data

This commit is contained in:
Samuele Locatelli
2026-01-22 16:12:26 +01:00
parent e1ba401353
commit c0fd981d45
10 changed files with 68 additions and 34 deletions
+32 -19
View File
@@ -637,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);
}
@@ -671,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);
@@ -708,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);
}
}
}
@@ -894,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>
@@ -923,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
}
}
}
@@ -1019,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;
@@ -1044,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))
@@ -1053,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();
}
@@ -1152,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();
}
@@ -1203,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);
//}
}
}
@@ -1305,7 +1318,7 @@ namespace WebWindowComplex
if (newSash != null && item != null)
{
item = newSash;
if(!noSvg)
if (!noSvg)
await DoPreviewSvg();
}
}