Fix comportamento apgina test x partenza vuota/piena JWD + da nascosto a mostrato
This commit is contained in:
@@ -296,9 +296,9 @@ namespace Test.UI.Components.Pages
|
||||
Random random = new Random();
|
||||
CalcUid = Convert.ToString(random.Next(1000, 10000));
|
||||
windowUid = CalcUid;
|
||||
//InitialJwd = File.ReadAllText("Data\\FinestraSplitGrid.jwd");
|
||||
//initialJwd = File.ReadAllText("Data\\FinestraSplitGrid.jwd");
|
||||
InitialJwd = File.ReadAllText("Data\\AntaDoppia.jwd");
|
||||
//InitialJwd = File.ReadAllText("Data\\ArcoAntaDoppia.jwd");
|
||||
//initialJwd = File.ReadAllText("Data\\ArcoAntaDoppia.jwd");
|
||||
currJwd = InitialJwd;
|
||||
// rileggo altri dati
|
||||
await ReloadData();
|
||||
|
||||
@@ -66,20 +66,28 @@
|
||||
</div>
|
||||
</div>
|
||||
*@
|
||||
@if(doEdit)
|
||||
{
|
||||
<WebWindowComplex.TableComp ListPayload="SetupList"
|
||||
LiveData="CurrData"
|
||||
SelectionData="SelectList"
|
||||
baseUser="User"
|
||||
EC_ActionReq="DoAction"
|
||||
EC_DoUpdate="ExecRequest"
|
||||
EC_OnClose="CloseObj">
|
||||
</WebWindowComplex.TableComp>
|
||||
@if (doEdit)
|
||||
{
|
||||
<WebWindowComplex.TableComp ListPayload="SetupList"
|
||||
LiveData="CurrData"
|
||||
SelectionData="SelectList"
|
||||
baseUser="User"
|
||||
EC_ActionReq="DoAction"
|
||||
EC_DoUpdate="ExecRequest"
|
||||
EC_OnClose="CloseObj">
|
||||
</WebWindowComplex.TableComp>
|
||||
}
|
||||
else
|
||||
{
|
||||
<button class="brn btn-danger" @onclick="SetEdit">Click per editare</button>
|
||||
<div class="d-flex justify-content-between">
|
||||
<div class="px-0">
|
||||
<button class="btn btn-primary" @onclick="SetEdit">Click per editare</button>
|
||||
</div>
|
||||
<div class="px-0">
|
||||
<small class="text-secondary">@txtEmpty</small>
|
||||
<button class="btn btn-primary" @onclick="() => ToggleJwd()">Toggle JWD</button>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
@if (!string.IsNullOrEmpty(outClose))
|
||||
|
||||
@@ -12,12 +12,6 @@ namespace Test.UI.Components.Pages
|
||||
{
|
||||
public partial class EditJWD : IDisposable
|
||||
{
|
||||
#region Public Fields
|
||||
|
||||
public string InitialJwd = "";
|
||||
|
||||
#endregion Public Fields
|
||||
|
||||
#region Public Methods
|
||||
|
||||
public void Dispose()
|
||||
@@ -144,13 +138,9 @@ namespace Test.UI.Components.Pages
|
||||
Random random = new Random();
|
||||
CalcUid = Convert.ToString(random.Next(1000, 10000));
|
||||
windowUid = CalcUid;
|
||||
//InitialJwd = File.ReadAllText("Data\\AntaDoppiaInglesine.jwd");
|
||||
#if false
|
||||
InitialJwd = File.ReadAllText("Data\\AntaDoppia.jwd");
|
||||
#else
|
||||
InitialJwd = "{}";
|
||||
#endif
|
||||
currJwd = InitialJwd;
|
||||
//initialJwd = File.ReadAllText("Data\\AntaDoppiaInglesine.jwd");
|
||||
//initialJwd = File.ReadAllText("Data\\AntaDoppia.jwd");
|
||||
currJwd = initialJwd;
|
||||
// rileggo altri dati
|
||||
await ReloadData();
|
||||
// costruisco lista profili
|
||||
@@ -179,7 +169,7 @@ namespace Test.UI.Components.Pages
|
||||
};
|
||||
CurrData = new LivePayload()
|
||||
{
|
||||
CurrJwd = InitialJwd,
|
||||
CurrJwd = currJwd,
|
||||
SvgPreview = currSvg,
|
||||
DictShape = currGroupShape,
|
||||
DictOptionsXml = currHwOption
|
||||
@@ -419,6 +409,8 @@ namespace Test.UI.Components.Pages
|
||||
{"Frame_Rail_Bottom_DimMax", 80}
|
||||
};
|
||||
|
||||
private bool startEmpty = true;
|
||||
|
||||
private List<Threshold> ThresholdProfilo78 = new List<Threshold>()
|
||||
{
|
||||
{ new Threshold(3, "Bottom") },
|
||||
@@ -436,6 +428,26 @@ namespace Test.UI.Components.Pages
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
#region Private Properties
|
||||
|
||||
private string initialJwd
|
||||
{
|
||||
get
|
||||
{
|
||||
if (startEmpty)
|
||||
{
|
||||
return "{}";
|
||||
}
|
||||
else
|
||||
{
|
||||
return File.ReadAllText("Data\\AntaDoppiaInglesine.jwd");
|
||||
//return File.ReadAllText("Data\\AntaDoppia.jwd");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Private Properties
|
||||
|
||||
#region Private Methods
|
||||
|
||||
/// <summary>
|
||||
@@ -444,9 +456,10 @@ namespace Test.UI.Components.Pages
|
||||
/// <param name="reqSave"></param>
|
||||
private void CloseObj(DataSave reqSave)
|
||||
{
|
||||
currJwd = reqSave.currJwd;
|
||||
outClose = !reqSave.ForceSave ? "Richiesto chiusura!" : "";
|
||||
outSave = reqSave.ForceSave ? "Richiesto salvataggio!" : "";
|
||||
currJwd = reqSave.ForceSave ? reqSave.currJwd : initialJwd;
|
||||
outClose = !reqSave.ForceSave ? "Richiesto Close!" : "";
|
||||
outSave = reqSave.ForceSave ? "Richiesto Close + Save!" : "";
|
||||
doEdit = false;
|
||||
}
|
||||
|
||||
private void ConfInit()
|
||||
@@ -625,6 +638,16 @@ namespace Test.UI.Components.Pages
|
||||
doEdit = true;
|
||||
}
|
||||
|
||||
private Task ToggleJwd()
|
||||
{
|
||||
startEmpty = !startEmpty;
|
||||
currJwd = initialJwd;
|
||||
currSvg = "";
|
||||
CurrData.CurrJwd = currJwd;
|
||||
CurrData.SvgPreview = currSvg;
|
||||
return InvokeAsync(StateHasChanged);
|
||||
}
|
||||
|
||||
private void updateInfoJwd(string currSer, string? newFamilyHardware, Hardware? newHardware, string? newColorMaterial, string? newMaterial, string? newGlass, string? newProfile)
|
||||
{
|
||||
var newJwd = SerialMan.MassUpdate(currSer, newFamilyHardware, newHardware, newColorMaterial, newMaterial, newGlass, newProfile);
|
||||
|
||||
@@ -133,7 +133,7 @@ namespace Test.UI.Components.Pages
|
||||
CalcUid = Convert.ToString(random.Next(1000, 10000));
|
||||
windowUid = CalcUid;
|
||||
InitialJwd = File.ReadAllText("Data\\FinestraSplitGrid.jwd");
|
||||
//InitialJwd = File.ReadAllText("Data\\AntaDoppia.jwd");
|
||||
//initialJwd = File.ReadAllText("Data\\AntaDoppia.jwd");
|
||||
currJwd = InitialJwd;
|
||||
// rileggo altri dati
|
||||
await ReloadData();
|
||||
|
||||
@@ -335,7 +335,7 @@ namespace Test.UI.Components.Pages
|
||||
Random random = new Random();
|
||||
CalcUid = Convert.ToString(random.Next(1000, 10000));
|
||||
windowUid = CalcUid;
|
||||
//InitialJwd = File.ReadAllText("Data\\AntaDoppiaInglesine.jwd");
|
||||
//initialJwd = File.ReadAllText("Data\\AntaDoppiaInglesine.jwd");
|
||||
InitialJwd = File.ReadAllText("Data\\AntaDoppia.jwd");
|
||||
currJwd = InitialJwd;
|
||||
// rileggo altri dati
|
||||
@@ -611,8 +611,8 @@ namespace Test.UI.Components.Pages
|
||||
}
|
||||
private Task RemoveJwd()
|
||||
{
|
||||
//InitialJwd = "{}";
|
||||
//currJwd = InitialJwd;
|
||||
//initialJwd = "{}";
|
||||
//currJwd = initialJwd;
|
||||
CurrData.CurrJwd = "{}";
|
||||
// rileggo altri dati
|
||||
return ReloadData();
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Version>3.1.3.2009</Version>
|
||||
<Version>3.1.3.2010</Version>
|
||||
<Authors>Annamaria Sassi</Authors>
|
||||
<Company>Egalware</Company>
|
||||
<Description>Componente gestione Configurazioni avanzate Window per LUX</Description>
|
||||
@@ -43,6 +43,17 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Version>3.1.3.2009</Version>
|
||||
<Version>3.1.3.2010</Version>
|
||||
<Authors>Annamaria Sassi</Authors>
|
||||
<Company>Egalware</Company>
|
||||
<Description>Componente gestione JWD per LUX</Description>
|
||||
@@ -45,6 +45,17 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user