Aggiornati metodi async
This commit is contained in:
@@ -39,18 +39,18 @@ namespace WebWindowComplex.Compo
|
||||
/// Sollevo evento richiesta aggiunta sash su frame
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private async Task RaiseAddSash()
|
||||
private Task RaiseAddSash()
|
||||
{
|
||||
await EC_AddSash.InvokeAsync(true);
|
||||
return EC_AddSash.InvokeAsync(true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sollevo evento richiesta aggiunta split su frame
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private async Task RaiseAddSplit()
|
||||
private Task RaiseAddSplit()
|
||||
{
|
||||
await EC_AddSplit.InvokeAsync(true);
|
||||
return EC_AddSplit.InvokeAsync(true);
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
|
||||
@@ -58,13 +58,13 @@ namespace WebWindowComplex.Compo
|
||||
/// </summary>
|
||||
/// <param name="updRec"></param>
|
||||
/// <returns></returns>
|
||||
private async Task RaiseOptCombo(AGBOptionCombo updRec)
|
||||
private Task RaiseOptCombo(AGBOptionCombo updRec)
|
||||
{
|
||||
var args = new DataUpdateHwOption
|
||||
{
|
||||
AGBOptCombo = updRec
|
||||
};
|
||||
await EC_UpdateHwOpt.InvokeAsync(args);
|
||||
return EC_UpdateHwOpt.InvokeAsync(args);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -72,13 +72,13 @@ namespace WebWindowComplex.Compo
|
||||
/// </summary>
|
||||
/// <param name="updRec"></param>
|
||||
/// <returns></returns>
|
||||
private async Task RaiseOptText(AGBOptionText updRec)
|
||||
private Task RaiseOptText(AGBOptionText updRec)
|
||||
{
|
||||
var args = new DataUpdateHwOption
|
||||
{
|
||||
AGBOptText = updRec
|
||||
};
|
||||
await EC_UpdateHwOpt.InvokeAsync(args);
|
||||
return EC_UpdateHwOpt.InvokeAsync(args);
|
||||
}
|
||||
|
||||
private bool IsLoadingHwOpt
|
||||
|
||||
@@ -193,11 +193,11 @@ namespace WebWindowComplex.Compo
|
||||
/// Sollevo evento richiesta per cambiare tutti i Joint
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private async Task ChangeAllJoints(Json.WindowConst.Joints JointType)
|
||||
private Task ChangeAllJoints(Json.WindowConst.Joints JointType)
|
||||
{
|
||||
foreach (var item in CurrSashDim.JointList)
|
||||
item.SetSelJointType(JointType);
|
||||
await EC_UpdateSashDim.InvokeAsync(CurrSashDim);
|
||||
return EC_UpdateSashDim.InvokeAsync(CurrSashDim);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -238,7 +238,7 @@ namespace WebWindowComplex.Compo
|
||||
/// Metodo per cambiare l'anta su cui è presente la maniglia
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private async Task ChangeHandle()
|
||||
private Task ChangeHandle()
|
||||
{
|
||||
// Cerco la Sash che si sta considerando nella lista Sash
|
||||
var s = SashList.Where(x => x.GroupId == CurrSashGroup.GroupId).FirstOrDefault();
|
||||
@@ -284,14 +284,14 @@ namespace WebWindowComplex.Compo
|
||||
sash = CurrSashGroup,
|
||||
reqProfile = true
|
||||
};
|
||||
await EC_UpdateSash.InvokeAsync(args);
|
||||
return EC_UpdateSash.InvokeAsync(args);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Copio contenuto anta da indexCopy a IndexModify
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private async Task CopyContentSash(int IndexCopy, int IndexModify)
|
||||
private Task CopyContentSash(int IndexCopy, int IndexModify)
|
||||
{
|
||||
isOpen = !isOpen;
|
||||
// Anta selezionata
|
||||
@@ -307,14 +307,14 @@ namespace WebWindowComplex.Compo
|
||||
sash = CurrSashGroup,
|
||||
reqProfile = true
|
||||
};
|
||||
await EC_UpdateSash.InvokeAsync(args);
|
||||
return EC_UpdateSash.InvokeAsync(args);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Metodo per aggiungere lo split nella singola anta
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private async Task AddSplitToSash()
|
||||
private Task AddSplitToSash()
|
||||
{
|
||||
CurrAnta.AddSplit();
|
||||
DataUpdateProfile args = new DataUpdateProfile()
|
||||
@@ -322,7 +322,7 @@ namespace WebWindowComplex.Compo
|
||||
sash = CurrSashGroup,
|
||||
reqProfile = true
|
||||
};
|
||||
await EC_UpdateSash.InvokeAsync(args);
|
||||
return EC_UpdateSash.InvokeAsync(args);
|
||||
}
|
||||
|
||||
private bool isOpen = false;
|
||||
|
||||
@@ -40,26 +40,23 @@ namespace WebWindowComplex.Compo
|
||||
/// Metodo per copiare sash
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private async Task RaiseCopySash(int indexCurrSash)
|
||||
private Task RaiseCopySash(int indexCurrSash)
|
||||
{
|
||||
//Rimuovo contenuto di Splitted e rimuovo area da conteggio gruppi
|
||||
CurrSplitted.AreaList.RemoveAll(i => i != null);
|
||||
// Copio sash
|
||||
Area a = SashList[indexCurrSash].Copy(CurrSplitted);
|
||||
a.SetParentArea(CurrSplitted);
|
||||
// Aggiungo copia a Splitted
|
||||
CurrSplitted.AreaList.Add(a);
|
||||
await EC_UpdateSplitted.InvokeAsync(CurrSplitted);
|
||||
return EC_UpdateSplitted.InvokeAsync(CurrSplitted);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Metodo per aggiungere prima sash
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private async Task RaiseAddSash()
|
||||
private Task RaiseAddSash()
|
||||
{
|
||||
CurrSplitted.AddFirstSash();
|
||||
await EC_UpdateSplitted.InvokeAsync(CurrSplitted);
|
||||
return EC_UpdateSplitted.InvokeAsync(CurrSplitted);
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
|
||||
@@ -28,13 +28,10 @@ namespace WebWindowComplex.Compo
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
private async Task UpdatePreview()
|
||||
private Task UpdatePreview()
|
||||
{
|
||||
var args = new DataUpdateFrame
|
||||
{
|
||||
currFrame = CurrFrame
|
||||
};
|
||||
await EC_UpdatePreview.InvokeAsync(args);
|
||||
var args = new DataUpdateFrame { currFrame = CurrFrame };
|
||||
return EC_UpdatePreview.InvokeAsync(args);
|
||||
}
|
||||
|
||||
private async Task UpdatePreviewSash(Sash CurrSashGRoup)
|
||||
|
||||
@@ -47,10 +47,10 @@ namespace WebWindowComplex.Compo
|
||||
/// </summary>
|
||||
/// <param name="reqFillType"> tipo di fill richiesto </param>
|
||||
/// <returns></returns>
|
||||
protected async Task ChangeOneFill(FillTypes reqFillType)
|
||||
protected Task ChangeOneFill(FillTypes reqFillType)
|
||||
{
|
||||
CurrFill.SetFillType(reqFillType);
|
||||
await EC_UpdateFill.InvokeAsync(CurrFill);
|
||||
return EC_UpdateFill.InvokeAsync(CurrFill);
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
@@ -191,7 +191,7 @@ namespace WebWindowComplex.Compo
|
||||
/// Metodo per cambiare tutti i joint
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private async Task ChangeAllJoints(Json.WindowConst.Joints JointType, Area a)
|
||||
private Task ChangeAllJoints(Json.WindowConst.Joints JointType, Area a)
|
||||
{
|
||||
if (a is Frame)
|
||||
{
|
||||
@@ -200,12 +200,8 @@ namespace WebWindowComplex.Compo
|
||||
joint.SetSelJointType(JointType);
|
||||
}
|
||||
}
|
||||
var args = new DataUpdateFrame()
|
||||
{
|
||||
currFrame = CurrFrameWindow,
|
||||
svgNoHw = false
|
||||
};
|
||||
await EC_UpdateFrame.InvokeAsync(args);
|
||||
var args = new DataUpdateFrame() { currFrame = CurrFrameWindow, svgNoHw = false };
|
||||
return EC_UpdateFrame.InvokeAsync(args);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -255,19 +255,15 @@ namespace WebWindowComplex.Compo
|
||||
/// </summary>
|
||||
/// <param name="type"></param>
|
||||
/// <returns></returns>
|
||||
protected async Task SetMeasureType(MeasureTypes type)
|
||||
protected Task SetMeasureType(MeasureTypes type)
|
||||
{
|
||||
isOpen = !isOpen;
|
||||
for(int i = 0; i < CurrSashGroup.SashList.Count; i++)
|
||||
for (int i = 0; i < CurrSashGroup.SashList.Count; i++)
|
||||
{
|
||||
CurrSashGroup.SashList.ElementAt(i).SetSelMeasureType(type, i);
|
||||
}
|
||||
var args = new DataUpdateSash
|
||||
{
|
||||
currSash = CurrSashGroup,
|
||||
noSvg = true
|
||||
};
|
||||
await EC_UpdateSashGroup.InvokeAsync(args);
|
||||
var args = new DataUpdateSash { currSash = CurrSashGroup, noSvg = true };
|
||||
return EC_UpdateSashGroup.InvokeAsync(args);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -331,9 +327,9 @@ namespace WebWindowComplex.Compo
|
||||
}
|
||||
}
|
||||
|
||||
protected async Task ResetDict(DataUpdateRes args)
|
||||
protected Task ResetDict(DataUpdateRes args)
|
||||
{
|
||||
await EC_ReqResetDict.InvokeAsync(args);
|
||||
return EC_ReqResetDict.InvokeAsync(args);
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
@@ -407,14 +403,10 @@ namespace WebWindowComplex.Compo
|
||||
/// </summary>
|
||||
/// <param name="updRec"></param>
|
||||
/// <returns></returns>
|
||||
private async Task FirstHwOptionList()
|
||||
private Task FirstHwOptionList()
|
||||
{
|
||||
var args = new DataUpdateSash
|
||||
{
|
||||
currSash = CurrSashGroup
|
||||
};
|
||||
//await EC_UpdatePreview.InvokeAsync(args);
|
||||
await EC_ReqFirstOptionHw.InvokeAsync(CurrSashGroup);
|
||||
var args = new DataUpdateSash { currSash = CurrSashGroup };
|
||||
return EC_ReqFirstOptionHw.InvokeAsync(CurrSashGroup);
|
||||
}
|
||||
|
||||
private string ButtonMeasureCss(MeasureTypes type)
|
||||
|
||||
@@ -313,7 +313,7 @@ namespace WebWindowComplex.Compo
|
||||
/// </summary>
|
||||
/// <param name="type"> nuovo tipo </param>
|
||||
/// <returns></returns>
|
||||
protected async Task SetMeasureType(MeasureTypes type)
|
||||
protected Task SetMeasureType(MeasureTypes type)
|
||||
{
|
||||
isOpen = !isOpen;
|
||||
foreach (var item in CurrSplit.SplitVertList)
|
||||
@@ -329,7 +329,7 @@ namespace WebWindowComplex.Compo
|
||||
currSplit = CurrSplit,
|
||||
noSvg = true
|
||||
};
|
||||
await EC_UpdateSplit.InvokeAsync(args);
|
||||
return EC_UpdateSplit.InvokeAsync(args);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -32,14 +32,14 @@ namespace WebWindowComplex.Compo
|
||||
/// Metodo per richiesta prossimo step
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private async Task RaiseNextStep(CompileStep cs, int indexStep)
|
||||
private Task RaiseNextStep(CompileStep cs, int indexStep)
|
||||
{
|
||||
var Args = new DataNextStep
|
||||
{
|
||||
currCompileStep = cs,
|
||||
index = indexStep,
|
||||
};
|
||||
await EC_NextStep.InvokeAsync(Args);
|
||||
return EC_NextStep.InvokeAsync(Args);
|
||||
}
|
||||
|
||||
//private async Task Remove(CompileStep cs, int indexStep)
|
||||
|
||||
@@ -389,10 +389,10 @@ namespace WebWindowComplex
|
||||
/// Richiesta chiusura SENZA salvataggio (= restore prev)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
protected async Task DoClose()
|
||||
protected Task DoClose()
|
||||
{
|
||||
editLock = false;
|
||||
await EC_OnClose.InvokeAsync(false);
|
||||
return EC_OnClose.InvokeAsync(false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -519,8 +519,9 @@ namespace WebWindowComplex
|
||||
/// <summary>
|
||||
/// Metodo di reset
|
||||
/// </summary>
|
||||
protected async Task DoReset()
|
||||
protected Task DoReset()
|
||||
{
|
||||
return Task.CompletedTask;
|
||||
// Da fare
|
||||
}
|
||||
|
||||
@@ -528,11 +529,11 @@ namespace WebWindowComplex
|
||||
/// Richiesta chiusura con salvataggio
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
protected async Task DoSave()
|
||||
protected Task DoSave()
|
||||
{
|
||||
editLock = false;
|
||||
//manca salvataggio JWD
|
||||
await EC_OnClose.InvokeAsync(true);
|
||||
return EC_OnClose.InvokeAsync(true);
|
||||
}
|
||||
|
||||
protected override void OnAfterRender(bool firstRender)
|
||||
@@ -661,7 +662,7 @@ namespace WebWindowComplex
|
||||
}
|
||||
}
|
||||
|
||||
private async Task BuildFrameDefault()
|
||||
private Task BuildFrameDefault()
|
||||
{
|
||||
// Costruisco window e setto i parametri
|
||||
Window window = new Window();
|
||||
@@ -702,7 +703,7 @@ namespace WebWindowComplex
|
||||
string jwd = JsonConvert.SerializeObject(jsonWindow);
|
||||
JsonWindow WindowFromJson = JsonConvert.DeserializeObject<JsonWindow>(jwd, new PolymorphicJsonConverter()) ?? new JsonWindow("", "", "", "");
|
||||
setCurrWindow(WindowFromJson);
|
||||
await DoPreviewSvg(true);
|
||||
return DoPreviewSvg(true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -1087,9 +1088,9 @@ namespace WebWindowComplex
|
||||
/// Richiesta reset dizionario Shape con action
|
||||
/// </summary>
|
||||
/// <param name="args"></param>
|
||||
private async Task ReqResetDict(DataUpdateRes args)
|
||||
private Task ReqResetDict(DataUpdateRes args)
|
||||
{
|
||||
await EC_ActionReq.InvokeAsync(args.req);
|
||||
return EC_ActionReq.InvokeAsync(args.req);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -1284,10 +1285,10 @@ namespace WebWindowComplex
|
||||
/// </summary>
|
||||
/// <param name="reqFillType"> tipo di fill richiesto </param>
|
||||
/// <returns></returns>
|
||||
protected async Task ChangeAllFill(FillTypes reqFillType)
|
||||
protected Task ChangeAllFill(FillTypes reqFillType)
|
||||
{
|
||||
updateAllFill(FrameWindow, reqFillType);
|
||||
await DoPreviewSvg();
|
||||
return DoPreviewSvg();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Version>3.1.2.417</Version>
|
||||
<Version>3.1.2.418</Version>
|
||||
<Authors>Annamaria Sassi</Authors>
|
||||
<Company>Egalware</Company>
|
||||
<Description>Componente gestione Configurazioni avanzate Window per LUX</Description>
|
||||
@@ -74,6 +74,10 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user