- Aggiunta lista Profili
- Aggiornato setup Hardware
This commit is contained in:
@@ -104,7 +104,7 @@
|
||||
{
|
||||
@foreach (var hlItem in CurrItem.HardwareList)
|
||||
{
|
||||
<option value="@hlItem.Id" typeof="string">@hlItem.Description</option>
|
||||
<option value="@hlItem.Id">@hlItem.Description</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
|
||||
@@ -24,10 +24,11 @@
|
||||
</div>
|
||||
<div class="input-group mb-2">
|
||||
<label class="input-group-text" for="ProfileWindow">Profile</label>
|
||||
<select class="form-select" id="ProfileWindow">
|
||||
<option value="0">Profilo 78</option>
|
||||
<option value="1">Profilo..</option>
|
||||
<option value="2">Profilo...</option>
|
||||
<select class="form-select @(cssValid("Profile"))" id="ProfileWindow" @bind="@CurrProfile">
|
||||
@foreach (string profile in ListPayload.Profile)
|
||||
{
|
||||
<option value="@profile">@profile</option>
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -23,6 +23,9 @@ namespace WebWindowComplex.Compo
|
||||
[Parameter]
|
||||
public EventCallback<string> EC_SelWindMat { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<string> EC_SelProfile { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<bool> EC_ReqClose { get; set; }
|
||||
|
||||
@@ -72,6 +75,16 @@ namespace WebWindowComplex.Compo
|
||||
}
|
||||
}
|
||||
|
||||
protected string CurrProfile
|
||||
{
|
||||
get => currProfile;
|
||||
set
|
||||
{
|
||||
currProfile = value;
|
||||
_ = EC_SelProfile.InvokeAsync(value);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Protected Methods
|
||||
@@ -91,6 +104,7 @@ namespace WebWindowComplex.Compo
|
||||
currColor = CurrWindow.sColorMaterial;
|
||||
currGlass = CurrWindow.sGlass;
|
||||
currMaterial = CurrWindow.sMaterial;
|
||||
currProfile = CurrWindow.sProfilePath;
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
@@ -100,6 +114,7 @@ namespace WebWindowComplex.Compo
|
||||
private string currColor = "";
|
||||
private string currGlass = "";
|
||||
private string currMaterial = "";
|
||||
private string currProfile = "";
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
|
||||
@@ -44,6 +44,11 @@ namespace WebWindowComplex.DTO
|
||||
/// </summary>
|
||||
public List<string> Glass { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Elenco profili ammessi
|
||||
/// </summary>
|
||||
public List<string> Profile { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Verifica di validità dell'intero Payload
|
||||
/// </summary>
|
||||
@@ -55,7 +60,8 @@ namespace WebWindowComplex.DTO
|
||||
bool glassOK = Glass != null && Glass.Count > 0;
|
||||
bool matOK = Material != null && Material.Count > 0;
|
||||
bool colorOK = ColorMaterial != null && ColorMaterial.Count > 0;
|
||||
return famHwOK && glassOK && hwOK && colorOK && matOK;
|
||||
bool profileOK = Profile != null && Profile.Count > 0;
|
||||
return famHwOK && glassOK && hwOK && colorOK && matOK && profileOK;
|
||||
}
|
||||
/// <summary>
|
||||
/// Verifica che Payload sia almeno parzialmente popolato
|
||||
@@ -68,7 +74,8 @@ namespace WebWindowComplex.DTO
|
||||
bool glassOK = Glass != null && Glass.Count > 0;
|
||||
bool matOK = Material != null && Material.Count > 0;
|
||||
bool colorOK = ColorMaterial != null && ColorMaterial.Count > 0;
|
||||
return famHwOK || glassOK || hwOK || colorOK || matOK;
|
||||
bool profileOK = Profile != null && Profile.Count > 0;
|
||||
return famHwOK || glassOK || hwOK || colorOK || matOK || profileOK;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,6 +34,11 @@ namespace WebWindowComplex.DTO
|
||||
/// </summary>
|
||||
public string Glass { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Tipologia profilo selezionato
|
||||
/// </summary>
|
||||
public string Profile { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Template selezionato
|
||||
/// </summary>
|
||||
@@ -49,8 +54,9 @@ namespace WebWindowComplex.DTO
|
||||
bool colorOK = !string.IsNullOrEmpty(ColorMaterial);
|
||||
bool glassOk = !string.IsNullOrEmpty(Glass);
|
||||
bool matOK = !string.IsNullOrEmpty(Material);
|
||||
bool profileOK = !string.IsNullOrEmpty(Profile);
|
||||
bool templateOK = Template != null;
|
||||
return famHwOK && colorOK && matOK && glassOk && templateOK;
|
||||
return famHwOK && colorOK && matOK && glassOk && templateOK && profileOK;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -398,10 +398,15 @@ namespace WebWindowComplex.Json
|
||||
}
|
||||
foreach (var Joint in m_JointList)
|
||||
newSash.JointList.Add(Joint.Deserialize((Area)ParentArea));
|
||||
newSash.SetSelHardwareFromId(Hardware);
|
||||
newSash.SetSelFamilyHardwareFromIndex(Hardware);
|
||||
newSash.RefreshHardwareList();
|
||||
if (newSash.HardwareList.Count() > 0)
|
||||
newSash.SetSelHardwareFromId(newSash.HardwareList.First().Id);
|
||||
//if(Hardware != null && !Hardware.Equals(""))
|
||||
// newSash.SetSelHardwareFromId(Hardware);
|
||||
//else
|
||||
newSash.SetSelHardwareFromId(newSash.SelHardware.Id);
|
||||
//if (newSash.HardwareList.Count() > 0)
|
||||
// newSash.SetSelHardwareFromId(newSash.HardwareList.First().Id);
|
||||
foreach (var Area in AreaList)
|
||||
{
|
||||
var AreaDeserealized = Area.Deserialize(newSash, ParentWindow);
|
||||
|
||||
@@ -712,26 +712,28 @@ namespace WebWindowComplex.Models
|
||||
{
|
||||
if (string.IsNullOrEmpty(m_SelFamilyHardware))
|
||||
{
|
||||
SelFamilyHardware = (m_HardwareCompleteList
|
||||
var item = m_HardwareCompleteList
|
||||
.Where(x => x.Id == codHardware)
|
||||
.First()).FamilyName;
|
||||
.Select(x => x.FamilyName)
|
||||
.ToList();
|
||||
SelFamilyHardware = item.First();
|
||||
}
|
||||
return SelFamilyHardware;
|
||||
}
|
||||
|
||||
internal void SetSelHardware(Hardware value)
|
||||
{
|
||||
m_SelHardware = value;
|
||||
SelHardware = value;
|
||||
}
|
||||
|
||||
internal void SetSelHardwareFromId(string sId)
|
||||
{
|
||||
if (m_HardwareList.Count == 0)
|
||||
m_SelHardware = m_HardwareCompleteList.FirstOrDefault(x => x.Id.Equals(sId)) ?? new Hardware("", "", "", Enums.OpeningTypes.Null, "", 0, 0);
|
||||
SelHardware = m_HardwareCompleteList.FirstOrDefault(x => x.Id.Equals(sId)) ?? new Hardware("", "", "", Enums.OpeningTypes.Null, "", 0, 0);
|
||||
else
|
||||
m_SelHardware = m_HardwareList.FirstOrDefault(x => x.Id.Equals(sId)) ?? new Hardware("", "", "", Enums.OpeningTypes.Null, "", 0, 0);
|
||||
if (m_SelHardware == null)
|
||||
m_SelHardware = m_HardwareList[0];
|
||||
SelHardware = m_HardwareList.FirstOrDefault(x => x.Id.Equals(sId)) ?? new Hardware("", "", "", Enums.OpeningTypes.Null, "", 0, 0);
|
||||
if (SelHardware == null)
|
||||
SelHardware = m_HardwareList[0];
|
||||
//SelFamilyHardware = m_SelHardware.FamilyName;
|
||||
}
|
||||
|
||||
|
||||
@@ -85,6 +85,7 @@ namespace WebWindowComplex.Models
|
||||
set
|
||||
{
|
||||
m_sProfilePath = value;
|
||||
OnUpdatePreview(sSerialized());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -163,7 +163,7 @@
|
||||
}
|
||||
else if (currStep == CompileStep.General)
|
||||
{
|
||||
<General CurrWindow="@m_CurrWindow" ListPayload="ListPayload" ListWarnings="listWarnings" EC_SelColor="SelectColor" EC_SelGlass="SelectGlass" EC_SelWindMat="SelectMat" EC_ReqClose="ReturnTree"></General>
|
||||
<General CurrWindow="@m_CurrWindow" ListPayload="ListPayload" ListWarnings="listWarnings" EC_SelColor="SelectColor" EC_SelGlass="SelectGlass" EC_SelWindMat="SelectMat" EC_SelProfile="SelectProfile" EC_ReqClose="ReturnTree"></General>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -130,6 +130,7 @@ namespace WebWindowComplex
|
||||
protected string SelColorMaterial { get; set; } = "";
|
||||
protected string SelFamilyHardware { get; set; } = "";
|
||||
protected string SelGlass { get; set; } = "";
|
||||
protected string SelProfile { get; set; } = "";
|
||||
|
||||
protected string SelMaterial { get; set; } = ""!;
|
||||
|
||||
@@ -417,8 +418,6 @@ namespace WebWindowComplex
|
||||
return listWarnings.ContainsKey(fKey) ? "border border-danger" : "";
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Richiesta chiusura SENZA salvataggio (= restore prev)
|
||||
/// </summary>
|
||||
@@ -551,7 +550,6 @@ namespace WebWindowComplex
|
||||
{
|
||||
listErrLink.Add("Window", $"Deserializing Error:{Environment.NewLine}{ex}");
|
||||
}
|
||||
|
||||
updateSvg = true;
|
||||
}
|
||||
checkWarnings();
|
||||
@@ -652,6 +650,7 @@ namespace WebWindowComplex
|
||||
SelColorMaterial = CurrSelection.ColorMaterial ?? "";
|
||||
SelMaterial = CurrSelection.Material ?? "";
|
||||
SelGlass = CurrSelection.Glass ?? "";
|
||||
SelProfile = CurrSelection.Profile ?? "";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -850,6 +849,10 @@ namespace WebWindowComplex
|
||||
{
|
||||
listErrPre.Add("ColorMaterial", "Missing ColorMaterial List!");
|
||||
}
|
||||
if (ListPayload.Profile == null || ListPayload.Profile.Count == 0)
|
||||
{
|
||||
listErrPre.Add("Profile", "Missing Profile List!");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -875,6 +878,10 @@ namespace WebWindowComplex
|
||||
{
|
||||
listWarnings.Add("Material", $"Missing Material: {m_CurrWindow.sMaterial}");
|
||||
}
|
||||
if (!ListPayload.Profile.Contains(m_CurrWindow.sProfilePath))
|
||||
{
|
||||
listWarnings.Add("Profile", $"Missing Profile: {m_CurrWindow.sProfilePath}");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -893,7 +900,7 @@ namespace WebWindowComplex
|
||||
// Rimuovo riempimento da anta selezionata
|
||||
sashSplitted.AreaList.RemoveAt(0);
|
||||
// Creo la copia dell'anta scelta
|
||||
Area a = sashItem.AreaList[IndexCopy].AreaList[0].Copy(sashSplitted);
|
||||
Area a = sashItem.AreaList[IndexCopy].AreaList.First().Copy(sashSplitted);
|
||||
// Aggiungo copia all'anta selezionata
|
||||
sashItem.AreaList[IndexModify].AreaList.Add(a);
|
||||
await DoPreviewSvg();
|
||||
@@ -1015,6 +1022,10 @@ namespace WebWindowComplex
|
||||
AdvStep(CompileStep.Tree);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Selezione del colore
|
||||
/// </summary>
|
||||
/// <param name="newVal"></param>
|
||||
private void SelectColor(string newVal)
|
||||
{
|
||||
if (m_CurrWindow != null)
|
||||
@@ -1023,6 +1034,10 @@ namespace WebWindowComplex
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Selezione del vetro
|
||||
/// </summary>
|
||||
/// <param name="newVal"></param>
|
||||
private void SelectGlass(string newVal)
|
||||
{
|
||||
if (m_CurrWindow != null)
|
||||
@@ -1031,6 +1046,10 @@ namespace WebWindowComplex
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Selezione del materiale
|
||||
/// </summary>
|
||||
/// <param name="newVal"></param>
|
||||
private void SelectMat(string newVal)
|
||||
{
|
||||
if (m_CurrWindow != null)
|
||||
@@ -1039,6 +1058,18 @@ namespace WebWindowComplex
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Selezione del profilo
|
||||
/// </summary>
|
||||
/// <param name="newVal"></param>
|
||||
private void SelectProfile(string newVal)
|
||||
{
|
||||
if (m_CurrWindow != null)
|
||||
{
|
||||
m_CurrWindow.sProfilePath = newVal;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Metodo per scambiare due aree di uno split
|
||||
/// </summary>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Version>2.7.10.1412</Version>
|
||||
<Version>2.7.10.1414</Version>
|
||||
<Authors>Annamaria Sassi</Authors>
|
||||
<Company>Egalware</Company>
|
||||
<Description>Componente gestione Configurazioni avanzate Window per LUX</Description>
|
||||
@@ -30,3 +30,23 @@
|
||||
|
||||
</Project>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user