Update catena aggiornamenti sath
This commit is contained in:
@@ -106,7 +106,7 @@ namespace WebWindowComplex.Models
|
||||
// Creo area sash di default
|
||||
Sash SashArea = Sash.CreateSash(ParentArea);
|
||||
// ricerco tra tutti gli hw disponibili...
|
||||
|
||||
|
||||
string sShape = FindSashShape();
|
||||
var listHwValid = Sash
|
||||
.m_HardwareCompleteList
|
||||
@@ -116,41 +116,45 @@ namespace WebWindowComplex.Models
|
||||
{
|
||||
// seleziono la famiglia del primo hw trovato...
|
||||
SashArea.SetSelFamilyHardware(listHwValid.FamilyName);
|
||||
SashArea.ReqRefreshShape();
|
||||
#if false
|
||||
SashArea.ReqRefreshShape();
|
||||
#endif
|
||||
SashArea.RefreshHardwareList();
|
||||
if (SashArea.HardwareList.Count == 0)
|
||||
{
|
||||
answ = true;
|
||||
//answ = true;
|
||||
SashArea.SetSelHardwareFromId("000000");
|
||||
}
|
||||
else
|
||||
{
|
||||
SashArea.SetSelHardwareFromId(SashArea.HardwareList.First().Id);
|
||||
// Salvo gli oggetti già presenti e li cancello da AreaList
|
||||
List<Area> ContentArea = new List<Area>();
|
||||
ContentArea.Add(AreaList[0]);
|
||||
AreaList.Remove(AreaList[0]);
|
||||
// Aggiungo area
|
||||
AreaList.Add(SashArea);
|
||||
if (SashArea.nSashQty == 1)
|
||||
{
|
||||
// Inserisco il riempimento precedente
|
||||
AreaList[0].AreaList.Add(ContentArea[0]);
|
||||
AreaList[0].AreaList[0].SetParentArea(AreaList[0]);
|
||||
}
|
||||
else
|
||||
{
|
||||
// All'area Sash aggiunto uno Splitted per ogni anta
|
||||
for (int i = 1; i < SashArea.nSashQty; i++)
|
||||
{
|
||||
AreaList[0].AreaList.Add(Splitted.CreateSplitted(SashArea));
|
||||
}
|
||||
Fill fill2 = (Fill)ContentArea[0];
|
||||
for (int i = 1; i < SashArea.nSashQty; i++)
|
||||
{
|
||||
AreaList[0].AreaList[1].AreaList.Add(Fill.CreateFill(AreaList[0].AreaList[1], fill2.FillType));
|
||||
}
|
||||
}
|
||||
ParentWindow.OnUpdatePreview(ParentWindow.sSerialized());
|
||||
}
|
||||
// Salvo gli oggetti già presenti e li cancello da AreaList
|
||||
List<Area> ContentArea = new List<Area>();
|
||||
ContentArea.Add(AreaList[0]);
|
||||
AreaList.Remove(AreaList[0]);
|
||||
// Aggiungo area
|
||||
AreaList.Add(SashArea);
|
||||
if (SashArea.nSashQty == 1)
|
||||
{
|
||||
// Inserisco il riempimento precedente
|
||||
AreaList[0].AreaList.Add(ContentArea[0]);
|
||||
AreaList[0].AreaList[0].SetParentArea(AreaList[0]);
|
||||
}
|
||||
else
|
||||
{
|
||||
// All'area Sash aggiunto uno Splitted per ogni anta
|
||||
for (int i = 1; i < SashArea.nSashQty; i++)
|
||||
{
|
||||
AreaList[0].AreaList.Add(Splitted.CreateSplitted(SashArea));
|
||||
}
|
||||
Fill fill2 = (Fill)ContentArea[0];
|
||||
for (int i = 1; i < SashArea.nSashQty; i++)
|
||||
{
|
||||
AreaList[0].AreaList[1].AreaList.Add(Fill.CreateFill(AreaList[0].AreaList[1], fill2.FillType));
|
||||
}
|
||||
}
|
||||
ParentWindow.OnUpdatePreview(ParentWindow.sSerialized());
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
@@ -540,7 +540,11 @@ namespace WebWindowComplex.Models
|
||||
public void SetSelFamilyHardware(string sFamilyHw)
|
||||
{
|
||||
m_SelFamilyHardware = sFamilyHw;
|
||||
ReqRefreshShape();
|
||||
// se ho la shape aggiorno elenco HW
|
||||
if (!string.IsNullOrEmpty(m_CurrShape))
|
||||
{
|
||||
RefreshHardwareList();
|
||||
}
|
||||
RefreshHardwareOptionList();
|
||||
SetFirstHardware();
|
||||
}
|
||||
@@ -773,7 +777,6 @@ namespace WebWindowComplex.Models
|
||||
.Select(x => x.FamilyName)
|
||||
.FirstOrDefault();
|
||||
SetSelFamilyHardware(item ?? "");
|
||||
//SelFamilyHardware = item ?? "";
|
||||
}
|
||||
return SelFamilyHardware;
|
||||
}
|
||||
|
||||
@@ -27,6 +27,12 @@ namespace WebWindowComplex
|
||||
[Parameter]
|
||||
public SelectPayload? CurrSelection { get; set; } = null;
|
||||
|
||||
/// <summary>
|
||||
/// Richiesta update da JWD (SVG, calcoli vari...)
|
||||
/// </summary>
|
||||
[Parameter]
|
||||
public EventCallback<Dictionary<string, string>> EC_DoUpdate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Richiesta chiusura JWD (+ refresh)
|
||||
/// se torna true --> richiesta salvataggio
|
||||
@@ -41,12 +47,6 @@ namespace WebWindowComplex
|
||||
[Parameter]
|
||||
public EventCallback<TemplateSelectDTO> EC_OnSelectedTemplate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Richiesta update da JWD (SVG, calcoli vari...)
|
||||
/// </summary>
|
||||
[Parameter]
|
||||
public EventCallback<Dictionary<string, string>> EC_DoUpdate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Sollevo evento errore validazione con una lista di errori rilevati
|
||||
/// </summary>
|
||||
@@ -78,6 +78,31 @@ namespace WebWindowComplex
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Cerca e aggiorna la sash
|
||||
/// </summary>
|
||||
/// <param name="currentArea"> area corrente che si sta valutando </param>
|
||||
/// <param name="idSearch"> id della sash che si sta cercando </param>
|
||||
/// <param name="newSash"> nuova sash </param>
|
||||
/// <returns></returns>
|
||||
public Area SearchSash(Area currentArea, int idSearch, Sash newSash)
|
||||
{
|
||||
if (currentArea.GroupId == idSearch && currentArea.AreaType.Equals(AreaTypes.SASH))
|
||||
{
|
||||
currentArea = newSash;
|
||||
return currentArea;
|
||||
}
|
||||
foreach (Area child in currentArea.AreaList)
|
||||
{
|
||||
Area found = SearchSash(child, idSearch, newSash);
|
||||
if (found != null)
|
||||
{
|
||||
return found;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
|
||||
#region Protected Fields
|
||||
@@ -107,8 +132,6 @@ namespace WebWindowComplex
|
||||
get => m_ItemTableList;
|
||||
}
|
||||
|
||||
protected string m_SelSVG { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Componente SVG da mostrare
|
||||
/// </summary>
|
||||
@@ -130,10 +153,8 @@ namespace WebWindowComplex
|
||||
protected string SelColorMaterial { get; set; } = "";
|
||||
protected string SelFamilyHardware { get; set; } = "";
|
||||
protected string SelGlass { get; set; } = "";
|
||||
protected string SelProfile { get; set; } = "";
|
||||
|
||||
protected string SelMaterial { get; set; } = ""!;
|
||||
|
||||
protected string SelProfile { get; set; } = "";
|
||||
protected TemplateSelectDTO? SelTemplateDTO { get; set; } = null;
|
||||
|
||||
protected List<Split> SplitList
|
||||
@@ -584,7 +605,7 @@ namespace WebWindowComplex
|
||||
DictShape = LiveData.DictShape,
|
||||
SvgPreview = LiveData.SvgPreview
|
||||
};
|
||||
m_SelSVG = LiveData.SvgPreview;
|
||||
|
||||
// Aggiornati parametri di ingresso selezionati
|
||||
UpdateSelParameter();
|
||||
JsonWindow WindowFromJson = new JsonWindow("", "", "", "");
|
||||
@@ -667,7 +688,7 @@ namespace WebWindowComplex
|
||||
}
|
||||
}
|
||||
updateSvg = true;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if (SashList.Count > 0)
|
||||
{
|
||||
@@ -727,7 +748,7 @@ namespace WebWindowComplex
|
||||
if (LiveData.DictShape.Count > 0)
|
||||
{
|
||||
// Inserisco le forme ricevuto nei sash group
|
||||
foreach(var item in LiveData.DictShape)
|
||||
foreach (var item in LiveData.DictShape)
|
||||
{
|
||||
Sash sashNewShape = SashList.Where(x => x.GroupId == item.Key).ToList().First();
|
||||
sashNewShape.SashShape = item.Value;
|
||||
@@ -845,9 +866,26 @@ namespace WebWindowComplex
|
||||
|
||||
#region Private Methods
|
||||
|
||||
/// <summary>
|
||||
/// Metodo per aggiungere una Sash
|
||||
/// </summary>
|
||||
/// <param name="Args"></param>
|
||||
/// <returns></returns>
|
||||
private async Task AddSashIntoSplit(DataAreaSplitted Args)
|
||||
{
|
||||
Splitted currSplitted = Args.splitted;
|
||||
bError = currSplitted.AddFirstSash();
|
||||
await DoPreviewSvg();
|
||||
}
|
||||
|
||||
private void AddSashToFrame(Frame f)
|
||||
{
|
||||
bError = f.AddFirstSash();
|
||||
// ricalcolo liste
|
||||
UpdateLists();
|
||||
// richiedo update shape
|
||||
List<int> reqList = SashList.Select(x => x.GroupId).ToList();
|
||||
_ = DoReqShape(reqList);
|
||||
}
|
||||
|
||||
private void AddSplitToFrame(Frame f)
|
||||
@@ -1027,18 +1065,6 @@ namespace WebWindowComplex
|
||||
await DoPreviewSvg();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Metodo per aggiungere una Sash
|
||||
/// </summary>
|
||||
/// <param name="Args"></param>
|
||||
/// <returns></returns>
|
||||
private async Task AddSashIntoSplit(DataAreaSplitted Args)
|
||||
{
|
||||
Splitted currSplitted = Args.splitted;
|
||||
bError = currSplitted.AddFirstSash();
|
||||
await DoPreviewSvg();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Metodo per copiare una Sash intera
|
||||
/// </summary>
|
||||
@@ -1255,6 +1281,28 @@ namespace WebWindowComplex
|
||||
FrameWindow = newFrame;
|
||||
await DoPreviewSvg();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Aggiornamento opzioni dato update sash
|
||||
/// </summary>
|
||||
/// <param name="newSash"> nuova sash </param>
|
||||
/// <returns></returns>
|
||||
private async Task UpdateHwOptions(Sash newSash)
|
||||
{
|
||||
await DoReqOptHardware();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Aggiornamento Sash e Frame
|
||||
/// </summary>
|
||||
/// <param name="newSash"> nuova sash </param>
|
||||
/// <returns></returns>
|
||||
private async Task UpdateSash(Sash newSash)
|
||||
{
|
||||
SearchSash(FrameWindow, newSash.GroupId, newSash);
|
||||
await DoPreviewSvg();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Aggiornamento Shape x ogni Group di Sash della finestra
|
||||
/// </summary>
|
||||
@@ -1270,7 +1318,7 @@ namespace WebWindowComplex
|
||||
foreach (var item in SashList)
|
||||
{
|
||||
await DoReqShape(item.GroupId);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -1284,56 +1332,10 @@ namespace WebWindowComplex
|
||||
List<int> reqList = new List<int>() { groupId };
|
||||
await DoReqShape(reqList);
|
||||
#if false
|
||||
await DoReqShape(groupId);
|
||||
await DoReqShape(groupId);
|
||||
#endif
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Aggiornamento Sash e Frame
|
||||
/// </summary>
|
||||
/// <param name="newSash"> nuova sash </param>
|
||||
/// <returns></returns>
|
||||
private async Task UpdateSash(Sash newSash)
|
||||
{
|
||||
SearchSash(FrameWindow, newSash.GroupId, newSash);
|
||||
await DoPreviewSvg();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Aggiornamento opzioni dato update sash
|
||||
/// </summary>
|
||||
/// <param name="newSash"> nuova sash </param>
|
||||
/// <returns></returns>
|
||||
private async Task UpdateHwOptions(Sash newSash)
|
||||
{
|
||||
await DoReqOptHardware();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Cerca e aggiorna la sash
|
||||
/// </summary>
|
||||
/// <param name="currentArea"> area corrente che si sta valutando </param>
|
||||
/// <param name="idSearch"> id della sash che si sta cercando </param>
|
||||
/// <param name="newSash"> nuova sash </param>
|
||||
/// <returns></returns>
|
||||
public Area SearchSash(Area currentArea, int idSearch, Sash newSash)
|
||||
{
|
||||
if (currentArea.GroupId == idSearch && currentArea.AreaType.Equals(AreaTypes.SASH))
|
||||
{
|
||||
currentArea = newSash;
|
||||
return currentArea;
|
||||
}
|
||||
foreach (Area child in currentArea.AreaList)
|
||||
{
|
||||
Area found = SearchSash(child, idSearch, newSash);
|
||||
if (found != null)
|
||||
{
|
||||
return found;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
}
|
||||
}
|
||||
@@ -6,7 +6,7 @@
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Version>2.7.10.2314</Version>
|
||||
<Version>2.7.10.2317</Version>
|
||||
<Authors>Annamaria Sassi</Authors>
|
||||
<Company>Egalware</Company>
|
||||
<Description>Componente gestione Configurazioni avanzate Window per LUX</Description>
|
||||
@@ -93,6 +93,31 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Version>2.7.10.2314</Version>
|
||||
<Version>2.7.10.2317</Version>
|
||||
<Authors>Annamaria Sassi</Authors>
|
||||
<Company>Egalware</Company>
|
||||
<Description>Componente gestione JWD per LUX</Description>
|
||||
@@ -168,6 +168,31 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user