diff --git a/Test.UI/Components/Pages/EditJWD.razor.cs b/Test.UI/Components/Pages/EditJWD.razor.cs index f2fee98..ef4a4c5 100644 --- a/Test.UI/Components/Pages/EditJWD.razor.cs +++ b/Test.UI/Components/Pages/EditJWD.razor.cs @@ -326,26 +326,18 @@ namespace Test.UI.Components.Pages { if ((args != null && args.Count > 0)) { - 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"); - if (!TradVocabulary.ContainsKey("ConfWind_Reset")) - TradVocabulary.Add("ConfWind_Reset", "Reset"); + if (!TradVocabulary.ContainsKey("CWFrame_Frame")) + TradVocabulary.Add("CWFrame_Frame", "Telaio"); + if (!TradVocabulary.ContainsKey("CWFrame_Shape")) + TradVocabulary.Add("CWFrame_Shape", "Forma"); + if (!TradVocabulary.ContainsKey("CWFrame_Dimension")) + TradVocabulary.Add("CWFrame_Dimension", "Dimensioni"); + if (!TradVocabulary.ContainsKey("CWFrame_Threshold")) + TradVocabulary.Add("CWFrame_Threshold", "Soglia"); + if (!TradVocabulary.ContainsKey("CW_Reset")) + TradVocabulary.Add("CW_Reset", "Reset"); + if (!TradVocabulary.ContainsKey("CWTableC_Tree")) + TradVocabulary.Add("CWTableC_Tree", "Struttura"); } } diff --git a/WebWindowComplex/Compo/AreaFrame.razor b/WebWindowComplex/Compo/AreaFrame.razor index fb95102..ac25596 100644 --- a/WebWindowComplex/Compo/AreaFrame.razor +++ b/WebWindowComplex/Compo/AreaFrame.razor @@ -2,13 +2,13 @@
-
@Traduci("ConfWind_AreaFrame")
+
@Traduci("CWFrame_AreaFrame")
@if (SashGroupList.Count == 0 && SplitList.Count == 0) {
- +
} @@ -16,7 +16,7 @@ {
- +
} @@ -24,7 +24,7 @@ {
- +
} diff --git a/WebWindowComplex/Compo/CardFrame.razor b/WebWindowComplex/Compo/CardFrame.razor index d61f867..614517c 100644 --- a/WebWindowComplex/Compo/CardFrame.razor +++ b/WebWindowComplex/Compo/CardFrame.razor @@ -4,7 +4,7 @@
-
@Traduci("ConfWind_Frame")
+
@Traduci("CWFrame_Frame")
@@ -18,7 +18,7 @@ {
-
@Traduci("ConfWind_Shape")
+
@Traduci("CWFrame_Shape")
@* *@
@@ -36,7 +36,7 @@ else {
-
@Traduci("ConfWind_Shape")
+
@Traduci("CWFrame_Shape")
@foreach (var i in CurrFrameWindow.ShapeList) @@ -55,7 +55,7 @@
-
@Traduci("ConfWind_Dimension")
+
@Traduci("CWFrame_Dimension")
@foreach (FrameDimension dimension in CurrFrameWindow.DimensionList) @@ -70,17 +70,17 @@
-
@Traduci("ConfWind_Threshold")
+
@Traduci("CWFrame_Threshold")
@if (BaseUser) { - @Traduci("ConfWind_Tipology") + @Traduci("CWFrame_Tipology") } else { - + @@ -119,7 +119,7 @@
-
@Traduci("ConfWind_Joints")
+
@Traduci("CWFrame_Joints")
@if (BaseUser) { @@ -170,7 +170,7 @@
-
@Traduci("ConfWind_Element")
+
@Traduci("CWFrame_Element")
diff --git a/WebWindowComplex/Compo/CardFrame.razor.cs b/WebWindowComplex/Compo/CardFrame.razor.cs index 3225223..a38fc49 100644 --- a/WebWindowComplex/Compo/CardFrame.razor.cs +++ b/WebWindowComplex/Compo/CardFrame.razor.cs @@ -1,5 +1,7 @@ using Egw.Window.Data; using Microsoft.AspNetCore.Components; +using System.Diagnostics; +using System.Text.RegularExpressions; using WebWindowComplex.Models; namespace WebWindowComplex.Compo @@ -80,11 +82,17 @@ namespace WebWindowComplex.Compo protected override async Task OnInitializedAsync() { - if (Vocabulary == null || Vocabulary.Count == 0) + var FrameVocab = Vocabulary.Where(x => x.Key.Contains("CWFrame_")).ToDictionary(x=>x.Key, y=>y.Value); + if(FrameVocab == null || FrameVocab.Count != 9) { - List tradList = new List() { "ConfWind_Frame", "ConfWind_Shape", "ConfWind_Dimension", "ConfWind_Threshold", "ConfWind_Tipology", "ConfWind_BottomRail", "ConfWind_Quantity", "ConfWind_Joints", "ConfWind_Element" }; + List tradList = new List() { "CWFrame_Frame", "CWFrame_Shape", "CWFrame_Dimension", "CWFrame_Threshold", "CWFrame_Tipology", "CWFrame_BottomRail", "CWFrame_Quantity", "CWFrame_Joints", "CWFrame_Element" }; await EC_ReqTraduzione.InvokeAsync(tradList); } + //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" }; + // await EC_ReqTraduzione.InvokeAsync(tradList); + //} } #endregion Protected Properties diff --git a/WebWindowComplex/Data/Lemmi.json b/WebWindowComplex/Data/Lemmi.json new file mode 100644 index 0000000..9ecb45a --- /dev/null +++ b/WebWindowComplex/Data/Lemmi.json @@ -0,0 +1,28 @@ +[ + "CW_Reset", + "CW_Save", + "CW_Close", + "CWFrame_BottomRail", + "CWFrame_Dimension", + "CWFrame_Element", + "CWFrame_Frame", + "CWFrame_Joints", + "CWFrame_Quantity", + "CWFrame_Shape", + "CWFrame_Threshold", + "CWFrame_Tipology", + "CWFrame_AreaFrame", + "CWAreaF_AggSash", + "CWAreaF_AggSplit", + "CWAreaF_AggInglesina", + "CWTableC_MissingParam", + "CWTableC_MissingJWD", + "CWTableC_ValidError", + "CWTableC_ConfigError", + "CWTableC_MissingValue", + "CWTableC_Tree", + "CWTableC_General", + "CWFill_AllFill", + "CWFill_AllGlass", + "CWFill_AllWood" +] \ No newline at end of file diff --git a/WebWindowComplex/TableComp.razor b/WebWindowComplex/TableComp.razor index 7ff1ce4..0bec31e 100644 --- a/WebWindowComplex/TableComp.razor +++ b/WebWindowComplex/TableComp.razor @@ -10,10 +10,10 @@
- +
-
@Traduci("ConfWind_MissingParam")
+
@Traduci("CWTableC_MissingParam")
@@ -23,10 +23,10 @@
- +
-
@Traduci("ConfWind_MissingJWD")
+
@Traduci("CWTableC_MissingJWD")
@@ -38,7 +38,7 @@ {
-
@Traduci("ConfWind_ValidError")
+
@Traduci("CWTableC_ValidError")
    @@ -55,7 +55,7 @@ {
    -
    @Traduci("ConfWind_ConfigError")
    +
    @Traduci("CWTableC_ConfigError")
      @foreach (var item in listErrLink) @@ -76,10 +76,10 @@
      - - - + + +
    @@ -240,26 +240,26 @@
    -
    @Traduci("ConfWind_AllFill")
    +
    @Traduci("CWFill_AllFill")
    @if (BaseUser) { - + } else { - + }
    @if (BaseUser) { - + } else { - + }
    @@ -362,7 +362,7 @@ {
    -
    Mancata corrispondenza valori:
    +
    @Traduci("CWTableC_MissingValue"):
      @foreach (var item in listWarnings) diff --git a/WebWindowComplex/TableComp.razor.cs b/WebWindowComplex/TableComp.razor.cs index f5f18c5..48f6fd6 100644 --- a/WebWindowComplex/TableComp.razor.cs +++ b/WebWindowComplex/TableComp.razor.cs @@ -2,6 +2,8 @@ using Microsoft.AspNetCore.Components; using Newtonsoft.Json; using NLog; +using System.Diagnostics; +using System.Text.Json; using WebWindowComplex.Compo; using WebWindowComplex.DTO; using WebWindowComplex.Json; @@ -159,11 +161,25 @@ namespace WebWindowComplex protected override async Task OnInitializedAsync() { - if (Vocabulary == null || Vocabulary.Count == 0) + + // Ricava il percorso assoluto sul disco del server + string filePath = Path.Combine("Data", "Lemmi.json"); + + if (File.Exists(filePath)) { - List tradList = new List() { "ConfWind_MissingParam", "ConfWind_MissingJWD", "ConfWind_ValidError", "ConfWind_ConfigError", "ConfWind_Tree", "ConfWind_General", "ConfWind_Reset", "ConfWind_Save", "ConfWind_Close", "ConfWind_AllFill", "ConfWind_AllGlass", "ConfWind_AllWood" }; - await EC_ReqTraduzione.InvokeAsync(tradList); + string jsonText = await File.ReadAllTextAsync(filePath); + List? tradList = JsonConvert.DeserializeObject>(jsonText); + if(tradList != null) + { + await EC_ReqTraduzione.InvokeAsync(tradList); + } } + + //if (Vocabulary == null || Vocabulary.Count == 0) + //{ + // List tradList = new List() { "ConfWind_MissingParam", "ConfWind_MissingJWD", "ConfWind_ValidError", "ConfWind_ConfigError", "ConfWind_Tree", "ConfWind_General", "ConfWind_Reset", "ConfWind_Save", "ConfWind_Close", "ConfWind_AllFill", "ConfWind_AllGlass", "ConfWind_AllWood" }; + // await EC_ReqTraduzione.InvokeAsync(tradList); + //} } /// @@ -458,16 +474,6 @@ namespace WebWindowComplex set => m_sashDimEditList = value; } - private string SelColorMaterial { get; set; } = ""; - - private string SelFamilyHardware { get; set; } = ""; - - private string SelGlass { get; set; } = ""; - - private string SelWood { get; set; } = ""!; - - private string SelProfile { get; set; } = ""; - private List SplitList { get => m_SplitList; diff --git a/WebWindowComplex/WebWindowComplex.csproj b/WebWindowComplex/WebWindowComplex.csproj index f142351..e9fc68f 100644 --- a/WebWindowComplex/WebWindowComplex.csproj +++ b/WebWindowComplex/WebWindowComplex.csproj @@ -6,7 +6,7 @@ net8.0 enable enable - 3.1.8.1315 + 3.1.8.1318 Annamaria Sassi Egalware Componente gestione Configurazioni avanzate Window per LUX @@ -212,6 +212,11 @@ + + + + + diff --git a/WebWindowConfigurator/WebWindowConfigurator.csproj b/WebWindowConfigurator/WebWindowConfigurator.csproj index 3282a7c..47688ed 100644 --- a/WebWindowConfigurator/WebWindowConfigurator.csproj +++ b/WebWindowConfigurator/WebWindowConfigurator.csproj @@ -6,7 +6,7 @@ net8.0 enable enable - 3.1.8.1315 + 3.1.8.1318 Annamaria Sassi Egalware Componente gestione JWD per LUX @@ -527,6 +527,10 @@ + + + +