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
+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>
+7 -3
View File
@@ -68,8 +68,10 @@ namespace WebWindowComplex.DTO
bool matOK = Material != null && Material.Count > 0;
bool colorOK = ColorMaterial != null && ColorMaterial.Count > 0;
bool profileOK = ProfileList != null && ProfileList.Count > 0;
#if false
bool profileOKOld = Profile != null && Profile.Count > 0;
bool thresholdOK = Threshold != null && Threshold.Count > 0;
bool thresholdOK = Threshold != null && Threshold.Count > 0;
#endif
return famHwOK && glassOK && hwOK && colorOK && matOK && profileOK;
}
/// <summary>
@@ -83,9 +85,11 @@ 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 = ProfileList != null && ProfileList.Count > 0;
bool profileOK = ProfileList != null && ProfileList.Count > 0;
#if false
bool profileOKOld = Profile != null && Profile.Count > 0;
bool thresholdOK = Threshold != null && Threshold.Count > 0;
bool thresholdOK = Threshold != null && Threshold.Count > 0;
#endif
return famHwOK || glassOK || hwOK || colorOK || matOK || profileOK;
}
}
+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();
}
}
+7 -1
View File
@@ -6,7 +6,7 @@
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<Version>2.8.1.2214</Version>
<Version>2.8.1.2216</Version>
<Authors>Annamaria Sassi</Authors>
<Company>Egalware</Company>
<Description>Componente gestione Configurazioni avanzate Window per LUX</Description>
@@ -55,6 +55,12 @@