Update componente x trigger richiesta traduzioni non empty
This commit is contained in:
@@ -324,24 +324,27 @@ namespace Test.UI.Components.Pages
|
||||
|
||||
private void Traduzione(List<string> 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");
|
||||
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");
|
||||
}
|
||||
}
|
||||
|
||||
private void ConfInit()
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace WebWindowComplex.Compo
|
||||
/// </summary>
|
||||
[Parameter]
|
||||
public EventCallback<Frame> EC_ReqOptionHw { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Evento per richiesta calcolo preview
|
||||
/// </summary>
|
||||
@@ -72,16 +72,16 @@ namespace WebWindowComplex.Compo
|
||||
/// Evento per richiesta profili degli Element
|
||||
/// </summary>
|
||||
[Parameter]
|
||||
public Dictionary<string,string> Vocabulary { get; set; }
|
||||
public Dictionary<string, string> Vocabulary { get; set; }
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
protected override void OnInitialized()
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
if(Vocabulary == null || Vocabulary.Count == 0)
|
||||
if (Vocabulary == null || Vocabulary.Count == 0)
|
||||
{
|
||||
List<string> tradList = new List<string>() { "ConfWind_Frame", "ConfWind_Shape", "ConfWind_Dimension", "ConfWind_Threshold", "ConfWind_Tipology", "ConfWind_BottomRail", "ConfWind_Quantity", "ConfWind_Joints", "ConfWind_Element" };
|
||||
_ = EC_ReqTraduzione.InvokeAsync();
|
||||
await EC_ReqTraduzione.InvokeAsync(tradList);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -239,8 +239,8 @@ namespace WebWindowComplex.Compo
|
||||
currFrame = CurrFrameWindow,
|
||||
svgNoHw = true
|
||||
};
|
||||
await EC_ReqResetDict.InvokeAsync(new DataUpdateRes { req=LayoutConst.DataAction.ResetDictShape});
|
||||
if(SashGroupList.Count > 0)
|
||||
await EC_ReqResetDict.InvokeAsync(new DataUpdateRes { req = LayoutConst.DataAction.ResetDictShape });
|
||||
if (SashGroupList.Count > 0)
|
||||
await EC_ReqOptionHw.InvokeAsync(CurrFrameWindow);
|
||||
await EC_ReqElement.InvokeAsync(CurrFrameWindow);
|
||||
await EC_UpdateFrame.InvokeAsync(args);
|
||||
@@ -262,7 +262,7 @@ namespace WebWindowComplex.Compo
|
||||
await EC_ReqElement.InvokeAsync(CurrFrameWindow);
|
||||
await EC_UpdateFrame.InvokeAsync(args);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Metodo per cambiare tutti i joint
|
||||
/// </summary>
|
||||
@@ -272,7 +272,7 @@ namespace WebWindowComplex.Compo
|
||||
{
|
||||
for (int i = 0; i < CurrFrameWindow.JointList.Count; i++)
|
||||
{
|
||||
if((CurrFrameWindow.Shape is Json.WindowConst.Shapes.ARC || CurrFrameWindow.Shape is Json.WindowConst.Shapes.ARC_FULL ||
|
||||
if ((CurrFrameWindow.Shape is Json.WindowConst.Shapes.ARC || CurrFrameWindow.Shape is Json.WindowConst.Shapes.ARC_FULL ||
|
||||
CurrFrameWindow.Shape is Json.WindowConst.Shapes.DOUBLEARC || CurrFrameWindow.Shape is Json.WindowConst.Shapes.THREECENTERARC) &&
|
||||
(i == 2 || i == CurrFrameWindow.JointList.Count - 1))
|
||||
CurrFrameWindow.JointList.ElementAt(i).SelJointType = Json.WindowConst.Joints.ANGLED;
|
||||
@@ -425,7 +425,7 @@ namespace WebWindowComplex.Compo
|
||||
|
||||
private string EditDimensionCss()
|
||||
{
|
||||
if(CurrFrameWindow.DimensionList.Count % 2 == 0)
|
||||
if (CurrFrameWindow.DimensionList.Count % 2 == 0)
|
||||
return "col-md-12 col-lg-6";
|
||||
else
|
||||
return "col-md-12 col-lg-4";
|
||||
@@ -434,7 +434,7 @@ namespace WebWindowComplex.Compo
|
||||
private string Traduci(string lemma)
|
||||
{
|
||||
string ans = "";
|
||||
if(Vocabulary != null && Vocabulary.ContainsKey(lemma))
|
||||
if (Vocabulary != null && Vocabulary.ContainsKey(lemma))
|
||||
{
|
||||
ans = Vocabulary.GetValueOrDefault(lemma) ?? "";
|
||||
}
|
||||
|
||||
@@ -139,6 +139,10 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -438,6 +438,10 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user