From bd0e3536fb25ff95fc17195948b4e7ab614db113 Mon Sep 17 00:00:00 2001 From: Annamaria Sassi Date: Mon, 13 Oct 2025 10:41:03 +0200 Subject: [PATCH] Gestione componente AreaSplit in CardFill --- WebWindowComplex/Compo/AreaSplit.razor | 30 +++++++------- WebWindowComplex/Compo/AreaSplit.razor.cs | 21 ++++++++-- WebWindowComplex/Compo/CardFill.razor | 40 +++++++++++-------- WebWindowComplex/Compo/CardFill.razor.cs | 24 +++++++---- WebWindowComplex/Compo/General.razor | 2 +- WebWindowComplex/TableComp.razor | 10 ++--- WebWindowComplex/TableComp.razor.cs | 5 ++- WebWindowComplex/WebWindowComplex.csproj | 13 +++++- .../WebWindowConfigurator.csproj | 16 +++++++- 9 files changed, 109 insertions(+), 52 deletions(-) diff --git a/WebWindowComplex/Compo/AreaSplit.razor b/WebWindowComplex/Compo/AreaSplit.razor index 2d36571..cf8a058 100644 --- a/WebWindowComplex/Compo/AreaSplit.razor +++ b/WebWindowComplex/Compo/AreaSplit.razor @@ -1,30 +1,30 @@ -
+
-
-
+
+
@if (CurrSplittedList.Count > 1) { -

Area split @(CurrSplittedList.IndexOf(CurrSplitted) + 1)

+
Area split @(CurrSplittedList.IndexOf(CurrSplitted) + 1)
} else { -

Area split

+
Area split
}
-
+
- @for (int j = 0; j < CurrSashList.Count; j++) - { - int Index = j; -
-
- -
-
- } +
+ @for (int j = 0; j < CurrSashList.Count; j++) + { + int Index = j; +
+ +
+ } +
diff --git a/WebWindowComplex/Compo/AreaSplit.razor.cs b/WebWindowComplex/Compo/AreaSplit.razor.cs index b8a2873..1c03182 100644 --- a/WebWindowComplex/Compo/AreaSplit.razor.cs +++ b/WebWindowComplex/Compo/AreaSplit.razor.cs @@ -1,4 +1,5 @@ -using Microsoft.AspNetCore.Components; +using Egw.Window.Data; +using Microsoft.AspNetCore.Components; using WebWindowComplex.Models; namespace WebWindowComplex.Compo @@ -17,7 +18,7 @@ namespace WebWindowComplex.Compo public List CurrSplittedList { get; set; } = null; [Parameter] - public EventCallback EC_CopySash { get; set; } + public EventCallback EC_CopySash { get; set; } #endregion Public Properties @@ -27,11 +28,23 @@ namespace WebWindowComplex.Compo /// Sollevo evento richiesta copia sash /// /// - private async Task RaiseCopySash(int indexCurrSash) + private async Task RaiseCopySash(Splitted item, int indexCurrSash) { - await EC_CopySash.InvokeAsync(indexCurrSash); + var Args = new Data + { + splitted = item, + index = indexCurrSash, + }; + await EC_CopySash.InvokeAsync(Args); } #endregion Private Methods + + } + + public class Data + { + public Splitted splitted { get; set; } + public int index { get; set; } } } \ No newline at end of file diff --git a/WebWindowComplex/Compo/CardFill.razor b/WebWindowComplex/Compo/CardFill.razor index b17024b..346943b 100644 --- a/WebWindowComplex/Compo/CardFill.razor +++ b/WebWindowComplex/Compo/CardFill.razor @@ -1,34 +1,41 @@  -
+
-
-
-

Fill @(CurrIndex + 1)

