diff --git a/Test.UI/Components/Pages/EditJWD.razor b/Test.UI/Components/Pages/EditJWD.razor
index bfda185..48e4a75 100644
--- a/Test.UI/Components/Pages/EditJWD.razor
+++ b/Test.UI/Components/Pages/EditJWD.razor
@@ -22,6 +22,9 @@ else if (!string.IsNullOrEmpty(outSave))
@outSave
}
+
+ @currJwd
+
@*
IN_ColorMaterialList="@AvailColorMaterialList"
diff --git a/Test.UI/Components/Pages/EditJWD.razor.cs b/Test.UI/Components/Pages/EditJWD.razor.cs
index f2edbdf..c32518f 100644
--- a/Test.UI/Components/Pages/EditJWD.razor.cs
+++ b/Test.UI/Components/Pages/EditJWD.razor.cs
@@ -93,7 +93,7 @@ namespace Test.UI.Components.Pages
protected override async Task OnInitializedAsync()
{
ConfInit();
- SelFamilyHardware = "Natura";
+ //SelFamilyHardware = "Natura";
//SelColorMaterial = "Black";
//SelColorMaterial = "Pine";
//SelGlass = "4T/16/4T";
diff --git a/Test.UI/Data/AntaDoppia.jwd b/Test.UI/Data/AntaDoppia.jwd
index 83df841..21d2d91 100644
--- a/Test.UI/Data/AntaDoppia.jwd
+++ b/Test.UI/Data/AntaDoppia.jwd
@@ -75,7 +75,7 @@
"JointType": "FULL_V"
}
],
- "Hardware": "000558",
+ "Hardware": "000559",
"IdGroup": 2,
"AreaList": [
{
diff --git a/WebWindowComplex/Json/JsonUtility.cs b/WebWindowComplex/Json/JsonUtility.cs
index 164836b..a1edcdf 100644
--- a/WebWindowComplex/Json/JsonUtility.cs
+++ b/WebWindowComplex/Json/JsonUtility.cs
@@ -397,6 +397,7 @@ namespace WebWindowComplex.Json
}
foreach (var Joint in m_JointList)
newSash.JointList.Add(Joint.Deserialize((Area)ParentArea));
+ newSash.SetSelFamilyHardwareFromIndex(Hardware);
newSash.RefreshHardwareList();
newSash.SetSelHardwareFromId(Hardware);
foreach (var Area in AreaList)
diff --git a/WebWindowComplex/TableComp.razor b/WebWindowComplex/TableComp.razor
index 22dd190..45052a8 100644
--- a/WebWindowComplex/TableComp.razor
+++ b/WebWindowComplex/TableComp.razor
@@ -535,16 +535,23 @@
-
-
+
@if (item.HardwareList == null || item.HardwareList.Count == 0)
{
@@ -553,13 +560,9 @@
{
@foreach (var hlItem in item.HardwareList)
{
-
+
}
}
- @* @for (int i = 0; i < item.HardwareList.Count; i++)
- {
-
- } *@
@@ -719,9 +722,10 @@
- @for (int i = 0; i < SplittedList.Count; i++)
+ @foreach(var currSplitted in SplittedList)
+ @* @for (int i = 0; i < SplittedList.Count; i++) *@
{
- Splitted currSplitted = SplittedList[i];
+ @* Splitted currSplitted = SplittedList[i]; *@
@if (currSplitted.AreaList[0].Equals(item))
{
@@ -730,7 +734,7 @@
@if (SplittedList.Count > 1)
{
-
Area split @(i + 1)
+ Area split @(SplittedList.IndexOf(currSplitted) + 1)
}
else
{
@@ -742,12 +746,13 @@
- @for (int j = 0; j < SashList.Count; j++)
+ @foreach(var Index in SashList)
+ @* @for (int j = 0; j < SashList.Count; j++) *@
{
- int Index = j;
+ @* int Index = j; *@
-
+
}
@@ -780,7 +785,7 @@
-
+
@foreach (var item in ListPayload.Material)
{
@@ -864,9 +869,7 @@
@if (currStep != CompileStep.Template)
{
}
diff --git a/WebWindowComplex/TableComp.razor.cs b/WebWindowComplex/TableComp.razor.cs
index 3019e57..8246309 100644
--- a/WebWindowComplex/TableComp.razor.cs
+++ b/WebWindowComplex/TableComp.razor.cs
@@ -264,30 +264,9 @@ namespace WebWindowComplex
get => m_SashList;
}
- protected string SelColorMaterial { get; set; } = "";
+ protected string SelFamilyHardware { get; set; } = "";
- protected string SelFamilyHardware
- {
- get
- {
- return m_SelFamilyHardware;
- }
- set
- {
- m_SelFamilyHardware = value;
- Sash.s_SelFamilyHW = value;
- for (int i = 0; i < SashList.Count; i++)
- {
- SashList[i].RefreshHardwareList();
- SashList[i].RefreshHardwareOptionList();
- SashList[i].SetFirstHardware();
- }
- if (m_CurrWindow != null)
- {
- m_CurrWindow.OnUpdatePreview(m_CurrWindow.sSerialized());
- }
- }
- }
+ protected string SelColorMaterial { get; set; } = "";
protected string SelGlass { get; set; } = "";
@@ -738,8 +717,9 @@ namespace WebWindowComplex
updateSvg = true;
}
if (SashList.Count > 0)
+ {
currAnta = 0;
-
+ }
if (updateSvg)
{
await DoPreviewSvg();
@@ -798,19 +778,10 @@ namespace WebWindowComplex
Sash.s_FamilyHardwareList = ListPayload.FamilyHardware;
if (CurrSelection != null && CurrSelection.IsValid())
{
- SelFamilyHardware = CurrSelection.FamilyHardware;
+ SelFamilyHardware = CurrSelection.FamilyHardware ?? "";
SelColorMaterial = CurrSelection.ColorMaterial ?? "";
SelMaterial = CurrSelection.Material ?? "";
SelGlass = CurrSelection.Glass ?? "";
- Sash.s_SelFamilyHW = CurrSelection.FamilyHardware ?? "";
- }
- else
- {
- // se ho elementi, seleziono la prima
- if (ListPayload.FamilyHardware.Count > 0)
- {
- Sash.s_SelFamilyHW = Sash.s_FamilyHardwareList.FirstOrDefault();
- }
}
}
@@ -1099,7 +1070,7 @@ namespace WebWindowComplex
/// Metodo per cambiare step e aggiornare preview svg
///
///
step successivo
- private async void NextStepAndPreview(CompileStep newStep, int Index = -1)
+ private void NextStepAndPreview(CompileStep newStep, int Index = -1)
{
editLock = true;
currStep = newStep;
@@ -1131,7 +1102,6 @@ namespace WebWindowComplex
#if false
await DoPreviewSvg();
#endif
- await Task.Delay(1);
}
///
diff --git a/WebWindowComplex/WebWindowComplex.csproj b/WebWindowComplex/WebWindowComplex.csproj
index 2955a90..98340f2 100644
--- a/WebWindowComplex/WebWindowComplex.csproj
+++ b/WebWindowComplex/WebWindowComplex.csproj
@@ -6,7 +6,7 @@
net8.0
enable
enable
- 2.7.10.718
+ 2.7.10.816
Annamaria Sassi
Egalware
Componente gestione Configurazioni avanzate Window per LUX
@@ -95,6 +95,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/WebWindowComplex/Window.cs b/WebWindowComplex/Window.cs
index 19eabd2..473e3b5 100644
--- a/WebWindowComplex/Window.cs
+++ b/WebWindowComplex/Window.cs
@@ -6,6 +6,7 @@ using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Drawing;
using System.Runtime.Intrinsics.Arm;
+using System.Security.Cryptography;
using System.Xml.Linq;
using System.Xml.Serialization;
using WebWindowComplex.Json;
@@ -74,8 +75,8 @@ namespace WebWindowComplex
}
}
- private ObservableCollection m_AreaList = new ObservableCollection();
- public ObservableCollection AreaList
+ private List m_AreaList = new List();
+ public List AreaList
{
get
{
@@ -273,7 +274,7 @@ namespace WebWindowComplex
AreaList.Remove(AreaList[0]);
// Aggiungo Area sash di default
Sash SashArea = Sash.CreateSash(ParentArea);
- Sash.s_SelFamilyHW = Sash.s_FamilyHardwareList.First();
+ SashArea.SelFamilyHardware = Sash.s_FamilyHardwareList.First();
SashArea.RefreshHardwareList();
SashArea.SetSelHardwareFromId(SashArea.HardwareList.First().Id);
// Aggiungo area
@@ -316,7 +317,8 @@ namespace WebWindowComplex
public class Frame : Area
{
- private ObservableCollection m_ShapeList = new ObservableCollection
+
+ private List m_ShapeList = new List
{
new IdNameStruct((int)Shapes.RECTANGLE, "Rectangle"),
new IdNameStruct((int)Shapes.RIGHTCHAMFER, "Right Chamfer"),
@@ -327,7 +329,7 @@ namespace WebWindowComplex
new IdNameStruct((int)Shapes.DOUBLEARC, "Double Arc"),
new IdNameStruct((int)Shapes.TRIANGLE, "Triangle")
};
- public ObservableCollection ShapeList
+ public List ShapeList
{
get
{
@@ -431,10 +433,6 @@ namespace WebWindowComplex
JointList.Add(new Joint(this, 2, oldJointType));
JointList.Add(new Joint(this, 3, oldJointType));
JointList.Add(new Joint(this, 4, oldJointType));
- //JointList.Add(new Joint(this, 1, Joints.FULL_H));
- //JointList.Add(new Joint(this, 2, Joints.FULL_H));
- //JointList.Add(new Joint(this, 3, Joints.FULL_H));
- //JointList.Add(new Joint(this, 4, Joints.FULL_H));
break;
}
@@ -571,8 +569,8 @@ namespace WebWindowComplex
m_Shape = Value;
}
- private ObservableCollection m_DimensionList = new ObservableCollection();
- public ObservableCollection DimensionList
+ private List m_DimensionList = new List();
+ public List DimensionList
{
get
{
@@ -580,8 +578,8 @@ namespace WebWindowComplex
}
}
- private ObservableCollection m_JointList = new ObservableCollection();
- public ObservableCollection JointList
+ private List m_JointList = new List();
+ public List JointList
{
get
{
@@ -681,8 +679,6 @@ namespace WebWindowComplex
public static List m_HardwareCompleteList = new List();
// Lista hardware completa passata dal chiamante del componente
public static List s_FamilyHardwareList = new List();
- // Macro famiglia hardware scelta dal chiamante
- public static string s_SelFamilyHW = "";
public int nSashQty
{
@@ -940,8 +936,8 @@ namespace WebWindowComplex
m_bIsMeasureGlass = IsMeasureGlass;
}
- private ObservableCollection m_SashList = new ObservableCollection();
- public ObservableCollection SashList
+ private List m_SashList = new List();
+ public List SashList
{
get
{
@@ -970,8 +966,8 @@ namespace WebWindowComplex
m_SashType = SashType;
}
- private ObservableCollection m_JointList = new ObservableCollection();
- public ObservableCollection JointList
+ private List m_JointList = new List();
+ public List JointList
{
get
{
@@ -1039,8 +1035,36 @@ namespace WebWindowComplex
}
}
- private ObservableCollection m_HardwareList = new ObservableCollection();
- public ObservableCollection HardwareList
+ private string m_SelFamilyHardware;
+ public string SelFamilyHardware
+ {
+ get
+ {
+ return m_SelFamilyHardware;
+ }
+ set
+ {
+ m_SelFamilyHardware = value;
+ RefreshHardwareList();
+ RefreshHardwareOptionList();
+ SetFirstHardware();
+ m_ParentWindow.OnUpdatePreview(m_ParentWindow.sSerialized());
+ }
+ }
+
+ internal string SetSelFamilyHardwareFromIndex(string idHardware)
+ {
+ if (string.IsNullOrEmpty(m_SelFamilyHardware))
+ {
+ SelFamilyHardware = (m_HardwareCompleteList
+ .Where(x => x.Id == idHardware)
+ .First()).FamilyName;
+ }
+ return SelFamilyHardware;
+ }
+
+ private List m_HardwareList = new List();
+ public List HardwareList
{
get
{
@@ -1138,30 +1162,23 @@ namespace WebWindowComplex
internal void SetSelHardwareFromId(string sId)
{
if (m_HardwareList.Count == 0)
- m_SelHardware = m_HardwareCompleteList.FirstOrDefault(x => x.Id == sId) ?? new Hardware("", "", "", "", "", 0, 0);
+ m_SelHardware = m_HardwareCompleteList.FirstOrDefault(x => x.Id.Equals(sId)) ?? new Hardware("", "", "", "", "", 0, 0);
else
- m_SelHardware = m_HardwareList.FirstOrDefault(x => x.Id == sId) ?? new Hardware("", "", "", "", "", 0, 0);
+ m_SelHardware = m_HardwareList.FirstOrDefault(x => x.Id.Equals(sId)) ?? new Hardware("", "", "", "", "", 0, 0);
if (m_SelHardware == null)
m_SelHardware = m_HardwareList[0];
- //Sash.s_SelFamilyHW = m_SelHardware.FamilyName;
+ //SelFamilyHardware = m_SelHardware.FamilyName;
}
- public int SelHardwareTypeIndex
+ public string SelHardwareFromId
{
get
{
- for (int i = 0; i < m_HardwareList.Count; i++)
- {
- if (m_HardwareList[i].Equals(m_SelHardware))
- return i;
- }
- return 0;
- //return IdNameStruct.IndFromId((int)m_SelHardware, m_HardwareList);
+ return m_SelHardware.Id;
}
set
{
- m_SelHardware = m_HardwareList[value];
- //m_SelOpeningType = (Openings)IdNameStruct.IdFromInd(value, m_OpeningTypeList);
+ m_SelHardware = m_HardwareList.FirstOrDefault(x => !string.IsNullOrEmpty(value) && x.Id.Equals(value)) ?? new Hardware("", "", "", "", "", 0, 0);
ParentWindow.OnUpdatePreview(ParentWindow.sSerialized());
}
}
@@ -1174,8 +1191,8 @@ namespace WebWindowComplex
}
}
- private ObservableCollection m_HwdOptionList = new ObservableCollection();
- public ObservableCollection HwdOptionList
+ private List m_HwdOptionList = new List();
+ public List HwdOptionList
{
get
{
@@ -1200,6 +1217,7 @@ namespace WebWindowComplex
newSash.JointList.Add(new Joint(newSash, JointIndex + 1, Joints.FULL_H));
newSash.SetSashBottomRail(false);
newSash.SetSashBottomRailQty(0);
+ newSash.SelFamilyHardware = Sash.s_FamilyHardwareList.First();
newSash.RefreshHardwareList();
newSash.RefreshHardwareOptionList();
newSash.SetFirstHardware();
@@ -1270,9 +1288,9 @@ namespace WebWindowComplex
if (m_SashList[i].bHasHandle)
{
if (GetOpeningType(m_SashList[i].OpeningType) == OpeningTypes.TURNONLY)
- return "ANTA_BANDIERA";
+ return "AB";
else
- return "ANTA_RIBALTA";
+ return "AR";
}
}
@@ -1284,27 +1302,27 @@ namespace WebWindowComplex
{
case OpeningTypes.TILTTURN:
{
- return "ANTA_RIBALTA";
+ return "AR";
}
case OpeningTypes.TURNONLY:
{
- return "ANTA_BANDIERA";
+ return "AB";
}
case OpeningTypes.TILTONLY:
{
- return "VASISTAS";
+ return "VA";
}
case OpeningTypes.PIVOT:
{
- return "PIVOT";
+ return "BI";
}
case OpeningTypes.COMPLANARSLIDE:
{
- return "COMPLANARE";
+ return "CO";
}
case OpeningTypes.LIFTSLIDE:
{
- return "ALZANTE_SCORREVOLE";
+ return "AS";
}
default:
{
@@ -1325,22 +1343,17 @@ namespace WebWindowComplex
var iComp = StringComparison.InvariantCultureIgnoreCase;
var rawList = m_HardwareCompleteList
.Where(x => x.Id == "000000" ||
- (!string.IsNullOrEmpty(s_SelFamilyHW) && x.FamilyName.Equals(s_SelFamilyHW, 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.Equals(sOpeningType, iComp))
)
.ToList();
if (rawList != null && rawList.Count > 0)
{
- m_HardwareList = new ObservableCollection(rawList);
+ m_HardwareList = new List(rawList);
}
else
{
- m_HardwareList = new ObservableCollection();
+ m_HardwareList = new List();
}
-#if false
- m_HardwareList = new ObservableCollection(from Hardware in m_HardwareCompleteList
- where Hardware.Id == "000000" || (Hardware.FamilyName == s_SelFamilyHW && Hardware.SashQty == nSashQty && Hardware.Shape == sSashShape && Hardware.OpeningType == sOpeningType)
- select Hardware);
-#endif
}
}
@@ -1389,6 +1402,7 @@ namespace WebWindowComplex
newSash.SetIsSashVertical(bIsSashVertical);
newSash.SetOrientationSashType(OrientationSashType);
newSash.SetSashBottomRailQty(SashBottomRailQty);
+ newSash.SetSelFamilyHardwareFromIndex(SelHardware.Id);
newSash.RefreshHardwareList();
newSash.RefreshHardwareOptionList();
newSash.SetSelHardware(SelHardware);
@@ -1682,14 +1696,14 @@ namespace WebWindowComplex
}
}
- private ObservableCollection m_SplitShapeList = new ObservableCollection
+ private List m_SplitShapeList = new List
{
new IdNameStruct((int)SplitShapes.VERTICAL, "Vertical"),
new IdNameStruct((int)SplitShapes.HORIZONTAL, "Horizontal"),
new IdNameStruct((int)SplitShapes.GRID, "Grid"),
new IdNameStruct((int)SplitShapes.CUSTOM, "Custom")
};
- public ObservableCollection SplitShapeList
+ public List SplitShapeList
{
get
{
@@ -1764,8 +1778,8 @@ namespace WebWindowComplex
}
}
- private ObservableCollection m_SplitPositionList = new ObservableCollection();
- public ObservableCollection SplitPositionList
+ private List m_SplitPositionList = new List();
+ public List SplitPositionList
{
get
{
@@ -1777,8 +1791,8 @@ namespace WebWindowComplex
}
}
- private ObservableCollection m_SplitVertList = new ObservableCollection();
- public ObservableCollection SplitVertList
+ private List m_SplitVertList = new List();
+ public List SplitVertList
{
get
{
@@ -1790,8 +1804,8 @@ namespace WebWindowComplex
}
}
- private ObservableCollection m_SplitHorizList = new ObservableCollection();
- public ObservableCollection SplitHorizList
+ private List m_SplitHorizList = new List();
+ public List SplitHorizList
{
get
{
@@ -1916,6 +1930,7 @@ namespace WebWindowComplex
return m_FillTypeList;
}
}
+
private FillTypes m_SelFillType;
public FillTypes SelFillType
{
@@ -2751,23 +2766,6 @@ namespace WebWindowComplex
return Name;
}
- public static int IndFromId(int Id, ObservableCollection List)
- {
- checked
- {
- int num = List.Count - 1;
- for (int i = 0; i <= num; i++)
- {
- if (List[i].Id == Id)
- {
- return i;
- }
- }
-
- return 0;
- }
- }
-
public static int IndFromId(int Id, List List)
{
checked
@@ -2785,33 +2783,11 @@ namespace WebWindowComplex
}
}
- public static int IdFromInd(int Ind, ObservableCollection List)
- {
- return List[Ind].Id;
- }
-
public static int IdFromInd(int Ind, List List)
{
return List[Ind].Id;
}
- public static int IndFromId(int Id, ObservableCollection