Aggiunta Threshold in Frame
This commit is contained in:
@@ -91,6 +91,12 @@ namespace Test.UI.Components.Pages
|
||||
new string("ProfiloSaomad")
|
||||
};
|
||||
|
||||
protected List<Threshold> AvailThresholdList { get; set; } = new List<Threshold>()
|
||||
{
|
||||
new Threshold(1, "Bottom"),
|
||||
new Threshold(3, "Threshold")
|
||||
};
|
||||
|
||||
[Inject]
|
||||
protected IConfiguration Config { get; set; } = null!;
|
||||
|
||||
@@ -129,7 +135,7 @@ namespace Test.UI.Components.Pages
|
||||
Random random = new Random();
|
||||
CalcUid = Convert.ToString(random.Next(1000, 10000));
|
||||
windowUid = CalcUid;
|
||||
//InitialJwd = File.ReadAllText("Data\\FinestraSplitVert.jwd");
|
||||
//InitialJwd = File.ReadAllText("Data\\FinestraSplitGrid.jwd");
|
||||
InitialJwd = File.ReadAllText("Data\\AntaDoppia.jwd");
|
||||
//InitialJwd = File.ReadAllText("Data\\ArcoAntaDoppia.jwd");
|
||||
currJwd = InitialJwd;
|
||||
@@ -143,7 +149,8 @@ namespace Test.UI.Components.Pages
|
||||
Glass = AvailGlassList,
|
||||
Hardware = AvailHardwareList,
|
||||
Material = AvailMaterialList,
|
||||
Profile = AvailProfileList
|
||||
Profile = AvailProfileList,
|
||||
Threshold = AvailThresholdList
|
||||
};
|
||||
CurrData = new LivePayload()
|
||||
{
|
||||
@@ -162,46 +169,33 @@ namespace Test.UI.Components.Pages
|
||||
#region Private Fields
|
||||
|
||||
private string apiUrl = "";
|
||||
|
||||
private string calcTag = "";
|
||||
|
||||
private string CalcUid = "CurrWindow";
|
||||
|
||||
private string windowUid = "CurrWindow";
|
||||
private string cFileHardware = "Hardware/Setup.json";
|
||||
|
||||
private string cFileTemplate = "Data/Setup.json";
|
||||
|
||||
private string colorMassUpdate;
|
||||
|
||||
private string currSvg = "";
|
||||
|
||||
private string familyHWMassUpdate;
|
||||
|
||||
private string GenericBasePath = "";
|
||||
|
||||
private string colorMassUpdate;
|
||||
private string familyHWMassUpdate;
|
||||
private string glassMassUpdate;
|
||||
|
||||
private Hardware hardwareMassUpdate;
|
||||
|
||||
private string channelHwOpt = "";
|
||||
private string imgBasePath = "";
|
||||
private string materialMassUpdate;
|
||||
private string profileMassUpdate;
|
||||
|
||||
/// <summary>
|
||||
/// Semaforo x definire se sia già in modalità ionterattiva o di prerendering
|
||||
/// </summary>
|
||||
private bool isInteractive = false;
|
||||
|
||||
private string materialMassUpdate;
|
||||
|
||||
private string outClose = "";
|
||||
|
||||
private string outSave = "";
|
||||
|
||||
private string profileMassUpdate;
|
||||
private string imgBasePath = "";
|
||||
|
||||
private string channelHwOpt = "";
|
||||
private string channelShape = "";
|
||||
private string channelSvg = "";
|
||||
private string windowUid = "CurrWindow";
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
"JointType": "FULL_V"
|
||||
}
|
||||
],
|
||||
"Threshold": "Bottom",
|
||||
"BottomRail": false,
|
||||
"BottomRailQty": 0,
|
||||
"GroupId": 1,
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
"JointType": "FULL_V"
|
||||
}
|
||||
],
|
||||
"Threshold": "Bottom",
|
||||
"BottomRail": false,
|
||||
"BottomRailQty": 0,
|
||||
"GroupId": 1,
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
"JointType": "ANGLED"
|
||||
}
|
||||
],
|
||||
"Threshold": "Threshold",
|
||||
"BottomRail": false,
|
||||
"BottomRailQty": 0,
|
||||
"GroupId": 1,
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
"JointType": "FULL_V"
|
||||
}
|
||||
],
|
||||
"Threshold": "Bottom",
|
||||
"BottomRail": false,
|
||||
"BottomRailQty": 0,
|
||||
"GroupId": 1,
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
"JointType": "FULL_V"
|
||||
}
|
||||
],
|
||||
"Threshold": "Bottom",
|
||||
"BottomRail": false,
|
||||
"BottomRailQty": 0,
|
||||
"GroupId": 1,
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
"JointType": "FULL_V"
|
||||
}
|
||||
],
|
||||
"Threshold": "Bottom",
|
||||
"BottomRail": false,
|
||||
"BottomRailQty": 0,
|
||||
"GroupId": 1,
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
"JointType": "FULL_V"
|
||||
}
|
||||
],
|
||||
"Threshold": "Bottom",
|
||||
"BottomRail": false,
|
||||
"BottomRailQty": 0,
|
||||
"GroupId": 1,
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Egw.Window.Data" Version="2.7.10.2116" />
|
||||
<PackageReference Include="Egw.Window.Data" Version="2.7.12-beta.2210" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.21" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
@@ -42,10 +42,16 @@
|
||||
</div>
|
||||
<div class="input-group mb-2">
|
||||
<label class="input-group-text">Tipology</label>
|
||||
<select class="form-select">
|
||||
<select class="form-select" @bind="SelThreshold">
|
||||
@foreach (var item in Frame.m_ThresholdList)
|
||||
{
|
||||
<option value="@(item.Type)">@(item.Name)</option>
|
||||
}
|
||||
</select>
|
||||
@* <select class="form-select">
|
||||
<option value="0">Soglia</option>
|
||||
<option value="1">Sgocciolatoio</option>
|
||||
</select>
|
||||
</select> *@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
using Egw.Window.Data;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using WebWindowComplex.Models;
|
||||
|
||||
@@ -76,8 +77,27 @@ namespace WebWindowComplex.Compo
|
||||
svgNoHw = true
|
||||
};
|
||||
_ = EC_UpdatePreview.InvokeAsync(args);
|
||||
//_ = EC_ReqOptionHw.InvokeAsync(CurrFrameWindow);
|
||||
//_ = EC_UpdateShape.InvokeAsync(CurrFrameWindow);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Metodo per selezionare threshold
|
||||
/// </summary>
|
||||
protected int SelThreshold
|
||||
{
|
||||
get => CurrFrameWindow.SelThresholdFromType;
|
||||
set
|
||||
{
|
||||
if (CurrFrameWindow.SelThresholdFromType != value)
|
||||
{
|
||||
CurrFrameWindow.SelThresholdFromType = value;
|
||||
var args = new DataUpdateFrame()
|
||||
{
|
||||
currFrame = CurrFrameWindow,
|
||||
svgNoHw = false
|
||||
};
|
||||
_ = EC_UpdatePreview.InvokeAsync(args);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,6 +44,11 @@ namespace WebWindowComplex.DTO
|
||||
/// </summary>
|
||||
public List<string> Profile { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Elenco profili ammessi
|
||||
/// </summary>
|
||||
public List<Threshold> Threshold { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Verifica di validità dell'intero Payload
|
||||
/// </summary>
|
||||
@@ -56,7 +61,8 @@ namespace WebWindowComplex.DTO
|
||||
bool matOK = Material != null && Material.Count > 0;
|
||||
bool colorOK = ColorMaterial != null && ColorMaterial.Count > 0;
|
||||
bool profileOK = Profile != null && Profile.Count > 0;
|
||||
return famHwOK && glassOK && hwOK && colorOK && matOK && profileOK;
|
||||
bool thresholdOK = Threshold != null && Threshold.Count > 0;
|
||||
return famHwOK && glassOK && hwOK && colorOK && matOK && profileOK && thresholdOK;
|
||||
}
|
||||
/// <summary>
|
||||
/// Verifica che Payload sia almeno parzialmente popolato
|
||||
@@ -70,7 +76,8 @@ namespace WebWindowComplex.DTO
|
||||
bool matOK = Material != null && Material.Count > 0;
|
||||
bool colorOK = ColorMaterial != null && ColorMaterial.Count > 0;
|
||||
bool profileOK = Profile != null && Profile.Count > 0;
|
||||
return famHwOK || glassOK || hwOK || colorOK || matOK || profileOK;
|
||||
bool thresholdOK = Threshold != null && Threshold.Count > 0;
|
||||
return famHwOK || glassOK || hwOK || colorOK || matOK || profileOK || thresholdOK;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Microsoft.VisualBasic;
|
||||
using Egw.Window.Data;
|
||||
using Microsoft.VisualBasic;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Newtonsoft.Json.Linq;
|
||||
@@ -201,6 +202,20 @@ namespace WebWindowComplex.Json
|
||||
}
|
||||
}
|
||||
|
||||
private string m_Threshold;
|
||||
[JsonProperty]
|
||||
public string Threshold
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Threshold;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_Threshold = value;
|
||||
}
|
||||
}
|
||||
|
||||
private bool m_bBottomRail;
|
||||
[JsonProperty]
|
||||
public bool BottomRail
|
||||
@@ -247,9 +262,10 @@ namespace WebWindowComplex.Json
|
||||
{
|
||||
}
|
||||
|
||||
public JsonFrame(Shapes Shape, bool BottomRail, int BottomRailQty, int GroupId) : base(AreaTypes.FRAME)
|
||||
public JsonFrame(Shapes Shape, string sThreshold, bool BottomRail, int BottomRailQty, int GroupId) : base(AreaTypes.FRAME)
|
||||
{
|
||||
m_Shape = Shape;
|
||||
m_Threshold= sThreshold;
|
||||
m_bBottomRail = BottomRail;
|
||||
m_nBottomRailQty = BottomRailQty;
|
||||
base.GroupId = GroupId;
|
||||
@@ -261,6 +277,7 @@ namespace WebWindowComplex.Json
|
||||
newFrame.SetGroupId(GroupId);
|
||||
newFrame.SetAreaType(AreaTypes.FRAME);
|
||||
newFrame.SetSelShape(m_Shape);
|
||||
newFrame.SetSelThresholdFromName(m_Threshold);
|
||||
newFrame.SetBottomRail(m_bBottomRail);
|
||||
newFrame.SetBottomRailQty(m_nBottomRailQty);
|
||||
//if(ArcElement != null)
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using Egw.Window.Data;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
@@ -10,6 +11,13 @@ namespace WebWindowComplex.Models
|
||||
{
|
||||
public class Frame : Area
|
||||
{
|
||||
#region Public Fields
|
||||
|
||||
// Lista hardware completa passata dal chiamante del componente
|
||||
public static List<Threshold> m_ThresholdList = new List<Threshold>();
|
||||
|
||||
#endregion Public Fields
|
||||
|
||||
#region Public Constructors
|
||||
|
||||
public Frame(Area ParentArea, Window ParentWindow) : base(ParentArea, ParentWindow)
|
||||
@@ -44,6 +52,30 @@ namespace WebWindowComplex.Models
|
||||
}
|
||||
}
|
||||
|
||||
public Threshold SelThreshold
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_SelThreshold;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_SelThreshold = value;
|
||||
}
|
||||
}
|
||||
|
||||
public int SelThresholdFromType
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_SelThreshold.Type;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_SelThreshold = m_ThresholdList.Where(x=>x.Type.Equals(value)).First();
|
||||
}
|
||||
}
|
||||
|
||||
public int BottomRailQty
|
||||
{
|
||||
get
|
||||
@@ -329,6 +361,7 @@ namespace WebWindowComplex.Models
|
||||
newFrame.SetSelShape(Shapes.RECTANGLE);
|
||||
newFrame.SetBottomRail(false);
|
||||
newFrame.SetBottomRailQty(0);
|
||||
newFrame.SetSelThresholdFromName(m_ThresholdList.FirstOrDefault().Name);
|
||||
//newFrame.FrameArcElem = null;
|
||||
return newFrame;
|
||||
}
|
||||
@@ -338,7 +371,7 @@ namespace WebWindowComplex.Models
|
||||
Area.nCounterGroup = 0;
|
||||
if (nCounterGroup < GroupId)
|
||||
Area.nCounterGroup = GroupId;
|
||||
JsonFrame JsonFrame = new JsonFrame(m_Shape, m_bBottomRail, m_nBottomRailQty, GroupId);
|
||||
JsonFrame JsonFrame = new JsonFrame(m_Shape, m_SelThreshold.Name, m_bBottomRail, m_nBottomRailQty, GroupId);
|
||||
//if (FrameArcElem != null)
|
||||
// JsonFrame.ArcElement = FrameArcElem.Serialize();
|
||||
//else
|
||||
@@ -477,6 +510,11 @@ namespace WebWindowComplex.Models
|
||||
m_Shape = Value;
|
||||
}
|
||||
|
||||
internal void SetSelThresholdFromName(string value)
|
||||
{
|
||||
m_SelThreshold = m_ThresholdList.Where(x=>x.Name.Equals(value)).First();
|
||||
}
|
||||
|
||||
#endregion Internal Methods
|
||||
|
||||
#region Private Fields
|
||||
@@ -485,6 +523,8 @@ namespace WebWindowComplex.Models
|
||||
|
||||
private bool m_bBottomRail;
|
||||
|
||||
private Threshold m_SelThreshold;
|
||||
|
||||
private List<FrameDimension> m_DimensionList = new List<FrameDimension>();
|
||||
|
||||
private List<Joint> m_JointList = new List<Joint>();
|
||||
|
||||
@@ -583,7 +583,7 @@ namespace WebWindowComplex
|
||||
};
|
||||
//FrameArcElement ae = new FrameArcElement(frame, window, 10, true, true);
|
||||
JsonWindow jsonWindow = new JsonWindow("Profilo78", "Pino", "Black", "Vetro BE 2S 4T/16/4T");
|
||||
JsonFrame jsonFrame = new JsonFrame(Shapes.RECTANGLE, false, 0, 1);
|
||||
JsonFrame jsonFrame = new JsonFrame(Shapes.RECTANGLE, null, false, 0, 1);
|
||||
jsonWindow.AreaList.Add(jsonFrame);
|
||||
//jsonFrame.ArcElement = ae.Serialize();
|
||||
foreach (var Dimension in DimensionList)
|
||||
@@ -744,6 +744,7 @@ namespace WebWindowComplex
|
||||
/// </summary>
|
||||
protected void UpdateSelParameter()
|
||||
{
|
||||
Frame.m_ThresholdList = ListPayload.Threshold;
|
||||
Sash.m_HardwareCompleteList = ListPayload.Hardware;
|
||||
Sash.s_FamilyHardwareList = ListPayload.FamilyHardware;
|
||||
if (CurrSelection != null && CurrSelection.IsValid())
|
||||
@@ -988,7 +989,7 @@ namespace WebWindowComplex
|
||||
/// <param name="args"></param>
|
||||
private async Task ReqResetDict(DataUpdateRes args)
|
||||
{
|
||||
_ = EC_ActionReq.InvokeAsync(args.req);
|
||||
await EC_ActionReq.InvokeAsync(args.req);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Version>2.7.12.1812</Version>
|
||||
<Version>2.7.12.2212</Version>
|
||||
<Authors>Annamaria Sassi</Authors>
|
||||
<Company>Egalware</Company>
|
||||
<Description>Componente gestione Configurazioni avanzate Window per LUX</Description>
|
||||
@@ -18,7 +18,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Egw.Window.Data" Version="2.7.10.2116" />
|
||||
<PackageReference Include="Egw.Window.Data" Version="2.7.12-beta.2210" />
|
||||
<PackageReference Include="EgwCoreLib.Razor" Version="1.5.2511.312" />
|
||||
<PackageReference Include="EgwCoreLib.Utils" Version="1.5.2511.312" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.21" />
|
||||
@@ -405,6 +405,10 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Version>2.7.12.1917</Version>
|
||||
<Version>2.7.12.2212</Version>
|
||||
<Authors>Annamaria Sassi</Authors>
|
||||
<Company>Egalware</Company>
|
||||
<Description>Componente gestione JWD per LUX</Description>
|
||||
@@ -26,7 +26,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Egw.Window.Data" Version="2.7.12-beta.1917" />
|
||||
<PackageReference Include="Egw.Window.Data" Version="2.7.12-beta.2210" />
|
||||
<PackageReference Include="EgwCoreLib.Razor" Version="1.5.2511.312" />
|
||||
<PackageReference Include="EgwCoreLib.Utils" Version="1.5.2511.312" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.21" />
|
||||
@@ -485,6 +485,26 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Egw.Window.Data" Version="2.7.10.2116" />
|
||||
<PackageReference Include="Egw.Window.Data" Version="2.7.12-beta.2210" />
|
||||
<PackageReference Include="EgwCoreLib.Razor" Version="1.5.2511.312" />
|
||||
<PackageReference Include="EgwCoreLib.Utils" Version="1.5.2511.312" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.21" />
|
||||
|
||||
Reference in New Issue
Block a user