Update table comp x evitare (maybe) race condition in update table
This commit is contained in:
@@ -611,7 +611,7 @@ namespace WebWindowComplex
|
||||
UpdateDict();
|
||||
}
|
||||
}
|
||||
if (m_CurrWindow.AreaList != null && m_CurrWindow.AreaList.Count > 0)
|
||||
if (m_CurrWindow != null && m_CurrWindow.AreaList != null && m_CurrWindow.AreaList.Count > 0)
|
||||
{
|
||||
checkWarnings();
|
||||
if (SashList.Count > 0)
|
||||
@@ -736,7 +736,7 @@ namespace WebWindowComplex
|
||||
}
|
||||
m_CurrWindow = WindowFromJson.Deserialize();
|
||||
groupIdOK = CheckGroupId(m_CurrWindow);
|
||||
if(m_CurrWindow.AreaList != null && m_CurrWindow.AreaList.Count > 0 && groupIdOK)
|
||||
if (m_CurrWindow.AreaList != null && m_CurrWindow.AreaList.Count > 0 && groupIdOK)
|
||||
{
|
||||
FrameWindow = m_CurrWindow.AreaList[0];
|
||||
if (m_PreviousWindow != null)
|
||||
@@ -777,16 +777,23 @@ namespace WebWindowComplex
|
||||
// Inserisco le forme ricevuto nei sash group
|
||||
foreach (var item in LiveData.DictShape)
|
||||
{
|
||||
Sash sashFromGroupId = SashList.First(x => x.GroupId == item.Key);
|
||||
sashFromGroupId.SashShape = item.Value;
|
||||
sashFromGroupId.UpdateShape(item.Value);
|
||||
//Sash sashFromGroupId = SashList.First(x => x.GroupId == item.Key);
|
||||
var sashFromGroupId = SashList.FirstOrDefault(x => x.GroupId == item.Key);
|
||||
if (sashFromGroupId != null)
|
||||
{
|
||||
sashFromGroupId.SashShape = item.Value;
|
||||
sashFromGroupId.UpdateShape(item.Value);
|
||||
}
|
||||
}
|
||||
if (prevReq == (int)DataReq.ReqShape)
|
||||
{
|
||||
if (reqHwOpt > 0)
|
||||
{
|
||||
List<int> reqList = SashList.Select(x => x.GroupId).ToList();
|
||||
_ = DoReqOptHardware(reqList);
|
||||
if (reqList.Count > 0)
|
||||
{
|
||||
_ = DoReqOptHardware(reqList);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -802,7 +809,7 @@ namespace WebWindowComplex
|
||||
}
|
||||
}
|
||||
}
|
||||
if(LiveData.ProfElementList.Count > 0)
|
||||
if (LiveData.ProfElementList.Count > 0)
|
||||
{
|
||||
// Inserisco i profili ricevuti nei rispettivi Element
|
||||
foreach (var item in LiveData.ProfElementList)
|
||||
@@ -987,7 +994,7 @@ namespace WebWindowComplex
|
||||
{
|
||||
listWarnings.Add("ColorMaterial", $"Missing Color: {m_CurrWindow.sColorMaterial}");
|
||||
}
|
||||
if (ListPayload.Glass == null || !ListPayload.Glass.Contains(m_CurrWindow.sGlass))
|
||||
if (ListPayload.Glass == null || !ListPayload.Glass.Contains(m_CurrWindow.sGlass))
|
||||
{
|
||||
listWarnings.Add("Glass", $"Missing Glass: {m_CurrWindow.sGlass}");
|
||||
}
|
||||
@@ -1153,7 +1160,7 @@ namespace WebWindowComplex
|
||||
// Cerco area corrispondente al GroupId
|
||||
Area? found = SearchAreaFromGroupId(FrameWindow, GroupIdSearch);
|
||||
List<ElementDimension> elemList = new List<ElementDimension>();
|
||||
if(found != null)
|
||||
if (found != null)
|
||||
{
|
||||
switch (found.AreaType)
|
||||
{
|
||||
@@ -1178,7 +1185,7 @@ namespace WebWindowComplex
|
||||
{
|
||||
Sash sash = (Sash)found;
|
||||
SashDimension anta = sash.SashList.ElementAt(EntityIdSearch - 1);
|
||||
for(int index = anta.ElementDimensionList.Count; index < profileNameList.Count; index++)
|
||||
for (int index = anta.ElementDimensionList.Count; index < profileNameList.Count; index++)
|
||||
{
|
||||
double valStd = Window.m_ParameterList.GetValueOrDefault(profileNameList.ElementAt(index) + "_DimStd");
|
||||
anta.ElementDimensionList.Add(new ElementDimension(sash, index + 1, valStd));
|
||||
@@ -1196,7 +1203,7 @@ namespace WebWindowComplex
|
||||
{
|
||||
Split split = (Split)found;
|
||||
List<SplitElementDimension> SpElemList = split.searchElemFromSubArea(EntityIdSearch);
|
||||
for(int i = 0; i < SpElemList.Count; i++)
|
||||
for (int i = 0; i < SpElemList.Count; i++)
|
||||
{
|
||||
SpElemList.ElementAt(i).SetNameElement(profileNameList.ElementAt(i));
|
||||
SpElemList.ElementAt(i).SetMinDimension(Window.m_ParameterList.GetValueOrDefault(SpElemList.ElementAt(i).sName + "_DimMin"));
|
||||
@@ -1207,7 +1214,7 @@ namespace WebWindowComplex
|
||||
break;
|
||||
}
|
||||
}
|
||||
foreach(var item in elemList)
|
||||
foreach (var item in elemList)
|
||||
{
|
||||
item.SetMinDimension(Window.m_ParameterList.GetValueOrDefault(item.sName + "_DimMin"));
|
||||
item.SetMaxDimension(Window.m_ParameterList.GetValueOrDefault(item.sName + "_DimMax"));
|
||||
@@ -1366,7 +1373,7 @@ namespace WebWindowComplex
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Aggiornamento Element a causa di un cambiamento nella sash
|
||||
/// </summary>
|
||||
@@ -1436,7 +1443,7 @@ namespace WebWindowComplex
|
||||
// richiedo update element della sash (se presenti)
|
||||
if (SashList.Count > 0)
|
||||
{
|
||||
foreach(var item in SashList)
|
||||
foreach (var item in SashList)
|
||||
{
|
||||
reqList.Add(item.GroupId);
|
||||
}
|
||||
@@ -1566,7 +1573,7 @@ namespace WebWindowComplex
|
||||
}
|
||||
else
|
||||
{
|
||||
Sash item = (Sash)SearchAreaFromGroupId(FrameWindow, newSash.GroupId );
|
||||
Sash item = (Sash)SearchAreaFromGroupId(FrameWindow, newSash.GroupId);
|
||||
if (newSash != null && item != null)
|
||||
{
|
||||
item = newSash;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Version>3.1.2.415</Version>
|
||||
<Version>3.1.2.416</Version>
|
||||
<Authors>Annamaria Sassi</Authors>
|
||||
<Company>Egalware</Company>
|
||||
<Description>Componente gestione Configurazioni avanzate Window per LUX</Description>
|
||||
@@ -70,5 +70,6 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Version>3.1.2.415</Version>
|
||||
<Version>3.1.2.416</Version>
|
||||
<Authors>Annamaria Sassi</Authors>
|
||||
<Company>Egalware</Company>
|
||||
<Description>Componente gestione JWD per LUX</Description>
|
||||
@@ -93,5 +93,6 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user