Aggiornata gestione vocabolario per traduzione
This commit is contained in:
@@ -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<string> tradList = new List<string>() { "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<string>? tradList = JsonConvert.DeserializeObject<List<string>>(jsonText);
|
||||
if(tradList != null)
|
||||
{
|
||||
await EC_ReqTraduzione.InvokeAsync(tradList);
|
||||
}
|
||||
}
|
||||
|
||||
//if (Vocabulary == null || Vocabulary.Count == 0)
|
||||
//{
|
||||
// List<string> tradList = new List<string>() { "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);
|
||||
//}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -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<Split> SplitList
|
||||
{
|
||||
get => m_SplitList;
|
||||
|
||||
Reference in New Issue
Block a user