From 55a84780a8185ec15a2dfd098c61ef9f4dd2b240 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Fri, 10 Oct 2025 12:18:07 +0200 Subject: [PATCH] Spostato blocco general in compoente indipendente --- WebWindowComplex/General.razor | 92 ++++++++++++++ WebWindowComplex/General.razor.cs | 102 +++++++++++++++ WebWindowComplex/TableComp.razor | 118 +----------------- WebWindowComplex/TableComp.razor.cs | 21 ++++ WebWindowComplex/WebWindowComplex.csproj | 5 +- .../WebWindowConfigurator.csproj | 6 +- 6 files changed, 225 insertions(+), 119 deletions(-) create mode 100644 WebWindowComplex/General.razor create mode 100644 WebWindowComplex/General.razor.cs diff --git a/WebWindowComplex/General.razor b/WebWindowComplex/General.razor new file mode 100644 index 0000000..b8264d3 --- /dev/null +++ b/WebWindowComplex/General.razor @@ -0,0 +1,92 @@ + +
+
+
+
+
+
+
+
+
+
General
+
+
+
+
+
+ + +
+
+ + +
+
+
+
+
+
+
+
Fill type
+
+
+
+ + +
+
+ + +
+
+
+
+
+
Color
+
+
+
+ + +
+
+ + +
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file diff --git a/WebWindowComplex/General.razor.cs b/WebWindowComplex/General.razor.cs new file mode 100644 index 0000000..4eb2303 --- /dev/null +++ b/WebWindowComplex/General.razor.cs @@ -0,0 +1,102 @@ +using Microsoft.AspNetCore.Components; +using WebWindowComplex.DTO; + +namespace WebWindowComplex +{ + public partial class General + { + #region Public Properties + + /// + /// Finestra corrente + /// + [Parameter] + public Window CurrWindow { get; set; } = null!; + + [Parameter] + public EventCallback EC_SelColor { get; set; } + + [Parameter] + public EventCallback EC_SelGlass { get; set; } + + [Parameter] + public EventCallback EC_SelWindMat { get; set; } + + /// + /// Elenco anagrafiche di base + /// + [Parameter] + public BaseListPayload ListPayload { get; set; } = null!; + + /// + /// Elenco Warnings attivi + /// + [Parameter] + public Dictionary ListWarnings { get; set; } = new Dictionary(); + + #endregion Public Properties + + #region Protected Properties + + protected string CurrColor + { + get => currColor; + set + { + currColor = value; + _ = EC_SelColor.InvokeAsync(value); + } + } + + protected string CurrGlass + { + get => currGlass; + set + { + currGlass = value; + _ = EC_SelGlass.InvokeAsync(value); + } + } + + protected string CurrMaterial + { + get => currMaterial; + set + { + currMaterial = value; + _ = EC_SelWindMat.InvokeAsync(value); + } + } + + #endregion Protected Properties + + #region Protected Methods + + /// + /// Calcola CSS warning + /// + /// + /// + protected string cssValid(string fKey) + { + return ListWarnings.ContainsKey(fKey) ? "border border-danger" : ""; + } + + protected override void OnParametersSet() + { + currColor = CurrWindow.sColorMaterial; + currGlass = CurrWindow.sGlass; + currMaterial = CurrWindow.sMaterial; + } + + #endregion Protected Methods + + #region Private Fields + + private string currColor = ""; + private string currGlass = ""; + private string currMaterial = ""; + + #endregion Private Fields + } +} \ No newline at end of file diff --git a/WebWindowComplex/TableComp.razor b/WebWindowComplex/TableComp.razor index 12f75c3..021ecc7 100644 --- a/WebWindowComplex/TableComp.razor +++ b/WebWindowComplex/TableComp.razor @@ -280,32 +280,6 @@ @if (!(FrameWindow.AreaList[0] is Split) || (SashList.Count == 0 && SplitList.Count == 0)) { - @*
-
-
-
-

Area frame

-
-
- @if (SashList.Count == 0 && SplitList.Count == 0) - { - -
- -
- } -
-
- @if (!(FrameWindow.AreaList[0] is Split)) - { -
- -
- } -
-
-
-
*@ } @@ -810,97 +784,7 @@ } else if (currStep == CompileStep.General) { -
-
-
-
-
-
-
-
-
-
General
-
-
-
-
-
- - -
-
- - -
-
-
-
-
-
-
-
Fill type
-
-
-
- - -
-
- - -
-
-
-
-
-
Color
-
-
-
- - -
-
- - -
-
-
-
-
-
-
-
-
-
-
+ } diff --git a/WebWindowComplex/TableComp.razor.cs b/WebWindowComplex/TableComp.razor.cs index caa3695..4505d2e 100644 --- a/WebWindowComplex/TableComp.razor.cs +++ b/WebWindowComplex/TableComp.razor.cs @@ -1191,5 +1191,26 @@ namespace WebWindowComplex } #endregion Private Methods + private void SelectColor(string newVal) + { + if (m_CurrWindow != null) + { + m_CurrWindow.sColorMaterial = newVal; + } + } + private void SelectMat(string newVal) + { + if (m_CurrWindow != null) + { + m_CurrWindow.sMaterial = newVal; + } + } + private void SelectGlass(string newVal) + { + if (m_CurrWindow != null) + { + m_CurrWindow.sGlass = newVal; + } + } } } \ No newline at end of file diff --git a/WebWindowComplex/WebWindowComplex.csproj b/WebWindowComplex/WebWindowComplex.csproj index 31f6316..9392c8c 100644 --- a/WebWindowComplex/WebWindowComplex.csproj +++ b/WebWindowComplex/WebWindowComplex.csproj @@ -6,7 +6,7 @@ net8.0 enable enable - 2.7.10.1011 + 2.7.10.1012 Annamaria Sassi Egalware Componente gestione Configurazioni avanzate Window per LUX @@ -179,6 +179,9 @@ + + + diff --git a/WebWindowConfigurator/WebWindowConfigurator.csproj b/WebWindowConfigurator/WebWindowConfigurator.csproj index 385b423..dd40bd5 100644 --- a/WebWindowConfigurator/WebWindowConfigurator.csproj +++ b/WebWindowConfigurator/WebWindowConfigurator.csproj @@ -6,7 +6,7 @@ net8.0 enable enable - 2.7.10.1011 + 2.7.10.1012 Annamaria Sassi Egalware Componente gestione JWD per LUX @@ -216,6 +216,10 @@ + + + +