Correzioni

This commit is contained in:
Annamaria Sassi
2025-10-22 16:48:04 +02:00
parent b7a3497019
commit fad95d22b6
13 changed files with 164 additions and 31 deletions
+1 -1
View File
@@ -6,7 +6,7 @@
</div>
<div class="col d-flex justify-content-center">
<div class="input-group mb-2 justify-content-center">
<button class="btn btn-outline-secondary btn-sm" @onclick="() => CurrSplitted.AddFirstSash()">Add Sash</button>
<button class="btn btn-outline-secondary btn-sm" @onclick="() => RaiseAddSash(CurrSplitted)">Add Sash</button>
</div>
</div>
<div class="col d-flex justify-content-center">
+26
View File
@@ -32,6 +32,12 @@ namespace WebWindowComplex.Compo
[Parameter]
public EventCallback<DataAreaSplit> EC_CopySash { get; set; }
/// <summary>
/// Evento per aggiungere Sash
/// </summary>
[Parameter]
public EventCallback<DataAreaSplitted> EC_AddSash { get; set; }
#endregion Public Properties
#region Private Methods
@@ -50,6 +56,18 @@ namespace WebWindowComplex.Compo
await EC_CopySash.InvokeAsync(Args);
}
/// <summary>
/// Sollevo evento richiesta copia sash
/// </summary>
/// <returns></returns>
private async Task RaiseAddSash(Splitted item)
{
var Args = new DataAreaSplitted
{
splitted = item
};
await EC_AddSash.InvokeAsync(Args);
}
#endregion Private Methods
}
@@ -62,4 +80,12 @@ namespace WebWindowComplex.Compo
public Splitted splitted { get; set; }
public int index { get; set; }
}
/// <summary>
/// Classe per raggruppare oggetti che servono per aggiungere Sash
/// </summary>
public class DataAreaSplitted
{
public Splitted splitted { get; set; }
}
}
+6 -1
View File
@@ -47,7 +47,12 @@
{
@if (currSplitted.AreaList.First().Equals(CurrItem))
{
<AreaSplit CurrSashList="SashList" CurrSplittedList="SplittedList" CurrSplitted="currSplitted" EC_CopySash="CopySash"></AreaSplit>
<AreaSplit CurrSashList="SashList"
CurrSplittedList="SplittedList"
CurrSplitted="currSplitted"
EC_AddSash="AddSash"
EC_CopySash="CopySash">
</AreaSplit>
}
}
+16
View File
@@ -38,6 +38,12 @@ namespace WebWindowComplex.Compo
[Parameter]
public EventCallback<DataAreaSplit> EC_CopySash { get; set; }
/// <summary>
/// Evento per aggiungere sash
/// </summary>
[Parameter]
public EventCallback<DataAreaSplitted> EC_AddSash { get; set; }
/// <summary>
/// Evento per tornare nella pagine Tree
/// </summary>
@@ -97,6 +103,16 @@ namespace WebWindowComplex.Compo
await EC_CopySash.InvokeAsync(Args);
}
/// <summary>
/// Sollevo evento per aggiungere sash
/// </summary>
/// <param name="Args"></param>
/// <returns></returns>
protected async Task AddSash(DataAreaSplitted Args)
{
await EC_AddSash.InvokeAsync(Args);
}
#endregion Protected Methods
#region Private Methods
+26 -14
View File
@@ -92,22 +92,34 @@
}
</select>
</div>
<div class="input-group mb-2">
<label class="input-group-text" for="Hardware">Type</label>
<select class="form-select" id="Hardware" @bind="SelHwType">
@if (CurrItem.HardwareList == null || CurrItem.HardwareList.Count == 0)
{
<option value="000000">ERROR - Missing HW List</option>
}
else
{
@foreach (var hlItem in CurrItem.HardwareList)
@if (string.IsNullOrEmpty(CurrItem.sSashShape))
{
<div class="input-group mb-2">
<label class="input-group-text" for="Hardware">Type</label>
<select class="form-select" id="Hardware" disabled>
<option value="000000">Loading</option>
</select>
</div>
}
else
{
<div class="input-group mb-2">
<label class="input-group-text" for="Hardware">Type</label>
<select class="form-select" id="Hardware" @bind="SelHwType">
@if (CurrItem.HardwareList == null || CurrItem.HardwareList.Count == 0)
{
<option value="@hlItem.Id">@hlItem.Description</option>
<option value="000000">ERROR - Missing HW List</option>
}
}
</select>
</div>
else
{
@foreach (var hlItem in CurrItem.HardwareList)
{
<option value="@hlItem.Id">@hlItem.Description</option>
}
}
</select>
</div>
}
</div>
</div>
</div>
+1 -2
View File
@@ -114,11 +114,10 @@ namespace WebWindowComplex.Models
if (listHwValid != null)
{
// seleziono la famiglia del primo hw trovato...
SashArea.SelFamilyHardware = listHwValid.FamilyName;
SashArea.SetSelFamilyHardware(listHwValid.FamilyName);
SashArea.ReqRefreshShape();
if (SashArea.HardwareList.Count == 0)
{
SashArea.Remove();
answ = true;
}
else
+5 -1
View File
@@ -94,10 +94,14 @@ namespace WebWindowComplex.Models
return JsonFill;
}
internal void SetSelFillType(FillTypes value)
{
m_SelFillType = value;
//m_ParentWindow.OnUpdatePreview(m_ParentWindow.sSerialized());
}
internal void SetFillType(FillTypes value)
{
m_SelFillType = value;
m_ParentWindow.OnUpdatePreview(m_ParentWindow.sSerialized());
}
#endregion Internal Methods
+13 -5
View File
@@ -44,6 +44,10 @@ namespace WebWindowComplex.Models
#region Public Properties
public string sSashShape
{
get => m_CurrShape;
}
public bool bIsMeasureGlass
{
get
@@ -316,10 +320,7 @@ namespace WebWindowComplex.Models
}
set
{
m_SelFamilyHardware = value;
ReqRefreshShape();
RefreshHardwareOptionList();
SetFirstHardware();
SetSelFamilyHardware(value);
m_ParentWindow.OnUpdatePreview(m_ParentWindow.sSerialized());
}
}
@@ -569,7 +570,7 @@ namespace WebWindowComplex.Models
newSash.JointList.Add(new Joint(newSash, JointIndex + 1, Joints.FULL_H));
newSash.SetSashBottomRail(false);
newSash.SetSashBottomRailQty(0);
newSash.SelFamilyHardware = Sash.s_FamilyHardwareList.First();
newSash.SetSelFamilyHardware(Sash.s_FamilyHardwareList.First());
newSash.ReqRefreshShape();
newSash.RefreshHardwareOptionList();
newSash.SetFirstHardware();
@@ -750,6 +751,13 @@ namespace WebWindowComplex.Models
m_SashType = SashType;
}
public void SetSelFamilyHardware(string sFamilyHw)
{
m_SelFamilyHardware = sFamilyHw;
ReqRefreshShape();
RefreshHardwareOptionList();
SetFirstHardware();
}
internal string SetSelFamilyHardwareFromIndex(string codHardware)
{
if (string.IsNullOrEmpty(m_SelFamilyHardware))
+1 -1
View File
@@ -445,7 +445,7 @@ namespace WebWindowComplex.Models
internal void SetSplitStartVert(bool SplitStartVert)
{
bSplitStartVert = SplitStartVert;
m_bSplitStartVert = SplitStartVert;
}
#endregion Internal Methods
+20 -2
View File
@@ -166,12 +166,30 @@
}
else
{
<CardFill CurrIndex="currFill" CurrItem="FillList[currFill]" FillList="m_FillList" SashList="m_SashList" SplittedList="m_SplittedList" EC_ChangeAllType="ChangeAllFill" EC_ChangeType="ChangeOneFill" EC_CopySash="CopySash" EC_ReqClose="ReturnTree"></CardFill>
<CardFill CurrIndex="currFill"
CurrItem="FillList[currFill]"
FillList="m_FillList"
SashList="m_SashList"
SplittedList="m_SplittedList"
EC_ChangeAllType="ChangeAllFill"
EC_ChangeType="ChangeOneFill"
EC_AddSash="AddSash"
EC_CopySash="CopySash"
EC_ReqClose="ReturnTree">
</CardFill>
}
}
else if (currStep == CompileStep.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>
<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>
+14 -2
View File
@@ -831,7 +831,7 @@ namespace WebWindowComplex
{
foreach (Fill currFill in FillList)
{
currFill.SetFillType(type);
currFill.SetSelFillType(type);
}
await DoPreviewSvg();
}
@@ -871,7 +871,7 @@ namespace WebWindowComplex
private async Task ChangeOneFill(FillTypes type)
{
Fill fillChange = FillList.ElementAt(currFill);
fillChange.SetFillType(type);
fillChange.SetSelFillType(type);
await DoPreviewSvg();
}
@@ -961,6 +961,18 @@ namespace WebWindowComplex
await DoPreviewSvg();
}
/// <summary>
/// Metodo per aggiungere una Sash
/// </summary>
/// <param name="Args"></param>
/// <returns></returns>
private async Task AddSash(DataAreaSplitted Args)
{
Splitted currSplitted = Args.splitted;
bError = currSplitted.AddFirstSash();
await DoPreviewSvg();
}
/// <summary>
/// Metodo per copiare una Sash intera
/// </summary>
+13 -1
View File
@@ -6,7 +6,7 @@
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<Version>2.7.10.2212</Version>
<Version>2.7.10.2216</Version>
<Authors>Annamaria Sassi</Authors>
<Company>Egalware</Company>
<Description>Componente gestione Configurazioni avanzate Window per LUX</Description>
@@ -37,6 +37,18 @@
@@ -6,7 +6,7 @@
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<Version>2.7.10.2212</Version>
<Version>2.7.10.2216</Version>
<Authors>Annamaria Sassi</Authors>
<Company>Egalware</Company>
<Description>Componente gestione JWD per LUX</Description>
@@ -104,6 +104,27 @@