+
+
+
Fill @(CurrIndex + 1)
-
+
+ +
+
+
+
+
+
+
Select only current fill
+
+
-
+
-
-
-
-
-
-
Selected all fill
+
+
+
Selected all fill
-
+
-
+
@@ -38,7 +45,7 @@
@foreach (var currSplitted in SplittedList) { - @if (currSplitted.AreaList[0].Equals(CurrItem)) + @if (currSplitted.AreaList.First().Equals(CurrItem)) { @*
@@ -69,8 +76,7 @@
*@ - - @* *@ + } } diff --git a/WebWindowComplex/Compo/CardFill.razor.cs b/WebWindowComplex/Compo/CardFill.razor.cs index 6a36478..cc5cbe3 100644 --- a/WebWindowComplex/Compo/CardFill.razor.cs +++ b/WebWindowComplex/Compo/CardFill.razor.cs @@ -20,6 +20,12 @@ namespace WebWindowComplex.Compo [Parameter] public EventCallback EC_ChangeType { get; set; } + [Parameter] + public EventCallback EC_CopySash { get; set; } + + [Parameter] + public EventCallback EC_ReqClose { get; set; } + [Parameter] public List FillList { get; set; } = null!; @@ -29,6 +35,7 @@ namespace WebWindowComplex.Compo [Parameter] public List SplittedList { get; set; } = null!; + #endregion Public Properties #region Protected Methods @@ -43,6 +50,11 @@ namespace WebWindowComplex.Compo await EC_ChangeType.InvokeAsync(reqFillType); } + protected async Task CopySash(Data Args) + { + await EC_CopySash.InvokeAsync(Args); + } + #endregion Protected Methods #region Private Methods @@ -54,15 +66,13 @@ namespace WebWindowComplex.Compo private string buttonFillCss(FillTypes reqFillTypes) { return (FillList.ElementAt(CurrIndex).SelFillType == reqFillTypes) ? "btn btn-secondary btn-sm" : "btn btn-outline-secondary btn-sm"; - -#if false - if (FillList.ElementAt(CurrIndex).SelFillType == reqFillTypes) - return "btn btn-secondary btn-sm"; - else - return "btn btn-outline-secondary btn-sm"; -#endif } #endregion Private Methods + + private void ReqClose() + { + _ = EC_ReqClose.InvokeAsync(true); + } } } \ No newline at end of file diff --git a/WebWindowComplex/Compo/General.razor b/WebWindowComplex/Compo/General.razor index d041093..1dadeb1 100644 --- a/WebWindowComplex/Compo/General.razor +++ b/WebWindowComplex/Compo/General.razor @@ -1,5 +1,5 @@  -
+
diff --git a/WebWindowComplex/TableComp.razor b/WebWindowComplex/TableComp.razor index b9435fe..3777e8a 100644 --- a/WebWindowComplex/TableComp.razor +++ b/WebWindowComplex/TableComp.razor @@ -40,7 +40,7 @@
-
+
-
+
@if (currStep != CompileStep.Template) { }
-
+
-
+
@@ -696,7 +696,7 @@ else { Fill item = FillList[currFill]; - + } } else if (currStep == CompileStep.General) diff --git a/WebWindowComplex/TableComp.razor.cs b/WebWindowComplex/TableComp.razor.cs index 736fbd4..7d982e0 100644 --- a/WebWindowComplex/TableComp.razor.cs +++ b/WebWindowComplex/TableComp.razor.cs @@ -2,6 +2,7 @@ using Microsoft.AspNetCore.Components; using Newtonsoft.Json; using System.Reflection.Metadata; +using WebWindowComplex.Compo; using WebWindowComplex.DTO; using WebWindowComplex.Json; using WebWindowComplex.Models; @@ -974,8 +975,10 @@ namespace WebWindowComplex /// Area Splitted corrente /// Indice della Sash che si vuole copiare /// - private async Task CopySash(Splitted currSplitted, int numSash) + private async Task CopySash(Data Args) { + Splitted currSplitted = Args.splitted; + int numSash = Args.index; //Rimuovo contenuto di Splitted e rimuovo area da conteggio gruppi currSplitted.AreaList.RemoveAll(i => i != null); //Area.DelCounterGroup(); diff --git a/WebWindowComplex/WebWindowComplex.csproj b/WebWindowComplex/WebWindowComplex.csproj index 01136b3..e6c1883 100644 --- a/WebWindowComplex/WebWindowComplex.csproj +++ b/WebWindowComplex/WebWindowComplex.csproj @@ -6,7 +6,7 @@ net8.0 enable enable - 2.7.10.1017 + 2.7.10.1310 Annamaria Sassi Egalware Componente gestione Configurazioni avanzate Window per LUX @@ -49,6 +49,17 @@ + + + + + + + + + + + diff --git a/WebWindowConfigurator/WebWindowConfigurator.csproj b/WebWindowConfigurator/WebWindowConfigurator.csproj index 0b24817..d3afbe3 100644 --- a/WebWindowConfigurator/WebWindowConfigurator.csproj +++ b/WebWindowConfigurator/WebWindowConfigurator.csproj @@ -6,7 +6,7 @@ net8.0 enable enable - 2.7.10.1017 + 2.7.10.1310 Annamaria Sassi Egalware Componente gestione JWD per LUX @@ -80,6 +80,20 @@ + + + + + + + + + + + + + +