Aggiornati controlli per chiamate
This commit is contained in:
@@ -377,6 +377,7 @@ namespace WebWindowComplex.Compo
|
||||
public Frame currFrame { get; set; } = null!;
|
||||
public bool svgNoHw { get; set; } = false;
|
||||
public int groupIdDelete { get; set; } = -1;
|
||||
public bool reqShape { get; set; } = false;
|
||||
|
||||
#endregion Public Properties
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ namespace WebWindowComplex.Compo
|
||||
#region Protected Properties
|
||||
|
||||
/// <summary>
|
||||
/// Selezione quantità di ante
|
||||
/// Selezione quantità di ante
|
||||
/// </summary>
|
||||
protected int SashQty
|
||||
{
|
||||
@@ -107,7 +107,7 @@ namespace WebWindowComplex.Compo
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Selezione quantità bottom rail
|
||||
/// Selezione quantit� bottom rail
|
||||
/// </summary>
|
||||
protected int SashBottomRailQty
|
||||
{
|
||||
|
||||
@@ -172,7 +172,8 @@ namespace WebWindowComplex.Compo
|
||||
var args = new DataUpdateFrame()
|
||||
{
|
||||
currFrame = FrameWindow,
|
||||
svgNoHw = true
|
||||
svgNoHw = true,
|
||||
reqShape = true
|
||||
};
|
||||
await EC_ReqElement.InvokeAsync(FrameWindow);
|
||||
await EC_UpdateFrame.InvokeAsync(args);
|
||||
|
||||
@@ -28,9 +28,14 @@ namespace WebWindowComplex
|
||||
ReqHwOpt,
|
||||
|
||||
/// <summary>
|
||||
/// Richiesta svg
|
||||
/// Richiesta svg senza hw
|
||||
/// </summary>
|
||||
ReqSvg,
|
||||
ReqSvgNoHw,
|
||||
|
||||
/// <summary>
|
||||
/// Richiesta svg con hw
|
||||
/// </summary>
|
||||
ReqSvgWithHw,
|
||||
|
||||
/// <summary>
|
||||
/// Richiesta shape sash group
|
||||
@@ -121,11 +126,12 @@ namespace WebWindowComplex
|
||||
|
||||
protected override async Task OnAfterRenderAsync(bool firstRender)
|
||||
{
|
||||
if (forceSvgUpdate)
|
||||
if (forceSvgUpdate && prevReq != (int)DataReq.ReqSvgNoHw && prevReq != (int)DataReq.ReqElement)
|
||||
{
|
||||
firstDisplay = false;
|
||||
forceSvgUpdate = false;
|
||||
// preview SVG senza HW
|
||||
if(prevReq != (int)DataReq.ReqSvgWithHw)
|
||||
await DoPreviewSvg(true, true);
|
||||
if (LiveData.ProfElementList.Count == 0)
|
||||
await UpdateElement(FrameWindow);
|
||||
@@ -163,10 +169,12 @@ namespace WebWindowComplex
|
||||
// controllo elenchi BasePayload siano validi...
|
||||
if (ListPayload.IsValid())
|
||||
{
|
||||
bool calculateSvg = false;
|
||||
// SOLO SE modificato live data...
|
||||
if (prevLiveData == null || !prevLiveData.Equals(LiveData))
|
||||
{
|
||||
bool needDeser = prevLiveData == null || !prevLiveData.JwdEqual(LiveData);
|
||||
calculateSvg = prevLiveData == null || !prevLiveData.DictShape.Equals(LiveData.DictShape);
|
||||
updRequested = true;
|
||||
prevLiveData = new LivePayload()
|
||||
{
|
||||
@@ -205,7 +213,7 @@ namespace WebWindowComplex
|
||||
Log.Error($"Errore nel deserializzare jwd: {ex.Message}");
|
||||
// costruisco una finestra base
|
||||
WindowFromJson = BuildWindowDefault();
|
||||
await DoPreviewSvg(true);
|
||||
await DoPreviewSvg(false);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -222,9 +230,10 @@ namespace WebWindowComplex
|
||||
if (updRequested)
|
||||
{
|
||||
// se mancasse dizionario forme chiamo quello
|
||||
if (LiveData.DictShape.Count == 0 && listErrLink.Count == 0)
|
||||
if (LiveData.DictShape.Count == 0 && listErrLink.Count == 0 && !waitShape)
|
||||
{
|
||||
if (firstDisplay && isRendered)
|
||||
waitShape = true;
|
||||
if (firstDisplay && isRendered && prevReq!=(int)DataReq.ReqSvgNoHw)
|
||||
{
|
||||
firstDisplay = false;
|
||||
// preview SVG senza HW
|
||||
@@ -242,16 +251,14 @@ namespace WebWindowComplex
|
||||
await DoReqShape(reqList);
|
||||
}
|
||||
}
|
||||
else if (LiveData.DictShape.Count > 0 && calculateSvg)
|
||||
{
|
||||
await DoPreviewSvg();
|
||||
}
|
||||
else
|
||||
{
|
||||
// chiedo SVG
|
||||
if (prevReq != (int)DataReq.ReqSvg || !prevLiveData.JwdEqual(LiveData.CurrJwd))
|
||||
{
|
||||
if (prevReq != (int)DataReq.ReqHwOpt)
|
||||
await DoPreviewSvg(true);
|
||||
else if (LiveData.DictOptionsXml.Count > 0)
|
||||
await DoPreviewSvg(true);
|
||||
}
|
||||
if(prevReq != (int)DataReq.ReqSvgWithHw && SashGroupList.Count > 0)
|
||||
await DoPreviewSvg();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -274,6 +281,8 @@ namespace WebWindowComplex
|
||||
|
||||
#region Private Fields
|
||||
|
||||
private bool waitShape = false;
|
||||
|
||||
private static Logger Log = LogManager.GetCurrentClassLogger();
|
||||
|
||||
private int currAntaIndex = 0;
|
||||
@@ -881,11 +890,12 @@ namespace WebWindowComplex
|
||||
var CalcJwd = JsonConvert.SerializeObject(m_CurrWindow.Serialize(hideHw));
|
||||
#endif
|
||||
// verifico variazione JWD
|
||||
if (!prevJwd.Equals(CurrJwd) || doForce || prevReq != (int)DataReq.ReqSvg)
|
||||
if (!prevJwd.Equals(CurrJwd) || doForce || (prevReq != (int)DataReq.ReqSvgWithHw && prevReq != (int)DataReq.ReqSvgNoHw))
|
||||
{
|
||||
Log.Info("Richiesta svg");
|
||||
string stringLog = "Richiesta svg " + (hideHw ? "senza" : "con") + " hw";
|
||||
Log.Info(stringLog);
|
||||
prevJwd = CurrJwd;
|
||||
prevReq = (int)DataReq.ReqSvg;
|
||||
prevReq = hideHw ? (int)DataReq.ReqSvgNoHw : (int)DataReq.ReqSvgWithHw;
|
||||
Dictionary<string, string> Args = new Dictionary<string, string>();
|
||||
Args.Add("Mode", $"{(int)Enums.QuestionModes.PREVIEW}");
|
||||
Args.Add("SerializedData", CalcJwd);
|
||||
@@ -1533,6 +1543,7 @@ namespace WebWindowComplex
|
||||
// se ho i dizionari delle forme le aggiungo
|
||||
if (LiveData.DictShape.Count > 0)
|
||||
{
|
||||
waitShape = false;
|
||||
// Inserisco le forme ricevuto nei sash group
|
||||
foreach (var item in LiveData.DictShape)
|
||||
{
|
||||
@@ -1772,6 +1783,10 @@ namespace WebWindowComplex
|
||||
RowCollapsed.Remove(args.groupIdDelete);
|
||||
if (newFrame != null)
|
||||
{
|
||||
// richiedo update shape
|
||||
List<int> reqList = SashGroupList.Select(x => x.GroupId).ToList();
|
||||
if (args.reqShape)
|
||||
await DoReqShape(reqList);
|
||||
// cerco il record
|
||||
var currRec = m_CurrWindow?.AreaList.FirstOrDefault(x => x.GroupId == newFrame.GroupId);
|
||||
// lo aggiorno
|
||||
@@ -1869,7 +1884,7 @@ namespace WebWindowComplex
|
||||
UpdateLists();
|
||||
// richiedo update shape
|
||||
List<int> reqList = SashGroupList.Select(x => x.GroupId).ToList();
|
||||
await DoPreviewSvg();
|
||||
//await DoPreviewSvg();
|
||||
await UpdateElement(FrameWindow);
|
||||
await DoReqShape(reqList);
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Version>3.1.3.2010</Version>
|
||||
<Version>3.1.3.2016</Version>
|
||||
<Authors>Annamaria Sassi</Authors>
|
||||
<Company>Egalware</Company>
|
||||
<Description>Componente gestione Configurazioni avanzate Window per LUX</Description>
|
||||
@@ -59,6 +59,8 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Version>3.1.3.2010</Version>
|
||||
<Version>3.1.3.2016</Version>
|
||||
<Authors>Annamaria Sassi</Authors>
|
||||
<Company>Egalware</Company>
|
||||
<Description>Componente gestione JWD per LUX</Description>
|
||||
@@ -55,6 +55,13 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user