diff --git a/WebWindowComplex/AreaFrame.razor b/WebWindowComplex/AreaFrame.razor
new file mode 100644
index 0000000..6920bad
--- /dev/null
+++ b/WebWindowComplex/AreaFrame.razor
@@ -0,0 +1,26 @@
+
+
+
+
+
Area frame
+
+
+ @if (CurrSashList.Count == 0 && CurrSplitList.Count == 0)
+ {
+
+
+
+
+ }
+
+
+ @if (!(CurrFrameWindow.AreaList[0] is Split))
+ {
+
+
+
+ }
+
+
+
+
\ No newline at end of file
diff --git a/WebWindowComplex/AreaFrame.razor.cs b/WebWindowComplex/AreaFrame.razor.cs
new file mode 100644
index 0000000..e48429e
--- /dev/null
+++ b/WebWindowComplex/AreaFrame.razor.cs
@@ -0,0 +1,48 @@
+using Microsoft.AspNetCore.Components;
+
+namespace WebWindowComplex
+{
+ public partial class AreaFrame
+ {
+ #region Public Properties
+
+ [Parameter]
+ public Frame CurrFrameWindow { get; set; } = null!;
+
+ [Parameter]
+ public List CurrSashList { get; set; } = null!;
+
+ [Parameter]
+ public List CurrSplitList { get; set; } = null!;
+
+ [Parameter]
+ public EventCallback EC_AddSash { get; set; }
+
+ [Parameter]
+ public EventCallback EC_AddWindow { get; set; }
+
+ #endregion Public Properties
+
+ #region Private Methods
+
+ ///
+ /// Sollevo evento richiesta aggiunta sash
+ ///
+ ///
+ private async Task RaiseAddSash()
+ {
+ await EC_AddSash.InvokeAsync(true);
+ }
+
+ ///
+ /// Sollevo evento richiesta aggiunta window
+ ///
+ ///
+ private async Task RaiseAddWindow()
+ {
+ await EC_AddWindow.InvokeAsync(true);
+ }
+
+ #endregion Private Methods
+ }
+}
\ No newline at end of file
diff --git a/WebWindowComplex/TableComp.razor b/WebWindowComplex/TableComp.razor
index 8b262f7..12f75c3 100644
--- a/WebWindowComplex/TableComp.razor
+++ b/WebWindowComplex/TableComp.razor
@@ -280,7 +280,7 @@
@if (!(FrameWindow.AreaList[0] is Split) || (SashList.Count == 0 && SplitList.Count == 0))
{
- *@
+
+
}
@@ -781,7 +783,7 @@
-
+
@foreach (var Index in SashList)
diff --git a/WebWindowComplex/TableComp.razor.cs b/WebWindowComplex/TableComp.razor.cs
index 40d9aa1..caa3695 100644
--- a/WebWindowComplex/TableComp.razor.cs
+++ b/WebWindowComplex/TableComp.razor.cs
@@ -857,7 +857,7 @@ namespace WebWindowComplex
private void AddSashToFrame(Frame f)
{
- bError = f.AddSash();
+ bError = f.AddFirstSash();
}
///
diff --git a/WebWindowComplex/WebWindowComplex.csproj b/WebWindowComplex/WebWindowComplex.csproj
index b323ddc..31f6316 100644
--- a/WebWindowComplex/WebWindowComplex.csproj
+++ b/WebWindowComplex/WebWindowComplex.csproj
@@ -6,7 +6,7 @@
net8.0
enable
enable
- 2.7.10.1010
+ 2.7.10.1011
Annamaria Sassi
Egalware
Componente gestione Configurazioni avanzate Window per LUX
@@ -170,6 +170,12 @@
+
+
+
+
+
+
diff --git a/WebWindowComplex/Window.cs b/WebWindowComplex/Window.cs
index 614ff83..2ddbd63 100644
--- a/WebWindowComplex/Window.cs
+++ b/WebWindowComplex/Window.cs
@@ -265,52 +265,72 @@ namespace WebWindowComplex
ParentWindow.OnUpdatePreview(ParentWindow.sSerialized());
}
- public bool AddSash()
+ public bool AddFirstSash()
{
+ bool answ = false;
// Salvo il parent
Area ParentArea = AreaList[0].ParentArea;
// Creo area sash di default
Sash SashArea = Sash.CreateSash(ParentArea);
- SashArea.SelFamilyHardware = Sash.s_FamilyHardwareList.First();
- SashArea.RefreshHardwareList();
- if (SashArea.HardwareList.Count == 0)
+ // ricerco tra ttuti gli hw disponibili...
+ string sShape = FindSashShape();
+ var listHwValid = Sash
+ .m_HardwareCompleteList
+ .Where(x => x.Shape == sShape && x.SashQty == 1)
+ .FirstOrDefault();
+ if (listHwValid != null)
{
- SashArea.Remove();
- return true;
- }
- else
- {
- SashArea.SetSelHardwareFromId(SashArea.HardwareList.First().Id);
- // Salvo gli oggetti già presenti e li cancello da AreaList
- List ContentArea = new List();
- ContentArea.Add(AreaList[0]);
- AreaList.Remove(AreaList[0]);
- // Aggiungo area
- AreaList.Add(SashArea);
- if (SashArea.nSashQty == 1)
+ // seleziono la famiglia del primo hw trovato...
+ SashArea.SelFamilyHardware = listHwValid.FamilyName;
+ SashArea.RefreshHardwareList();
+ if (SashArea.HardwareList.Count == 0)
{
- // Inserisco il riempimento precedente
- AreaList[0].AreaList.Add(ContentArea[0]);
- AreaList[0].AreaList[0].SetParentArea(AreaList[0]);
+ SashArea.Remove();
+ answ = true;
}
else
{
- // All'area Sash aggiunto uno Splitted per ogni anta
- for (int i = 1; i < SashArea.nSashQty; i++)
+ SashArea.SetSelHardwareFromId(SashArea.HardwareList.First().Id);
+ // Salvo gli oggetti già presenti e li cancello da AreaList
+ List ContentArea = new List();
+ ContentArea.Add(AreaList[0]);
+ AreaList.Remove(AreaList[0]);
+ // Aggiungo area
+ AreaList.Add(SashArea);
+ if (SashArea.nSashQty == 1)
{
- AreaList[0].AreaList.Add(Splitted.CreateSplitted(SashArea));
+ // Inserisco il riempimento precedente
+ AreaList[0].AreaList.Add(ContentArea[0]);
+ AreaList[0].AreaList[0].SetParentArea(AreaList[0]);
}
- Fill fill2 = (Fill)ContentArea[0];
- for (int i = 1; i < SashArea.nSashQty; i++)
+ else
{
- AreaList[0].AreaList[1].AreaList.Add(Fill.CreateFill(AreaList[0].AreaList[1], fill2.FillType));
+ // 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());
}
- ParentWindow.OnUpdatePreview(ParentWindow.sSerialized());
- return false;
}
+ return answ;
}
+
+ ///
+ /// MockUp chiamata a c++ x scelta forma sash per Hw
+ ///
+ ///
+ private string FindSashShape()
+ {
+ return "Rectangular";
+ }
public void SwapAree()
{
Area tempArea;
@@ -1062,12 +1082,12 @@ namespace WebWindowComplex
}
}
- internal string SetSelFamilyHardwareFromIndex(string idHardware)
+ internal string SetSelFamilyHardwareFromIndex(string codHardware)
{
if (string.IsNullOrEmpty(m_SelFamilyHardware))
{
SelFamilyHardware = (m_HardwareCompleteList
- .Where(x => x.Id == idHardware)
+ .Where(x => x.Id == codHardware)
.First()).FamilyName;
}
return SelFamilyHardware;
diff --git a/WebWindowConfigurator/WebWindowConfigurator.csproj b/WebWindowConfigurator/WebWindowConfigurator.csproj
index 33c9542..385b423 100644
--- a/WebWindowConfigurator/WebWindowConfigurator.csproj
+++ b/WebWindowConfigurator/WebWindowConfigurator.csproj
@@ -6,7 +6,7 @@
net8.0
enable
enable
- 2.7.10.1010
+ 2.7.10.1011
Annamaria Sassi
Egalware
Componente gestione JWD per LUX
@@ -206,6 +206,13 @@
+
+
+
+
+
+
+