2 Commits

Author SHA1 Message Date
Samuele Locatelli 3d530fc46e Fix versioni pacchetti: compila 2025-10-09 17:57:47 +02:00
Annamaria Sassi b13dc6540d - Aggiunta gestione Template
- Aggiornato tipo apertura per hardware
2025-10-09 17:46:13 +02:00
16 changed files with 2724 additions and 2183 deletions
-13
View File
@@ -25,16 +25,3 @@ else if (!string.IsNullOrEmpty(outSave))
<p>
@currJwd
</p>
@*
IN_ColorMaterialList="@AvailColorMaterialList"
IN_FamilyHardwareList="@AvailFamilyHardwareList"
IN_GlassList="@AvailGlassList"
IN_HardwareList="@AvailHardwareList"
IN_MaterialList="@AvailMaterialList"
LiveSVG="@currSvg"
CurrJwd="@InitialJwd"
IN_SelFamilyHardware="@SelFamilyHardware"
IN_SelColorMaterial="@SelColorMaterial"
IN_SelMaterial="@SelMaterial"
IN_SelGlass="@SelGlass" *@
+3 -7
View File
@@ -44,8 +44,8 @@ namespace Test.UI.Components.Pages
protected List<Hardware> AvailHardwareList { get; set; } = new List<Hardware>();
protected List<string> AvailFamilyHardwareList { get; set; } = new List<string>()
{
new string("Arc"),
new string("Profilo78")
new string("Profilo78"),
new string("Arc")
};
protected List<string> AvailColorMaterialList { get; set; } = new List<string>()
{
@@ -93,10 +93,6 @@ namespace Test.UI.Components.Pages
protected override async Task OnInitializedAsync()
{
ConfInit();
//SelFamilyHardware = "Natura";
//SelColorMaterial = "Black";
//SelColorMaterial = "Pine";
//SelGlass = "4T/16/4T";
InitialJwd = File.ReadAllText("Data\\AntaDoppia.jwd");
currJwd = InitialJwd;
// rileggo altri dati
@@ -113,7 +109,7 @@ namespace Test.UI.Components.Pages
};
CurrData = new LivePayload()
{
CurrJwd = InitialJwd,
InitJwd = InitialJwd,
SvgPreview = currSvg
};
DLService.CalcDonePipe.EA_NewMessage += CalcDonePipe_EA_NewMessage;
+24 -13
View File
@@ -3,21 +3,32 @@
<PageTitle>Gerarchia</PageTitle>
<WebWindowComplex.TableComp IN_TemplateDTOList="@AvailTemplateList"
IN_SelTemplate="@SelTemplate"
IN_FamilyHardwareList="@AvailFamilyHardwareList"
IN_SelFamilyHardware="@SelFamilyHardware"
IN_HardwareList="@AvailHardwareList"
IN_ColorMaterialList="@AvailColorMaterialList"
IN_SelColorMaterial="@SelColorMaterial"
IN_MaterialList="@AvailMaterialList"
IN_SelMaterial="@SelMaterial"
IN_GlassList="@AvailGlassList"
IN_SelGlass="@SelGlass"
<WebWindowComplex.TableComp ListPayload="SetupList"
LiveDaListPayloadta="CurrData"
CurrSelection="SelectData"
EC_OnUpdate="SaveJWD"
EC_OnSelectedTemplate="SetTemplate"
LiveSVG="@currSvg">
EC_OnClose="CloseObj"
EC_OnSelectedTemplate="SetTemplate">
</WebWindowComplex.TableComp>
@if (!string.IsNullOrEmpty(outClose))
{
<div class="alert alert-danger fs-4">
@outClose
</div>
}
else if (!string.IsNullOrEmpty(outSave))
{
<div class="alert alert-success fs-4">
@outSave
</div>
}
<p>
@(temp);
</p>
@*
<p>
@m_CurrArgs.GetValueOrDefault("Jwd")
+85 -20
View File
@@ -1,12 +1,13 @@
using EgwCoreLib.Lux.Core;
using Egw.Window.Data;
using EgwCoreLib.Lux.Core;
using EgwCoreLib.Lux.Core.RestPayload;
using EgwCoreLib.Lux.Data.Services;
using Microsoft.AspNetCore.Components;
using Newtonsoft.Json;
using NLog;
using System.Diagnostics;
using System.Numerics;
using System.Security.AccessControl;
using Egw.Window.Data;
using WebWindowComplex;
using WebWindowComplex.DTO;
@@ -16,6 +17,8 @@ namespace Test.UI.Components.Pages
{
#region Public Properties
string temp = "";
public string InitialJwd = "";
public Template SelTemplate { get; set; } = new Template(0, "---SELECT---", "", "");
@@ -33,6 +36,7 @@ namespace Test.UI.Components.Pages
#region Protected Fields
protected string currJwd = "...";
protected string prevJwd = "";
protected Dictionary<string, string> m_CurrArgs = new Dictionary<string, string>();
#endregion Protected Fields
@@ -43,8 +47,8 @@ namespace Test.UI.Components.Pages
protected List<Hardware> AvailHardwareList { get; set; } = new List<Hardware>();
protected List<string> AvailFamilyHardwareList { get; set; } = new List<string>()
{
new string("Natura"),
new string("Optima")
new string("Profilo78"),
new string("Arc")
};
protected List<string> AvailColorMaterialList { get; set; } = new List<string>()
{
@@ -54,17 +58,17 @@ namespace Test.UI.Components.Pages
};
protected List<string> AvailMaterialList { get; set; } = new List<string>()
{
new string("Pine"),
new string("Fir")
new string("Pino"),
new string("Abete")
};
protected List<string> AvailGlassList { get; set; } = new List<string>()
{
new string("4/12/4"),
new string("4/16/4"),
new string("4/12/4/12/4"),
new string("4/16/4/16/4"),
new string("4T/12/4T"),
new string("4T/16/4T")
new string("Vetro BE 2S 4/12/4"),
new string("Vetro BE 2S 4/16/4"),
new string("Vetro BE 3S 4/12/4/12/4"),
new string("Vetro BE 3S 4/16/4/16/4"),
new string("Vetro BE 2S 4T/12/4T"),
new string("Vetro BE 2S 4T/16/4T")
};
protected string SelFamilyHardware { get; set; } = "";
protected string SelColorMaterial { get; set; } = "";
@@ -92,14 +96,48 @@ namespace Test.UI.Components.Pages
protected override async Task OnInitializedAsync()
{
ConfInit();
SelFamilyHardware = "Natura";
SelColorMaterial = "Black";
SelMaterial = "Pine";
SelGlass = "4T/16/4T";
DLService.CalcDonePipe.EA_NewMessage += CalcDonePipe_EA_NewMessage;
// rileggo altri dati
await ReloadData();
// preparo conf oggetti x controllo
SetupList = new BaseListPayload()
{
ColorMaterial = AvailColorMaterialList,
FamilyHardware = AvailFamilyHardwareList,
Glass = AvailGlassList,
Hardware = AvailHardwareList,
Material = AvailMaterialList,
TemplateDTO = AvailTemplateList
};
CurrData = new LivePayload()
{
//CurrJwd = InitialJwd,
CurrJwd = "",
SvgPreview = currSvg
};
SelectData = new SelectPayload()
{
FamilyHardware = "Profilo78",
ColorMaterial = "Black",
Material = "Pino",
Glass = "Vetro BE 2S 4T / 16 / 4T",
Template = null,
};
DLService.CalcDonePipe.EA_NewMessage += CalcDonePipe_EA_NewMessage;
}
/// <summary>
/// Configurazione elenchi anagrafiche
/// </summary>
protected BaseListPayload SetupList = new BaseListPayload();
/// <summary>
/// Predisposizione valori live SVG/JWD
/// </summary>
protected LivePayload CurrData = new LivePayload();
/// <summary>
/// Predisposizione elementi selezionati
/// </summary>
protected SelectPayload SelectData = new SelectPayload();
#endregion Protected Methods
#region Private Fields
@@ -119,6 +157,9 @@ namespace Test.UI.Components.Pages
private string windowUid = "CurrWindow";
private string outClose = "";
private string outSave = "";
#endregion Private Fields
#region Private Methods
@@ -133,6 +174,8 @@ namespace Test.UI.Components.Pages
if (currArgs.msgUid.Equals($"{subChannel}:{windowUid}"))
{
currSvg = currArgs.newMessage;
CurrData.SvgPreview = currArgs.newMessage;
m_CurrArgs.TryGetValue("Jwd", out temp);
}
await InvokeAsync(StateHasChanged);
}
@@ -187,13 +230,23 @@ namespace Test.UI.Components.Pages
private async Task SaveJWD(Dictionary<string, string> CurrArgs)
{
outClose = "";
outSave = "";
m_CurrArgs = CurrArgs;
// chiamo la chiamata POST alla API, che manda la richiesta via REDIS
if (currJwd != null)
// verifico se contiene JWD, lo aggiorno
if (CurrArgs.ContainsKey("Jwd"))
{
currJwd = CurrArgs["Jwd"];
CurrData.CurrJwd = currJwd;
}
// se il SSE variato --> invio
if (!currJwd.Equals(prevJwd))
{
prevJwd = currJwd;
CalcRequestDTO calcRequestDTO = new CalcRequestDTO();
calcRequestDTO.EnvType = EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW;
calcRequestDTO.DictExec = m_CurrArgs;
// chiamo la chiamata POST alla API, che manda la richiesta via REDIS
await ICService.CallRestPost($"{apiUrl}/{GenericBasePath}", $"{calcTag}/{CalcUid}", calcRequestDTO);
}
}
@@ -202,14 +255,26 @@ namespace Test.UI.Components.Pages
{
string rawVal = "";
currSel = selTemp;
// brutale,d a rivedere...
// brutale,da rivedere...
if (File.Exists(selTemp.JwdFileName))
{
rawVal = File.ReadAllText(selTemp.JwdFileName);
}
SelTemplate = new Template(selTemp.Index, selTemp.Description, selTemp.SVGFileName, rawVal);
SelectData.Template = SelTemplate;
}
/// <summary>
/// Effettua chiusura oggetto con eventuale save
/// </summary>
/// <param name="reqSave"></param>
private void CloseObj(bool reqSave)
{
outClose = !reqSave ? "Richiesto chiusura!" : "";
outSave = reqSave ? "Richiesto salvataggio!" : "";
}
#endregion Private Methods
}
}
+2 -2
View File
@@ -95,7 +95,7 @@
],
"BottomRail": false,
"BottomRailQty": 0,
"Hardware": "000000",
"Hardware": "000558",
"IdGroup": 4,
"AreaList": [
{
@@ -144,7 +144,7 @@
],
"BottomRail": false,
"BottomRailQty": 0,
"Hardware": "000000",
"Hardware": "000558",
"IdGroup": 7,
"AreaList": [
{
+369 -369
View File
@@ -1,371 +1,371 @@
[
{
"Description": "Rect_Sash_Compl",
"FamilyName": "Rect",
"Id": "000547",
"OpeningType": "CO",
"SashPosition": 1,
"SashQty": 2,
"Shape": "Rectangular"
},
{
"Description": "Vasistas",
"FamilyName": "Vasistas",
"Id": "000573",
"OpeningType": "VA",
"SashPosition": 1,
"SashQty": 1,
"Shape": "Rectangular"
},
{
"Description": "Profilo78_Rect_TripleSash_HiddenHinges",
"FamilyName": "Profilo78",
"Id": "000561",
"OpeningType": "AR",
"SashPosition": 1,
"SashQty": 3,
"Shape": "Rectangular"
},
{
"Description": "Profilo78_TurnOnly_Rect_DoubleSash",
"FamilyName": "Profilo78",
"Id": "000563",
"OpeningType": "AB",
"SashPosition": 1,
"SashQty": 2,
"Shape": "Rectangular"
},
{
"Description": "Profilo78_TurnOnly_Rect_TripleSash",
"FamilyName": "Profilo78",
"Id": "000564",
"OpeningType": "AB",
"SashPosition": 2,
"SashQty": 3,
"Shape": "Rectangular"
},
{
"Description": "SegArc_2S_TurnOnly",
"FamilyName": "SegArc",
"Id": "000603",
"OpeningType": "AB",
"SashPosition": 1,
"SashQty": 2,
"Shape": "Arc"
},
{
"Description": "Arc_2S_TurnOnly",
"FamilyName": "Arc",
"Id": "000602",
"OpeningType": "AB",
"SashPosition": 1,
"SashQty": 2,
"Shape": "FullArc"
},
{
"Description": "SegArc_1S_TurnOnly",
"FamilyName": "SegArc",
"Id": "000601",
"OpeningType": "AB",
"SashPosition": 1,
"SashQty": 1,
"Shape": "Arc"
},
{
"Description": "SemiArc_1S",
"FamilyName": "SemiArc",
"Id": "000610",
"OpeningType": "AR",
"SashPosition": 1,
"SashQty": 1,
"Shape": "SemiFullArc"
},
{
"Description": "SemiSegArc_S1",
"FamilyName": "SemiSegArc",
"Id": "000611",
"OpeningType": "AR",
"SashPosition": 1,
"SashQty": 1,
"Shape": "SemiArc"
},
{
"Description": "Arc_1S",
"FamilyName": "Arc",
"Id": "000596",
"OpeningType": "AR",
"SashPosition": 1,
"SashQty": 1,
"Shape": "FullArc"
},
{
"Description": "SegArc_2S",
"FamilyName": "SegArc",
"Id": "000599",
"OpeningType": "AR",
"SashPosition": 1,
"SashQty": 2,
"Shape": "Arc"
},
{
"Description": "SegArc_1S",
"FamilyName": "SegArc",
"Id": "000597",
"OpeningType": "AR",
"SashPosition": 1,
"SashQty": 1,
"Shape": "Arc"
},
{
"Description": "Test aria 4",
"FamilyName": "Test aria 4",
"Id": "000609",
"OpeningType": "AR",
"SashPosition": 1,
"SashQty": 2,
"Shape": "Arc"
},
{
"Description": "Arc_2S",
"FamilyName": "Arc",
"Id": "000598",
"OpeningType": "AR",
"SashPosition": 1,
"SashQty": 2,
"Shape": "FullArc"
},
{
"Description": "Arc_1S_TurnOnly",
"FamilyName": "Arc",
"Id": "000600",
"OpeningType": "AB",
"SashPosition": 1,
"SashQty": 1,
"Shape": "FullArc"
},
{
"Description": "Trap_S1_TurnOnly",
"FamilyName": "Trap",
"Id": "000606",
"OpeningType": "AB",
"SashPosition": 1,
"SashQty": 1,
"Shape": "Trapezoidal"
},
{
"Description": "Trap_S2",
"FamilyName": "Trap",
"Id": "000605",
"OpeningType": "AR",
"SashPosition": 1,
"SashQty": 2,
"Shape": "Trapezoidal"
},
{
"Description": "Trap_S2_TurnOnly",
"FamilyName": "Trap",
"Id": "000607",
"OpeningType": "AB",
"SashPosition": 1,
"SashQty": 2,
"Shape": "Trapezoidal"
},
{
"Description": "Trap_S1",
"FamilyName": "Trap",
"Id": "000604",
"OpeningType": "AR",
"SashPosition": 1,
"SashQty": 1,
"Shape": "Trapezoidal"
},
{
"Description": "Slide_quadruple",
"FamilyName": "Slide",
"Id": "000595",
"OpeningType": "AS",
"SashPosition": 2,
"SashQty": 4,
"Shape": "Rectangular"
},
{
"Description": "Slide_2S",
"FamilyName": "Slide",
"Id": "000592",
"OpeningType": "AS",
"SashPosition": 1,
"SashQty": 2,
"Shape": "Rectangular"
},
{
"Description": "Slide_4S",
"FamilyName": "Slide",
"Id": "000594",
"OpeningType": "AS",
"SashPosition": 2,
"SashQty": 4,
"Shape": "Rectangular"
},
{
"Description": "Slide_double",
"FamilyName": "Slide",
"Id": "000593",
"OpeningType": "AS",
"SashPosition": 1,
"SashQty": 2,
"Shape": "Rectangular"
},
{
"Description": "Profilo78_TurnOnly_Rect_QuadrupleSash",
"FamilyName": "Profilo78",
"Id": "000575",
"OpeningType": "AB",
"SashPosition": 2,
"SashQty": 4,
"Shape": "Rectangular"
},
{
"Description": "Profilo78_Rect_Sash",
"FamilyName": "Profilo78",
"Id": "000558",
"OpeningType": "AR",
"SashPosition": 1,
"SashQty": 1,
"Shape": "Rectangular"
},
{
"Description": "Profilo78_Rect_DoubleSash",
"FamilyName": "Profilo78",
"Id": "000559",
"OpeningType": "AR",
"SashPosition": 1,
"SashQty": 2,
"Shape": "Rectangular"
},
{
"Description": "Profilo78_TurnOnly_Rect_TripleSash_CenterHandle",
"FamilyName": "Profilo78",
"Id": "000566",
"OpeningType": "AB",
"SashPosition": 2,
"SashQty": 3,
"Shape": "Rectangular"
},
{
"Description": "Profilo78_TurnOnly_Rect_TripleSash_SideHandle",
"FamilyName": "Profilo78",
"Id": "000565",
"OpeningType": "AB",
"SashPosition": 1,
"SashQty": 3,
"Shape": "Rectangular"
},
{
"Description": "Profilo78_Rect_Sash",
"FamilyName": "Profilo78",
"Id": "000562",
"OpeningType": "AB",
"SashPosition": 1,
"SashQty": 1,
"Shape": "Rectangular"
},
{
"Description": "Profilo78_Rect_TripleSash",
"FamilyName": "Profilo78",
"Id": "000560",
"OpeningType": "AR",
"SashPosition": 1,
"SashQty": 3,
"Shape": "Rectangular"
},
{
"Description": "Rect_DoubleSash_4",
"FamilyName": "Rect",
"Id": "000550",
"OpeningType": "AR",
"SashPosition": 1,
"SashQty": 2,
"Shape": "Rectangular"
},
{
"Description": "Rect_DoubleSashStrana",
"FamilyName": "Rect",
"Id": "000552",
"OpeningType": "AR",
"SashPosition": 1,
"SashQty": 3,
"Shape": "Rectangular"
},
{
"Description": "Rect_DoubleSash",
"FamilyName": "Rect",
"Id": "000549",
"OpeningType": "AR",
"SashPosition": 1,
"SashQty": 2,
"Shape": "Rectangular"
},
{
"Description": "Round_Sash",
"FamilyName": "Round",
"Id": "000555",
"OpeningType": "BI",
"SashPosition": 1,
"SashQty": 1,
"Shape": "Circular"
},
{
"Description": "Rect_Sash_Bilico",
"FamilyName": "Rect",
"Id": "000556",
"OpeningType": "BI",
"SashPosition": 1,
"SashQty": 1,
"Shape": "Rectangular"
},
{
"Description": "Rect_QuadrupolSash_Bandiera",
"FamilyName": "Rect",
"Id": "000554",
"OpeningType": "AB",
"SashPosition": 2,
"SashQty": 4,
"Shape": "Rectangular"
},
{
"Description": "Rect_Sash_Bandiera",
"FamilyName": "Rect",
"Id": "000551",
"OpeningType": "AB",
"SashPosition": 1,
"SashQty": 1,
"Shape": "Rectangular"
},
{
"Description": "Rect_Sash",
"FamilyName": "Rect",
"Id": "000544",
"OpeningType": "AR",
"SashPosition": 1,
"SashQty": 1,
"Shape": "Rectangular"
},
{
"Description": "Rect_TripleSash",
"FamilyName": "Rect",
"Id": "000553",
"OpeningType": "AR",
"SashPosition": 1,
"SashQty": 3,
"Shape": "Rectangular"
},
{
"Description": "Rect_Sash_4",
"FamilyName": "Rect",
"Id": "000545",
"OpeningType": "AR",
"SashPosition": 1,
"SashQty": 1,
"Shape": "Rectangular"
}
{
"id": "000548",
"familyName": "Rect",
"description": "Rect_DoubleSash",
"openingType": "TiltTurn",
"shape": "Rectangular",
"sashQty": 2,
"sashPosition": 1
},
{
"id": "000546",
"familyName": "Trap",
"description": "Trap_Sash",
"openingType": "TiltTurn",
"shape": "Trapezoidal",
"sashQty": 1,
"sashPosition": 1
},
{
"id": "000547",
"familyName": "Rect",
"description": "Rect_Sash_Compl",
"openingType": "ComplanarSlide",
"shape": "Rectangular",
"sashQty": 2,
"sashPosition": 1
},
{
"id": "000561",
"familyName": "Profilo78",
"description": "Profilo78_Rect_TripleSash_HiddenHinges",
"openingType": "TiltTurn",
"shape": "Rectangular",
"sashQty": 3,
"sashPosition": 1
},
{
"id": "000563",
"familyName": "Profilo78",
"description": "Profilo78_TurnOnly_Rect_DoubleSash",
"openingType": "TurnOnly",
"shape": "Rectangular",
"sashQty": 2,
"sashPosition": 1
},
{
"id": "000564",
"familyName": "Profilo78",
"description": "Profilo78_TurnOnly_Rect_TripleSash",
"openingType": "TurnOnly",
"shape": "Rectangular",
"sashQty": 3,
"sashPosition": 2
},
{
"id": "000603",
"familyName": "SegArc",
"description": "SegArc_2S_TurnOnly",
"openingType": "TurnOnly",
"shape": "Arc",
"sashQty": 2,
"sashPosition": 1
},
{
"id": "000602",
"familyName": "Arc",
"description": "Arc_2S_TurnOnly",
"openingType": "TurnOnly",
"shape": "FullArc",
"sashQty": 2,
"sashPosition": 1
},
{
"id": "000601",
"familyName": "SegArc",
"description": "SegArc_1S_TurnOnly",
"openingType": "TurnOnly",
"shape": "Arc",
"sashQty": 1,
"sashPosition": 1
},
{
"id": "000610",
"familyName": "SemiArc",
"description": "SemiArc_1S",
"openingType": "TiltTurn",
"shape": "SemiFullArc",
"sashQty": 1,
"sashPosition": 1
},
{
"id": "000611",
"familyName": "SemiSegArc",
"description": "SemiSegArc_S1",
"openingType": "TiltTurn",
"shape": "SemiArc",
"sashQty": 1,
"sashPosition": 1
},
{
"id": "000596",
"familyName": "Arc",
"description": "Arc_1S",
"openingType": "TiltTurn",
"shape": "FullArc",
"sashQty": 1,
"sashPosition": 1
},
{
"id": "000599",
"familyName": "SegArc",
"description": "SegArc_2S",
"openingType": "TiltTurn",
"shape": "Arc",
"sashQty": 2,
"sashPosition": 1
},
{
"id": "000597",
"familyName": "SegArc",
"description": "SegArc_1S",
"openingType": "TiltTurn",
"shape": "Arc",
"sashQty": 1,
"sashPosition": 1
},
{
"id": "000598",
"familyName": "Arc",
"description": "Arc_2S",
"openingType": "TiltTurn",
"shape": "FullArc",
"sashQty": 2,
"sashPosition": 1
},
{
"id": "000600",
"familyName": "Arc",
"description": "Arc_1S_TurnOnly",
"openingType": "TurnOnly",
"shape": "FullArc",
"sashQty": 1,
"sashPosition": 1
},
{
"id": "000606",
"familyName": "Trap",
"description": "Trap_S1_TurnOnly",
"openingType": "TurnOnly",
"shape": "Trapezoidal",
"sashQty": 1,
"sashPosition": 1
},
{
"id": "000605",
"familyName": "Trap",
"description": "Trap_S2",
"openingType": "TiltTurn",
"shape": "Trapezoidal",
"sashQty": 2,
"sashPosition": 1
},
{
"id": "000607",
"familyName": "Trap",
"description": "Trap_S2_TurnOnly",
"openingType": "TurnOnly",
"shape": "Trapezoidal",
"sashQty": 2,
"sashPosition": 1
},
{
"id": "000604",
"familyName": "Trap",
"description": "Trap_S1",
"openingType": "TiltTurn",
"shape": "Trapezoidal",
"sashQty": 1,
"sashPosition": 1
},
{
"id": "000595",
"familyName": "Slide",
"description": "Slide_quadruple",
"openingType": "LiftSlide",
"shape": "Rectangular",
"sashQty": 4,
"sashPosition": 2
},
{
"id": "000592",
"familyName": "Slide",
"description": "Slide_2S",
"openingType": "LiftSlide",
"shape": "Rectangular",
"sashQty": 2,
"sashPosition": 1
},
{
"id": "000594",
"familyName": "Slide",
"description": "Slide_4S",
"openingType": "LiftSlide",
"shape": "Rectangular",
"sashQty": 4,
"sashPosition": 2
},
{
"id": "000593",
"familyName": "Slide",
"description": "Slide_double",
"openingType": "LiftSlide",
"shape": "Rectangular",
"sashQty": 2,
"sashPosition": 1
},
{
"id": "000575",
"familyName": "Profilo78",
"description": "Profilo78_TurnOnly_Rect_QuadrupleSash",
"openingType": "TurnOnly",
"shape": "Rectangular",
"sashQty": 4,
"sashPosition": 2
},
{
"id": "000558",
"familyName": "Profilo78",
"description": "Profilo78_Rect_Sash",
"openingType": "TiltTurn",
"shape": "Rectangular",
"sashQty": 1,
"sashPosition": 1
},
{
"id": "000559",
"familyName": "Profilo78",
"description": "Profilo78_Rect_DoubleSash",
"openingType": "TiltTurn",
"shape": "Rectangular",
"sashQty": 2,
"sashPosition": 1
},
{
"id": "000566",
"familyName": "Profilo78",
"description": "Profilo78_TurnOnly_Rect_TripleSash_CenterHandle",
"openingType": "TurnOnly",
"shape": "Rectangular",
"sashQty": 3,
"sashPosition": 2
},
{
"id": "000565",
"familyName": "Profilo78",
"description": "Profilo78_TurnOnly_Rect_TripleSash_SideHandle",
"openingType": "TurnOnly",
"shape": "Rectangular",
"sashQty": 3,
"sashPosition": 1
},
{
"id": "000562",
"familyName": "Profilo78",
"description": "Profilo78_Rect_Sash",
"openingType": "TurnOnly",
"shape": "Rectangular",
"sashQty": 1,
"sashPosition": 1
},
{
"id": "000560",
"familyName": "Profilo78",
"description": "Profilo78_Rect_TripleSash",
"openingType": "TiltTurn",
"shape": "Rectangular",
"sashQty": 3,
"sashPosition": 1
},
{
"id": "000550",
"familyName": "Rect",
"description": "Rect_DoubleSash_4",
"openingType": "TiltTurn",
"shape": "Rectangular",
"sashQty": 2,
"sashPosition": 1
},
{
"id": "000552",
"familyName": "Rect",
"description": "Rect_DoubleSashStrana",
"openingType": "TiltTurn",
"shape": "Rectangular",
"sashQty": 3,
"sashPosition": 1
},
{
"id": "000549",
"familyName": "Rect",
"description": "Rect_DoubleSash",
"openingType": "TiltTurn",
"shape": "Rectangular",
"sashQty": 2,
"sashPosition": 1
},
{
"id": "000555",
"familyName": "Round",
"description": "Round_Sash",
"openingType": "Pivot",
"shape": "Circular",
"sashQty": 1,
"sashPosition": 1
},
{
"id": "000556",
"familyName": "Rect",
"description": "Rect_Sash_Bilico",
"openingType": "Pivot",
"shape": "Rectangular",
"sashQty": 1,
"sashPosition": 1
},
{
"id": "000554",
"familyName": "Rect",
"description": "Rect_QuadrupolSash_Bandiera",
"openingType": "TurnOnly",
"shape": "Rectangular",
"sashQty": 4,
"sashPosition": 2
},
{
"id": "000551",
"familyName": "Rect",
"description": "Rect_Sash_Bandiera",
"openingType": "TurnOnly",
"shape": "Rectangular",
"sashQty": 1,
"sashPosition": 1
},
{
"id": "000544",
"familyName": "Rect",
"description": "Rect_Sash",
"openingType": "TiltTurn",
"shape": "Rectangular",
"sashQty": 1,
"sashPosition": 1
},
{
"id": "000553",
"familyName": "Rect",
"description": "Rect_TripleSash",
"openingType": "TiltTurn",
"shape": "Rectangular",
"sashQty": 3,
"sashPosition": 1
},
{
"id": "000545",
"familyName": "Rect",
"description": "Rect_Sash_4",
"openingType": "TiltTurn",
"shape": "Rectangular",
"sashQty": 1,
"sashPosition": 1
}
]
@@ -12,7 +12,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Egw.Window.Data" Version="2.7.10.218" />
<PackageReference Include="Egw.Window.Data" Version="2.7.10-beta.915" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.19" />
</ItemGroup>
+10
View File
@@ -18,6 +18,16 @@ namespace WebWindowComplex.DTO
/// </summary>
public string CurrJwd { get; set; } = string.Empty;
/// <summary>
/// JWD Iniziale
/// </summary>
public string InitJwd { get; set; } = string.Empty;
/// <summary>
/// JWD Corrente
/// </summary>
public TemplateSelectDTO CurrTemplate { get; set; } = new TemplateSelectDTO();
/// <summary>
/// Preview SVG
/// </summary>
+11 -11
View File
@@ -84,17 +84,17 @@ namespace WebWindowComplex.Json
LIFTSLIDE_RIGHT = 12
}
public enum OpeningTypes : int
{
NULL = 0,
TURNONLY = 1,
TILTTURN = 2,
TILTONLY = 3,
PIVOT = 4,
FIXED = 5,
COMPLANARSLIDE = 6,
LIFTSLIDE = 7
}
//public enum OpeningTypes : int
//{
// NULL = 0,
// TURNONLY = 1,
// TILTTURN = 2,
// TILTONLY = 3,
// PIVOT = 4,
// FIXED = 5,
// COMPLANARSLIDE = 6,
// LIFTSLIDE = 7
//}
public enum OpeningSides : int
{
+4 -3
View File
@@ -5,7 +5,7 @@
<div class="row">
<div class="@headerCss()">
<ul class="nav nav-tabs card-header-tabs">
@if (string.IsNullOrEmpty(LiveData.CurrJwd))
@if (string.IsNullOrEmpty(LiveData.InitJwd))
{
<li class="nav-item m-1">
@if (currStep == CompileStep.Template)
@@ -47,7 +47,7 @@
</div>
<div class="card-body bg-transparent">
<div class="text-center display-4">
@if (string.IsNullOrEmpty(LiveData.CurrJwd))
@if (string.IsNullOrEmpty(LiveData.InitJwd))
{
@if (currStep == CompileStep.Template && ListPayload.TemplateDTO != null)
{
@@ -167,8 +167,9 @@
<h5 class="card-title">Dimension</h5>
@foreach (FrameDimension dimension in FrameWindow.DimensionList)
{
int n = dimension.nIndex;
<div class="input-group mb-2">
<span class="input-group-text" id="NameDimFrame@(dimension.nIndex)">@dimension.sName</span>
<span class="input-group-text" id="NameDimFrame@(n)">@dimension.sName</span>
<input type="number" class="form-control" aria-label="@dimension.dValue" @bind="@dimension.dValue">
<span class="input-group-text">mm</span>
</div>
+26 -11
View File
@@ -7,6 +7,8 @@ using Newtonsoft.Json.Linq;
using System.Reflection.Metadata;
using System.Reflection.Metadata.Ecma335;
using System.Runtime.InteropServices;
using System.Text.Json;
using System.Text.Json.Serialization;
using WebWindowComplex.DTO;
using WebWindowComplex.Json;
using static WebWindowComplex.Json.WindowConst;
@@ -243,6 +245,7 @@ namespace WebWindowComplex
}
protected string m_SelSVG { get; set; } = "";
protected string m_CurrJwd { get; set; } = "";
/// <summary>
/// Componente SVG da mostrare
@@ -616,10 +619,17 @@ namespace WebWindowComplex
Area.nCounterGroup = 0;
UpdateSelParameter();
JsonWindow WindowFromJson;
if (string.IsNullOrEmpty(LiveData.CurrJwd))
if (string.IsNullOrEmpty(LiveData.InitJwd))
{
WindowFromJson = JsonConvert.DeserializeObject<JsonWindow>(m_SelTemplate.JWD, new PolymorphicJsonConverter()) ?? new JsonWindow("", "", "", "");
m_SelTemplate = CurrSelection!.Template;
LiveData.CurrJwd = m_SelTemplate.JWD;
}
else
WindowFromJson = JsonConvert.DeserializeObject<JsonWindow>(LiveData.CurrJwd!, new PolymorphicJsonConverter()) ?? new JsonWindow("", "", "", "");
{
WindowFromJson = JsonConvert.DeserializeObject<JsonWindow>(LiveData.InitJwd!, new PolymorphicJsonConverter()) ?? new JsonWindow("", "", "", "");
LiveData.CurrJwd = LiveData.InitJwd;
}
if (m_CurrWindow != null)
{
m_CurrWindow.OnPreview -= M_CurrWindow_OnPreview;
@@ -681,20 +691,22 @@ namespace WebWindowComplex
if (ListPayload.IsValid())
{
// controllo sia popolato anche per la componente LIVE
if (LiveData.IsValid())
if (!LiveData.InitJwd.Equals(""))
{
// SOLO SE modificato live data...
if (prevLiveData == null || !prevLiveData.Equals(LiveData))
{
prevLiveData = new LivePayload()
{
CurrJwd = LiveData.CurrJwd,
CurrJwd = LiveData.InitJwd,
SvgPreview = LiveData.SvgPreview
};
if(m_CurrJwd.Equals(""))
m_CurrJwd = LiveData.InitJwd;
m_SelSVG = LiveData.SvgPreview;
// Aggiornati parametri di ingresso selezionati
UpdateSelParameter();
JsonWindow WindowFromJson = JsonConvert.DeserializeObject<JsonWindow>(LiveData.CurrJwd, new PolymorphicJsonConverter()) ?? new JsonWindow("", "", "", "");
JsonWindow WindowFromJson = JsonConvert.DeserializeObject<JsonWindow>(m_CurrJwd, new PolymorphicJsonConverter()) ?? new JsonWindow("", "", "", "");
setCurrWindow(WindowFromJson);
//SOLO SE non sono in edit...
if (!editLock)
@@ -706,16 +718,18 @@ namespace WebWindowComplex
}
else if (CurrSelection != null && CurrSelection.Template != null)
{
JsonWindow WindowFromJson;
// Se viene passato il template selezionato oppure se non è ancora stato selezionato un template oppure se si cambia template di selezione
if (m_SelTemplate == null || (m_SelTemplate != null && CurrSelection.Template.nIndex != m_SelTemplate.nIndex) && !string.IsNullOrEmpty(CurrSelection.Template.JWD))
{
m_SelTemplate = CurrSelection.Template;
// Aggiornamento parametri di ingresso selezionati
UpdateSelParameter();
JsonWindow WindowFromJson = JsonConvert.DeserializeObject<JsonWindow>(m_SelTemplate.JWD, new PolymorphicJsonConverter()) ?? new JsonWindow("", "", "", "");
setCurrWindow(WindowFromJson);
currStep = CompileStep.Template;
LiveData.CurrJwd = CurrSelection.Template.JWD;
currStep = CompileStep.Tree;
}
// Aggiornamento parametri di ingresso selezionati
UpdateSelParameter();
WindowFromJson = JsonConvert.DeserializeObject<JsonWindow>(LiveData.CurrJwd, new PolymorphicJsonConverter()) ?? new JsonWindow("", "", "", "");
setCurrWindow(WindowFromJson);
updateSvg = true;
}
if (SashList.Count > 0)
@@ -784,6 +798,7 @@ namespace WebWindowComplex
SelColorMaterial = CurrSelection.ColorMaterial ?? "";
SelMaterial = CurrSelection.Material ?? "";
SelGlass = CurrSelection.Glass ?? "";
m_SelTemplate = CurrSelection.Template;
}
}
@@ -821,7 +836,7 @@ namespace WebWindowComplex
private Window? m_PreviousWindow { get; set; } = null;
private string m_SelFamilyHardware { get; set; } = "";
//private string m_SelFamilyHardware { get; set; } = "";
private Template m_SelTemplate { get; set; } = null!;
+20 -2
View File
@@ -6,7 +6,7 @@
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<Version>2.7.10.818</Version>
<Version>2.7.10.917</Version>
<Authors>Annamaria Sassi</Authors>
<Company>Egalware</Company>
<Description>Componente gestione Configurazioni avanzate Window per LUX</Description>
@@ -18,7 +18,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Egw.Window.Data" Version="2.7.10.218" />
<PackageReference Include="Egw.Window.Data" Version="2.7.10-beta.915" />
<PackageReference Include="EgwCoreLib.Razor" Version="1.5.2507.1815" />
<PackageReference Include="EgwCoreLib.Utils" Version="1.5.2507.1815" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.19" />
@@ -119,6 +119,24 @@
+99 -72
View File
@@ -1,5 +1,6 @@
using Egw.Window.Data;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Linq;
using System.Collections;
using System.Collections.ObjectModel;
@@ -1172,9 +1173,9 @@ namespace WebWindowComplex
internal void SetSelHardwareFromId(string sId)
{
if (m_HardwareList.Count == 0)
m_SelHardware = m_HardwareCompleteList.FirstOrDefault(x => x.Id.Equals(sId)) ?? new Hardware("", "", "", "", "", 0, 0);
m_SelHardware = m_HardwareCompleteList.FirstOrDefault(x => x.Id.Equals(sId)) ?? new Hardware("", "", "", Enums.OpeningTypes.Null, "", 0, 0);
else
m_SelHardware = m_HardwareList.FirstOrDefault(x => x.Id.Equals(sId)) ?? new Hardware("", "", "", "", "", 0, 0);
m_SelHardware = m_HardwareList.FirstOrDefault(x => x.Id.Equals(sId)) ?? new Hardware("", "", "", Enums.OpeningTypes.Null, "", 0, 0);
if (m_SelHardware == null)
m_SelHardware = m_HardwareList[0];
//SelFamilyHardware = m_SelHardware.FamilyName;
@@ -1188,7 +1189,7 @@ namespace WebWindowComplex
}
set
{
m_SelHardware = m_HardwareList.FirstOrDefault(x => !string.IsNullOrEmpty(value) && x.Id.Equals(value)) ?? new Hardware("", "", "", "", "", 0, 0);
m_SelHardware = m_HardwareList.FirstOrDefault(x => !string.IsNullOrEmpty(value) && x.Id.Equals(value)) ?? new Hardware("", "", "", Enums.OpeningTypes.Null, "", 0, 0);
ParentWindow.OnUpdatePreview(ParentWindow.sSerialized());
}
}
@@ -1238,58 +1239,112 @@ namespace WebWindowComplex
return "Rectangular";
}
internal OpeningTypes GetOpeningType(Openings OpeningType)
internal Enums.OpeningTypes GetOpeningType(Openings OpeningType)
{
switch (OpeningType)
{
case Openings.TURNONLY_LEFT:
case Openings.TURNONLY_RIGHT:
{
return OpeningTypes.TURNONLY;
return Enums.OpeningTypes.TurnOnly;
}
case Openings.TILTTURN_LEFT:
case Openings.TILTTURN_RIGHT:
{
return OpeningTypes.TILTTURN;
return Enums.OpeningTypes.TiltTurn;
}
case Openings.TILTONLY_TOP:
case Openings.TILTONLY_BOTTOM:
{
return OpeningTypes.TILTONLY;
return Enums.OpeningTypes.TiltOnly;
}
case Openings.PIVOT:
{
return OpeningTypes.PIVOT;
return Enums.OpeningTypes.Pivot;
}
case Openings.FIXED:
{
return OpeningTypes.FIXED;
return Enums.OpeningTypes.Fixed;
}
case Openings.COMPLANARSLIDE_LEFT:
case Openings.COMPLANARSLIDE_RIGHT:
{
return OpeningTypes.COMPLANARSLIDE;
return Enums.OpeningTypes.ComplanarSlide;
}
case Openings.LIFTSLIDE_LEFT:
case Openings.LIFTSLIDE_RIGHT:
{
return OpeningTypes.LIFTSLIDE;
return Enums.OpeningTypes.LiftSlide;
}
default:
{
return OpeningTypes.NULL;
return Enums.OpeningTypes.Null;
}
}
}
private string ConvertOpeningType()
//private string ConvertOpeningType()
//{
// if (m_SashList.Count > 1)
// {
// for (int i = 0; i < m_SashList.Count; i++)
// {
// if (m_SashList[i].bHasHandle)
// {
// if (GetOpeningType(m_SashList[i].OpeningType) == OpeningTypes.TURNONLY)
// return "AB";
// else
// return "AR";
// }
// }
// return "";
// }
// else if (m_SashList.Count == 1)
// {
// switch (GetOpeningType(m_SashList[0].OpeningType))
// {
// case OpeningTypes.TILTTURN:
// {
// return "AR";
// }
// case OpeningTypes.TURNONLY:
// {
// return "AB";
// }
// case OpeningTypes.TILTONLY:
// {
// return "VA";
// }
// case OpeningTypes.PIVOT:
// {
// return "BI";
// }
// case OpeningTypes.COMPLANARSLIDE:
// {
// return "CO";
// }
// case OpeningTypes.LIFTSLIDE:
// {
// return "AS";
// }
// default:
// {
// return "";
// }
// }
// }
// return "";
//}
private Enums.OpeningTypes ConvertOpeningType()
{
if (m_SashList.Count > 1)
{
@@ -1297,50 +1352,16 @@ namespace WebWindowComplex
{
if (m_SashList[i].bHasHandle)
{
if (GetOpeningType(m_SashList[i].OpeningType) == OpeningTypes.TURNONLY)
return "AB";
else
return "AR";
return GetOpeningType(m_SashList[i].OpeningType);
}
}
return "";
return Enums.OpeningTypes.Null;
}
else if (m_SashList.Count == 1)
else
{
switch (GetOpeningType(m_SashList[0].OpeningType))
{
case OpeningTypes.TILTTURN:
{
return "AR";
}
case OpeningTypes.TURNONLY:
{
return "AB";
}
case OpeningTypes.TILTONLY:
{
return "VA";
}
case OpeningTypes.PIVOT:
{
return "BI";
}
case OpeningTypes.COMPLANARSLIDE:
{
return "CO";
}
case OpeningTypes.LIFTSLIDE:
{
return "AS";
}
default:
{
return "";
}
}
return GetOpeningType(m_SashList[0].OpeningType);
}
return "";
}
public void RefreshHardwareList()
@@ -1349,11 +1370,11 @@ namespace WebWindowComplex
{
m_HardwareList.Clear();
string sSashShape = FindSashShape();
string sOpeningType = ConvertOpeningType();
Enums.OpeningTypes sOpeningType = ConvertOpeningType();
var iComp = StringComparison.InvariantCultureIgnoreCase;
var rawList = m_HardwareCompleteList
.Where(x => x.Id == "000000" ||
(!string.IsNullOrEmpty(m_SelFamilyHardware) && x.FamilyName.Equals(m_SelFamilyHardware, iComp) && x.SashQty == nSashQty && x.Shape.Equals(sSashShape, iComp) && x.OpeningType.Equals(sOpeningType, iComp))
(!string.IsNullOrEmpty(m_SelFamilyHardware) && x.FamilyName.Equals(m_SelFamilyHardware, iComp) && x.SashQty == nSashQty && x.Shape.Equals(sSashShape, iComp) && x.OpeningType == sOpeningType)
)
.ToList();
if (rawList != null && rawList.Count > 0)
@@ -1735,28 +1756,34 @@ namespace WebWindowComplex
AreaList.Clear();
SetSplitQtyVert(0);
SetSplitQtyHoriz(0);
if (m_SelSplitShape == SplitShapes.VERTICAL)
switch (SelSplitShape)
{
// Inserisco valori di default
SetSplitQtyVert(1);
SetSplitStartVert(true);
}
else if (m_SelSplitShape == SplitShapes.HORIZONTAL)
{
// Inserisco valori di default
SetSplitQtyHoriz(1);
SetSplitStartVert(false);
}
else
{
// Inserisco valori di default
SetSplitQtyVert(1);
SetSplitQtyHoriz(1);
SetSplitStartVert(true);
case SplitShapes.VERTICAL:
{
// Inserisco valori di default
SetSplitQtyVert(1);
SetSplitStartVert(true);
break;
}
case SplitShapes.HORIZONTAL:
{
// Inserisco valori di default
SetSplitQtyHoriz(1);
SetSplitStartVert(false);
break;
}
case SplitShapes.GRID:
{
// Inserisco valori di default
SetSplitQtyVert(1);
SetSplitQtyHoriz(1);
SetSplitStartVert(true);
break;
}
}
// Aggiungo area Splitted e vetro
int nVert = m_SplitVertList.Count > 0 ? m_SplitVertList.Count : 1;
int nHoriz = m_SplitHorizList.Count > 0 ? m_SplitHorizList.Count : 1;
int nVert = SplitVertList.Count > 0 ? SplitVertList.Count : 1;
int nHoriz = SplitHorizList.Count > 0 ? SplitHorizList.Count : 1;
for (var SplitIndex = 0; SplitIndex <= (nVert * nHoriz) - 1; SplitIndex++)
{
AreaList.Add(Splitted.CreateSplitted(this));
@@ -6,7 +6,7 @@
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<Version>2.7.10.818</Version>
<Version>2.7.10.917</Version>
<Authors>Annamaria Sassi</Authors>
<Company>Egalware</Company>
<Description>Componente gestione JWD per LUX</Description>
@@ -26,7 +26,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Egw.Window.Data" Version="2.7.10.218" />
<PackageReference Include="Egw.Window.Data" Version="2.7.10-beta.915" />
<PackageReference Include="EgwCoreLib.Razor" Version="1.5.2507.1815" />
<PackageReference Include="EgwCoreLib.Utils" Version="1.5.2507.1815" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.19" />
@@ -156,6 +156,21 @@
+1 -1
View File
@@ -12,7 +12,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Egw.Window.Data" Version="2.7.10.218" />
<PackageReference Include="Egw.Window.Data" Version="2.7.10-beta.915" />
<PackageReference Include="EgwCoreLib.Razor" Version="1.5.2507.1815" />
<PackageReference Include="EgwCoreLib.Utils" Version="1.5.2507.1815" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.19" />
+2052 -1656
View File
File diff suppressed because it is too large Load Diff