From 353ab3d5d134d7730523ac7c0d7697428cea947f Mon Sep 17 00:00:00 2001 From: Annamaria Sassi Date: Wed, 12 Aug 2026 10:07:23 +0200 Subject: [PATCH] - Aggiunte icone dimensioni elementi - Iniziato ad impostare traduzioni --- Test.UI/Components/Pages/EditJWD.razor | 4 +- Test.UI/Components/Pages/EditJWD.razor.cs | 24 +++++ WebWindowComplex/Compo/AreaSash.razor | 64 ++++++------- WebWindowComplex/Compo/CardFrame.razor | 89 ++++++++----------- WebWindowComplex/Compo/CardFrame.razor.cs | 34 +++++++ WebWindowComplex/Compo/EditElement.razor | 5 +- WebWindowComplex/Compo/EditElement.razor.cs | 23 ++--- WebWindowComplex/TableComp.razor | 4 +- WebWindowComplex/TableComp.razor.cs | 22 +++++ WebWindowComplex/WebWindowComplex.csproj | 23 ++++- .../wwwroot/icone/element/Bottom.svg | 35 ++++++++ .../wwwroot/icone/element/Left.svg | 35 ++++++++ .../wwwroot/icone/element/Right.svg | 35 ++++++++ .../wwwroot/icone/element/Top.svg | 35 ++++++++ .../icone/joint/shape/BottomLeft/Angled.svg | 6 +- .../icone/joint/shape/BottomLeft/Full H.svg | 6 +- .../icone/joint/shape/BottomLeft/Full V.svg | 6 +- .../WebWindowConfigurator.csproj | 9 +- 18 files changed, 345 insertions(+), 114 deletions(-) create mode 100644 WebWindowComplex/wwwroot/icone/element/Bottom.svg create mode 100644 WebWindowComplex/wwwroot/icone/element/Left.svg create mode 100644 WebWindowComplex/wwwroot/icone/element/Right.svg create mode 100644 WebWindowComplex/wwwroot/icone/element/Top.svg diff --git a/Test.UI/Components/Pages/EditJWD.razor b/Test.UI/Components/Pages/EditJWD.razor index 8f31649..faabf65 100644 --- a/Test.UI/Components/Pages/EditJWD.razor +++ b/Test.UI/Components/Pages/EditJWD.razor @@ -73,10 +73,12 @@ LiveData="CurrData" PendReq="DictPendReq" baseUser="User" + Vocabulary="TradVocabulary" EC_ActionReq="DoAction" EC_DoUpdate="ExecRequest" EC_OnClose="CloseObj" - EC_UpdateReqPend="PendAction"> + EC_UpdateReqPend="PendAction" + EC_ReqTraduzione="Traduzione"> } else diff --git a/Test.UI/Components/Pages/EditJWD.razor.cs b/Test.UI/Components/Pages/EditJWD.razor.cs index 05ca811..0c9e247 100644 --- a/Test.UI/Components/Pages/EditJWD.razor.cs +++ b/Test.UI/Components/Pages/EditJWD.razor.cs @@ -40,6 +40,8 @@ namespace Test.UI.Components.Pages /// protected Dictionary DictPendReq = new(); + protected Dictionary TradVocabulary = new(); + /// /// Livello di accesso /// -- true: utente base (versione semplificata) @@ -320,6 +322,28 @@ namespace Test.UI.Components.Pages } + private void Traduzione(List args) + { + if(!TradVocabulary.ContainsKey("ConfWind_Frame")) + TradVocabulary.Add("ConfWind_Frame", "Telaio"); + if (!TradVocabulary.ContainsKey("ConfWind_Shape")) + TradVocabulary.Add("ConfWind_Shape", "Forma"); + if (!TradVocabulary.ContainsKey("ConfWind_Dimension")) + TradVocabulary.Add("ConfWind_Dimension", "Dimensioni"); + if (!TradVocabulary.ContainsKey("ConfWind_Threshold")) + TradVocabulary.Add("ConfWind_Threshold", "Soglia"); + if (!TradVocabulary.ContainsKey("ConfWind_Tipology")) + TradVocabulary.Add("ConfWind_Tipology", "Tipolgia"); + if (!TradVocabulary.ContainsKey("ConfWind_BottomRail")) + TradVocabulary.Add("ConfWind_BottomRail", "Zoccolo"); + if (!TradVocabulary.ContainsKey("ConfWind_Quantity")) + TradVocabulary.Add("ConfWind_Quantity", "Quantità"); + if (!TradVocabulary.ContainsKey("ConfWind_Joints")) + TradVocabulary.Add("ConfWind_Joints", "Giunzioni"); + if (!TradVocabulary.ContainsKey("ConfWind_Element")) + TradVocabulary.Add("ConfWind_Element", "Elementi"); + } + private void ConfInit() { apiUrl = Config.GetValue("ServerConf:Prog.ApiUrl") ?? ""; diff --git a/WebWindowComplex/Compo/AreaSash.razor b/WebWindowComplex/Compo/AreaSash.razor index 65fea60..bca0049 100644 --- a/WebWindowComplex/Compo/AreaSash.razor +++ b/WebWindowComplex/Compo/AreaSash.razor @@ -259,51 +259,43 @@ @* Joint top left e joint top right *@ @for (int i = CurrSashDim.JointList.Count - 1; i >= 2; i--) { - @if (CurrSashDim.JointList.Count <= 4) - { -
- -
- } - else if (CurrSashDim.JointList.Count > 4) - { -
- -
- } +
+ +
} @* Joint bottom left e joint bottom right *@ - @if (CurrSashDim.JointList.Count <= 4) - { -
- -
-
- -
- } - else if (CurrSashDim.JointList.Count > 4) - { -
- -
-
- -
- } +
+ +
+
+ +
-
+
Element
-
- @foreach (var element in CurrSashDim.ElementDimensionList) - { - - } +
+
+ @foreach (var element in CurrSashDim.ElementDimensionList) + { + @if (CurrSashDim.ElementDimensionList.Count <= 4) + { +
+ +
+ } + else + { +
+ +
+ } + } +
diff --git a/WebWindowComplex/Compo/CardFrame.razor b/WebWindowComplex/Compo/CardFrame.razor index a90a433..99a9b79 100644 --- a/WebWindowComplex/Compo/CardFrame.razor +++ b/WebWindowComplex/Compo/CardFrame.razor @@ -4,7 +4,7 @@
-
Frame
+
@Traduci("ConfWind_Frame")
@@ -24,7 +24,7 @@ else {
-
Shape
+
@Traduci("ConfWind_Shape")
@foreach (var i in CurrFrameWindow.ShapeList) @@ -34,15 +34,6 @@
- @*
- -
*@ }
} @@ -52,7 +43,7 @@
-
Dimension
+
@Traduci("ConfWind_Dimension")
@foreach (FrameDimension dimension in CurrFrameWindow.DimensionList) @@ -67,17 +58,17 @@
-
Threshold
+
@Traduci("ConfWind_Threshold")
@if (User) { - Tipology + @Traduci("ConfWind_Tipology") } else { - + @@ -116,7 +107,7 @@
-
Joints
+
@Traduci("ConfWind_Joints")
@if (!User) { @@ -125,10 +116,10 @@
} @@ -137,50 +128,40 @@ @* Joint top left e joint top right *@ @for (int i = CurrFrameWindow.JointList.Count - 1; i >= 2; i--) { - @if (CurrFrameWindow.JointList.Count <= 4) - { -
- -
- } - else if (CurrFrameWindow.JointList.Count > 4) - { -
- -
- } +
+ +
} @* Joint bottom left e joint bottom right *@ - @if (CurrFrameWindow.JointList.Count <= 4) - { -
- -
-
- -
- } - else if (CurrFrameWindow.JointList.Count > 4) - { -
- -
-
- -
- } +
+ +
+
+ +
-
+
-
Element
+
@Traduci("ConfWind_Element")
-
+
@foreach (var element in CurrFrameWindow.ElementDimensionList) { - + @if (CurrFrameWindow.ElementDimensionList.Count <= 4) + { +
+ +
+ } + else + { +
+ +
+ } }
diff --git a/WebWindowComplex/Compo/CardFrame.razor.cs b/WebWindowComplex/Compo/CardFrame.razor.cs index b4db166..36e0d6a 100644 --- a/WebWindowComplex/Compo/CardFrame.razor.cs +++ b/WebWindowComplex/Compo/CardFrame.razor.cs @@ -38,6 +38,12 @@ namespace WebWindowComplex.Compo [Parameter] public EventCallback EC_ReqElement { get; set; } + /// + /// Evento per richiesta traduzione + /// + [Parameter] + public EventCallback> EC_ReqTraduzione { get; set; } + /// /// Frame corrente /// @@ -62,8 +68,23 @@ namespace WebWindowComplex.Compo [CascadingParameter(Name = "User")] public bool User { get; set; } = false!; + /// + /// Evento per richiesta profili degli Element + /// + [Parameter] + public Dictionary Vocabulary { get; set; } + #endregion Public Properties + protected override void OnInitialized() + { + if(Vocabulary == null || Vocabulary.Count == 0) + { + List tradList = new List() { "ConfWind_Frame", "ConfWind_Shape", "ConfWind_Dimension", "ConfWind_Threshold", "ConfWind_Tipology", "ConfWind_BottomRail", "ConfWind_Quantity", "ConfWind_Joints", "ConfWind_Element" }; + _ = EC_ReqTraduzione.InvokeAsync(); + } + } + #region Protected Properties private string GetImageFrameShapePath(string fileName) => $"_content/Egw.Lux.WebWindowComplex/icone/frame/shape/{fileName}.svg"; @@ -410,6 +431,19 @@ namespace WebWindowComplex.Compo return "col-md-12 col-lg-4"; } + private string Traduci(string lemma) + { + string ans = ""; + if(Vocabulary != null && Vocabulary.ContainsKey(lemma)) + { + ans = Vocabulary.GetValueOrDefault(lemma) ?? ""; + } + else + { + ans = lemma; + } + return ans; + } #endregion Private Methods } diff --git a/WebWindowComplex/Compo/EditElement.razor b/WebWindowComplex/Compo/EditElement.razor index 8c97a1e..6d2fba2 100644 --- a/WebWindowComplex/Compo/EditElement.razor +++ b/WebWindowComplex/Compo/EditElement.razor @@ -1,6 +1,9 @@ @using static WebWindowComplex.LayoutConst
- @(name()) + @* @(name()) *@ + @if (User) { diff --git a/WebWindowComplex/Compo/EditElement.razor.cs b/WebWindowComplex/Compo/EditElement.razor.cs index 175e1b2..761fe6a 100644 --- a/WebWindowComplex/Compo/EditElement.razor.cs +++ b/WebWindowComplex/Compo/EditElement.razor.cs @@ -29,6 +29,9 @@ namespace WebWindowComplex.Compo #endregion Public Properties #region Private Properties + + private string GetImageElementPath(string fileName) => $"_content/Egw.Lux.WebWindowComplex/icone/element/{fileName}.svg"; + /// /// Metodo per aggiornare nome element corrente /// @@ -53,19 +56,19 @@ namespace WebWindowComplex.Compo { case 1: { - return "B"; + return "Bottom"; } case 2: { - return "R"; + return "Right"; } case 3: { - return "T"; + return "Top"; } case 4: { - return "L"; + return "Left"; } } break; @@ -76,11 +79,11 @@ namespace WebWindowComplex.Compo { case 1: { - return "B"; + return "Bottom"; } case 2: { - return "R"; + return "Right"; } case 3: { @@ -92,7 +95,7 @@ namespace WebWindowComplex.Compo } case 5: { - return "L"; + return "Left"; } } break; @@ -103,11 +106,11 @@ namespace WebWindowComplex.Compo { case 1: { - return "B"; + return "Bottom"; } case 2: { - return "R"; + return "Right"; } case 3: { @@ -123,7 +126,7 @@ namespace WebWindowComplex.Compo } case 6: { - return "L"; + return "Left"; } } break; diff --git a/WebWindowComplex/TableComp.razor b/WebWindowComplex/TableComp.razor index 03d80f6..681a4b6 100644 --- a/WebWindowComplex/TableComp.razor +++ b/WebWindowComplex/TableComp.razor @@ -137,7 +137,9 @@ EC_ReqOptionHw="UpdateHwOptionsFrame" EC_ReqElement="UpdateElementFrame" EC_UpdateFrame="UpdatePreviewFrame" - EC_ReqClose="ReturnTree"> + EC_ReqClose="ReturnTree" + EC_ReqTraduzione="DoReqTraduzione" + Vocabulary="Vocabulary"> diff --git a/WebWindowComplex/TableComp.razor.cs b/WebWindowComplex/TableComp.razor.cs index 288af5b..2458a3d 100644 --- a/WebWindowComplex/TableComp.razor.cs +++ b/WebWindowComplex/TableComp.razor.cs @@ -114,6 +114,18 @@ namespace WebWindowComplex [Parameter] public Dictionary? PendReq { get; set; } = null; + /// + /// Richiesta traduzione + /// + [Parameter] + public EventCallback> EC_ReqTraduzione { get; set; } + + /// + /// Vocabolario lemma-traduzione + /// + [Parameter] + public Dictionary? Vocabulary { get; set; } = null; + #endregion Public Properties #region Public Methods @@ -970,6 +982,16 @@ namespace WebWindowComplex } } + /// + /// Richiesta chiusura SENZA salvataggio (= restore prev) + /// + /// + private Task DoReqTraduzione(List lemmaList) + { + Log.Info("Richiesta Traduzione"); + return EC_ReqTraduzione.InvokeAsync(lemmaList); + } + /// /// Richiesta update anteprima SVG /// diff --git a/WebWindowComplex/WebWindowComplex.csproj b/WebWindowComplex/WebWindowComplex.csproj index 33a2d0e..62f8230 100644 --- a/WebWindowComplex/WebWindowComplex.csproj +++ b/WebWindowComplex/WebWindowComplex.csproj @@ -6,7 +6,7 @@ net8.0 enable enable - 3.1.8.1116 + 3.1.8.1210 Annamaria Sassi Egalware Componente gestione Configurazioni avanzate Window per LUX @@ -103,6 +103,27 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/WebWindowComplex/wwwroot/icone/element/Bottom.svg b/WebWindowComplex/wwwroot/icone/element/Bottom.svg new file mode 100644 index 0000000..76dbaac --- /dev/null +++ b/WebWindowComplex/wwwroot/icone/element/Bottom.svg @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/WebWindowComplex/wwwroot/icone/element/Left.svg b/WebWindowComplex/wwwroot/icone/element/Left.svg new file mode 100644 index 0000000..5aee70b --- /dev/null +++ b/WebWindowComplex/wwwroot/icone/element/Left.svg @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/WebWindowComplex/wwwroot/icone/element/Right.svg b/WebWindowComplex/wwwroot/icone/element/Right.svg new file mode 100644 index 0000000..d5e6038 --- /dev/null +++ b/WebWindowComplex/wwwroot/icone/element/Right.svg @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/WebWindowComplex/wwwroot/icone/element/Top.svg b/WebWindowComplex/wwwroot/icone/element/Top.svg new file mode 100644 index 0000000..87ec41d --- /dev/null +++ b/WebWindowComplex/wwwroot/icone/element/Top.svg @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/WebWindowComplex/wwwroot/icone/joint/shape/BottomLeft/Angled.svg b/WebWindowComplex/wwwroot/icone/joint/shape/BottomLeft/Angled.svg index 7476eca..3af7e61 100644 --- a/WebWindowComplex/wwwroot/icone/joint/shape/BottomLeft/Angled.svg +++ b/WebWindowComplex/wwwroot/icone/joint/shape/BottomLeft/Angled.svg @@ -10,7 +10,7 @@ } - - - + + + \ No newline at end of file diff --git a/WebWindowComplex/wwwroot/icone/joint/shape/BottomLeft/Full H.svg b/WebWindowComplex/wwwroot/icone/joint/shape/BottomLeft/Full H.svg index 41c254c..d45e3f2 100644 --- a/WebWindowComplex/wwwroot/icone/joint/shape/BottomLeft/Full H.svg +++ b/WebWindowComplex/wwwroot/icone/joint/shape/BottomLeft/Full H.svg @@ -10,7 +10,7 @@ } - - - + + + \ No newline at end of file diff --git a/WebWindowComplex/wwwroot/icone/joint/shape/BottomLeft/Full V.svg b/WebWindowComplex/wwwroot/icone/joint/shape/BottomLeft/Full V.svg index c2a0d40..fe6b532 100644 --- a/WebWindowComplex/wwwroot/icone/joint/shape/BottomLeft/Full V.svg +++ b/WebWindowComplex/wwwroot/icone/joint/shape/BottomLeft/Full V.svg @@ -10,7 +10,7 @@ } - - - + + + \ No newline at end of file diff --git a/WebWindowConfigurator/WebWindowConfigurator.csproj b/WebWindowConfigurator/WebWindowConfigurator.csproj index 976ff86..b6d1c73 100644 --- a/WebWindowConfigurator/WebWindowConfigurator.csproj +++ b/WebWindowConfigurator/WebWindowConfigurator.csproj @@ -6,7 +6,7 @@ net8.0 enable enable - 3.1.8.1116 + 3.1.8.1210 Annamaria Sassi Egalware Componente gestione JWD per LUX @@ -428,6 +428,13 @@ + + + + + + +