Fix jwd vuoto
This commit is contained in:
@@ -4,6 +4,14 @@
|
||||
{
|
||||
<EgwCoreLib.Razor.LoadingData></EgwCoreLib.Razor.LoadingData>
|
||||
}
|
||||
else if (!okParams)
|
||||
{
|
||||
<div class="alert alert-warning fs-4">Parametri Mancanti!</div>
|
||||
}
|
||||
else if (!okJwd)
|
||||
{
|
||||
<div class="alert alert-warning fs-4">JWD Mancante!</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
if (listErrPre != null && listErrPre.Count > 0)
|
||||
|
||||
@@ -257,7 +257,7 @@ namespace WebWindowComplex
|
||||
if (FillList[i].Equals(node))
|
||||
{
|
||||
nFill = FillList.Count == 1 ? "" : $"{i + 1}";
|
||||
if(node.AreaList.Count == 0)
|
||||
if (node.AreaList.Count == 0)
|
||||
ItemTableList.Add(new ItemTable(AreaTypes.FILL, "FL" + nFill, maxRow, col, i, 0));
|
||||
else
|
||||
ItemTableList.Add(new ItemTable(AreaTypes.FILL, "FL" + nFill, maxRow, col, i, node.AreaList.Count));
|
||||
@@ -604,7 +604,9 @@ namespace WebWindowComplex
|
||||
isLoading = true;
|
||||
// SOLO SE sono presenti...
|
||||
listErrLink = new Dictionary<string, string>();
|
||||
if (ListPayload.IsPopulated() && LiveData.IsValid())
|
||||
okParams = ListPayload.IsPopulated();
|
||||
okJwd = LiveData.IsValid();
|
||||
if (okParams && okJwd)
|
||||
{
|
||||
bool updRequested = false;
|
||||
listErrPre = new Dictionary<string, string>();
|
||||
@@ -650,7 +652,7 @@ namespace WebWindowComplex
|
||||
listErrLink.Add("Window", $"Deserializing Error:{Environment.NewLine}{ex}");
|
||||
Log.Error($"Errore nel deserializzare jwd: {ex.Message}");
|
||||
// uso un oggetto "basico" per non fermarmi
|
||||
WindowFromJson =BuildFrameDefault();
|
||||
WindowFromJson = BuildFrameDefault();
|
||||
await DoPreviewSvg(true);
|
||||
}
|
||||
}
|
||||
@@ -675,7 +677,7 @@ namespace WebWindowComplex
|
||||
firstDisplay = false;
|
||||
// preview SVG senza HW
|
||||
await DoPreviewSvg(true, true);
|
||||
if(LiveData.ProfElementList.Count == 0)
|
||||
if (LiveData.ProfElementList.Count == 0)
|
||||
await UpdateElement(FrameWindow);
|
||||
}
|
||||
List<int> reqList = SashList.Select(x => x.GroupId).ToList();
|
||||
@@ -708,8 +710,8 @@ namespace WebWindowComplex
|
||||
{
|
||||
checkErrorPre();
|
||||
}
|
||||
isLoading = false;
|
||||
}
|
||||
isLoading = false;
|
||||
}
|
||||
|
||||
private JsonWindow BuildFrameDefault()
|
||||
@@ -751,7 +753,7 @@ namespace WebWindowComplex
|
||||
frame.AreaList.Add(fill);
|
||||
JsonWindow jsonWindow = window.Serialize();
|
||||
string jwd = JsonConvert.SerializeObject(jsonWindow);
|
||||
return JsonConvert.DeserializeObject<JsonWindow>(jwd, new PolymorphicJsonConverter()) ?? new JsonWindow("", "", "", "");
|
||||
return JsonConvert.DeserializeObject<JsonWindow>(jwd, new PolymorphicJsonConverter()) ?? new JsonWindow("", "", "", "");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -868,7 +870,7 @@ namespace WebWindowComplex
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Metodo che resetta le liste (sash, split, splitted, fill e itemTable) e le crea nuovamente
|
||||
/// </summary>
|
||||
@@ -893,7 +895,7 @@ namespace WebWindowComplex
|
||||
Child.Add(item.Row, item.NumChild);
|
||||
}
|
||||
}
|
||||
else if(RowCollapsed.ContainsKey(item.Row))
|
||||
else if (RowCollapsed.ContainsKey(item.Row))
|
||||
{
|
||||
RowCollapsed.Remove(item.Row);
|
||||
}
|
||||
@@ -944,6 +946,8 @@ namespace WebWindowComplex
|
||||
/// Booleana fase loading
|
||||
/// </summary>
|
||||
private bool isLoading = false;
|
||||
private bool okParams = false;
|
||||
private bool okJwd = false;
|
||||
private bool isRendered = false;
|
||||
|
||||
/// <summary>
|
||||
@@ -1163,9 +1167,9 @@ namespace WebWindowComplex
|
||||
/// Metodo per aggiornare il valore collassato degli elementi della gerarchia
|
||||
/// </summary>
|
||||
/// <param name="Args"></param>
|
||||
private void CollapsedRowTree(Dictionary<int,bool> Args)
|
||||
private void CollapsedRowTree(Dictionary<int, bool> Args)
|
||||
{
|
||||
foreach(var item in Args)
|
||||
foreach (var item in Args)
|
||||
{
|
||||
RowCollapsed[item.Key] = Args[item.Key] ? true : false;
|
||||
if (m_ItemTableList.FirstOrDefault(x => x.Row == item.Key) != null)
|
||||
@@ -1312,7 +1316,7 @@ namespace WebWindowComplex
|
||||
}
|
||||
string overlapName = string.Join("_", SpElemList.ElementAt(i).sName.Split('_').Skip(1));
|
||||
SpElemList.ElementAt(i).SetOverlapElement(Window.m_ParameterList.GetValueOrDefault(overlapName + "_Overlap"));
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1343,28 +1347,28 @@ namespace WebWindowComplex
|
||||
string overlapNameDx = "";
|
||||
elemList = anta.ElementDimensionList;
|
||||
List<ElementDimension> elemOld = elemList;
|
||||
foreach(var elem in sash.BottomRailElemDimList)
|
||||
foreach (var elem in sash.BottomRailElemDimList)
|
||||
{
|
||||
elem.SetOverlapElement(Window.m_ParameterList.GetValueOrDefault("Sash_BottomRail_Overlap"));
|
||||
}
|
||||
if (sash.ParentArea is Frame || (sash.ParentArea.ParentArea is Split split && split.nSplitQtyHoriz == 0))
|
||||
{
|
||||
Frame frame = sash.ParentWindow.AreaList.First();
|
||||
if(frame.SelThreshold.Name.Contains("Threshold"))
|
||||
if (frame.SelThreshold.Name.Contains("Threshold"))
|
||||
overlapNameBottom = "Sash_Threshold";
|
||||
else
|
||||
overlapNameBottom = "Sash_Bottom";
|
||||
overlapNameTop = "Sash_Top";
|
||||
if(sash.ParentArea is Frame)
|
||||
if (sash.ParentArea is Frame)
|
||||
{
|
||||
if(sash.SashList.Count == 1)
|
||||
if (sash.SashList.Count == 1)
|
||||
{
|
||||
overlapNameDx = "Sash_Top";
|
||||
overlapNameSx = "Sash_Top";
|
||||
}
|
||||
else
|
||||
{
|
||||
if(indexAnta == 0)
|
||||
if (indexAnta == 0)
|
||||
{
|
||||
overlapNameDx = string.Join("_", elemList.ElementAt(1).sName.Split('_').Skip(1));
|
||||
overlapNameSx = "Sash_Top";
|
||||
@@ -1398,7 +1402,7 @@ namespace WebWindowComplex
|
||||
}
|
||||
else
|
||||
{
|
||||
if(indexAnta == 0)
|
||||
if (indexAnta == 0)
|
||||
{
|
||||
overlapNameDx = string.Join("_", elemList.ElementAt(1).sName.Split('_').Skip(1));
|
||||
overlapNameSx = "Sash_Top";
|
||||
@@ -1493,7 +1497,7 @@ namespace WebWindowComplex
|
||||
else if (sash.ParentArea.ParentArea is Split s && s.nSplitQtyHoriz > 0)
|
||||
{
|
||||
int indexAreaSplit = s.AreaList.IndexOf(sash.ParentArea);
|
||||
int indexSplit = indexAreaSplit == 0 ? 0 : indexAreaSplit - 1;
|
||||
int indexSplit = indexAreaSplit == 0 ? 0 : indexAreaSplit - 1;
|
||||
if (indexAreaSplit == 0)
|
||||
{
|
||||
overlapNameBottom = "Sash_Bottom";
|
||||
@@ -1661,7 +1665,7 @@ namespace WebWindowComplex
|
||||
// cerco il record
|
||||
var currRec = (Fill?)SearchAreaFromGroupId(FrameWindow, newFill.GroupId);
|
||||
// lo aggiorno
|
||||
if(currRec != null)
|
||||
if (currRec != null)
|
||||
{
|
||||
currRec = newFill;
|
||||
await DoPreviewSvg();
|
||||
@@ -1794,7 +1798,7 @@ namespace WebWindowComplex
|
||||
{
|
||||
if (node.AreaList == null)
|
||||
return;
|
||||
if(node is Sash || node is Split)
|
||||
if (node is Sash || node is Split)
|
||||
groupId.Add(node.GroupId);
|
||||
foreach (var child in node.AreaList)
|
||||
ReqListGroupId(child, groupId);
|
||||
|
||||
@@ -300,6 +300,8 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user