4 Commits

Author SHA1 Message Date
Annamaria Sassi 55935e6809 - Correzione reset shape con variazione dimensione split
- Cambiato bottoni Joints in CardFrame
2026-05-11 16:50:10 +02:00
Annamaria Sassi f4072faedb Correzione sash dimension edit (se in edit e avviene una modifica non cambia stato) 2026-05-11 16:19:55 +02:00
Annamaria Sassi fd143bc5ec Aggiornata visualizzazione valore min e max elementi 2026-05-11 14:53:15 +02:00
Annamaria Sassi cfed9635b7 Merge branch 'main' into develop 2026-04-30 15:20:16 +02:00
12 changed files with 210 additions and 113 deletions
+83 -57
View File
@@ -9,6 +9,8 @@ namespace WebWindowComplex.Compo
{
public partial class AreaSash
{
#region Public Properties
/// <summary>
/// Sash group corrente
/// </summary>
@@ -21,11 +23,11 @@ namespace WebWindowComplex.Compo
[Parameter]
public SashDimension CurrSashDim { get; set; } = null!;
/// <summary>
/// Lista di ante che si stanno editando
/// </summary>
[Parameter]
public List<int> SashDimEditList { get; set; } = null!;
///// <summary>
///// Lista di ante che si stanno editando
///// </summary>
//[Parameter]
//public List<int> SashDimEditList { get; set; } = null!;
/// <summary>
/// Lista delle sash
@@ -39,6 +41,12 @@ namespace WebWindowComplex.Compo
[CascadingParameter(Name = "User")]
public bool User { get; set; } = false!;
/// <summary>
/// Lista di sash dimension in stato edit
/// </summary>
[CascadingParameter(Name = "SashDimEditList")]
public List<int> SashDimEditList { get; set; } = null!;
/// <summary>
/// Indice della sash corrente
/// </summary>
@@ -70,10 +78,39 @@ namespace WebWindowComplex.Compo
[Parameter]
public EventCallback<DataUpdateRes> EC_ReqResetDict { get; set; }
#endregion Public Properties
#region Protected Methods
//protected override void OnParametersSet()
//{
// base.OnParametersSet();
//}
#endregion Protected Methods
#region Private Fields
private enum ModeView
{
NULL = 0,
View = 1,
Edit = 2
}
private bool ForceChangeAll = false;
private bool isOpen = false;
private ModeView mode { get; set; } = ModeView.View;
#endregion Private Fields
#region Private Properties
/// <summary>
/// Anta corrente
/// </summary>
public Area CurrAnta
private Area CurrAnta
{
get
{
@@ -92,32 +129,8 @@ namespace WebWindowComplex.Compo
}
}
/// <summary>
/// Metodo per avere il numero di decimali da usare nella form-input
/// </summary>
/// <returns></returns>
public int CssDecimals()
{
switch (CurrSashDim.MeasureType)
{
case Json.WindowConst.MeasureTypes.ABSOLUTE:
{
return 2;
}
case Json.WindowConst.MeasureTypes.PROPORTIONAL:
{
return 0;
}
case Json.WindowConst.MeasureTypes.PERCENTAGE:
{
return 1;
}
}
return 0;
}
///// <summary>
///// Metodo per avere il lo step da usare nella form-input
///// Metodo per avere lo step da usare nella form-input
///// </summary>
///// <returns></returns>
//public double CssStepNumber()
@@ -143,7 +156,7 @@ namespace WebWindowComplex.Compo
/// <summary>
/// Selezione tipo di apertura anta
/// </summary>
protected int OpeningTypeIndex
private int OpeningTypeIndex
{
get => CurrSashDim.SelOpeningTypeIndex;
set
@@ -160,7 +173,7 @@ namespace WebWindowComplex.Compo
/// <summary>
/// Selezione tipo di misura della dimensione dell'anta
/// </summary>
protected int MeasureTypeIndex
private int MeasureTypeIndex
{
get => CurrSashDim.SelMeasureTypeIndex;
set
@@ -176,7 +189,7 @@ namespace WebWindowComplex.Compo
/// <summary>
/// Inserimento dimensione anta
/// </summary>
protected double Dimension
private double Dimension
{
get => CurrSashDim.dDimension;
set
@@ -189,6 +202,34 @@ namespace WebWindowComplex.Compo
}
}
#endregion Private Properties
#region Private Methods
/// <summary>
/// Metodo per avere il numero di decimali da usare nella form-input
/// </summary>
/// <returns></returns>
private int CssDecimals()
{
switch (CurrSashDim.MeasureType)
{
case MeasureTypes.ABSOLUTE:
{
return 2;
}
case MeasureTypes.PROPORTIONAL:
{
return 0;
}
case MeasureTypes.PERCENTAGE:
{
return 1;
}
}
return 0;
}
/// <summary>
/// Sollevo evento richiesta per cambiare tutti i Joint
/// </summary>
@@ -203,8 +244,11 @@ namespace WebWindowComplex.Compo
frame.Shape is Json.WindowConst.Shapes.ARC_FULL ||
frame.Shape is Json.WindowConst.Shapes.DOUBLEARC ||
frame.Shape is Json.WindowConst.Shapes.THREECENTERARC) &&
(CurrSashGroup.ParentArea.ParentArea is Split &&
CurrSashGroup.ParentArea.ParentArea.AreaList.LastOrDefault().AreaList.FirstOrDefault().Equals(CurrSashGroup)))
(CurrSashGroup.ParentArea.ParentArea is Split split &&
split != null &&
split.AreaList.LastOrDefault() != null &&
split.AreaList.LastOrDefault()!.AreaList.FirstOrDefault() != null &&
split.AreaList.LastOrDefault()!.AreaList.FirstOrDefault()!.Equals(CurrSashGroup)))
{
if(CurrSashGroup.SashList.Count == 1)
{
@@ -319,8 +363,8 @@ namespace WebWindowComplex.Compo
/// <summary>
/// Copio contenuto anta da indexCopy a IndexModify
/// </summary>
/// <param name="IndexCopy"> Indice dell'ante di cui voglio copiare contenuto </param>
/// <param name="IndexModify"> Indice dell'ante di cui voglio modificare contenuto </param>
/// <param name="IndexCopy"> Indice dell'anta di cui voglio copiare contenuto </param>
/// <param name="IndexModify"> Indice dell'anta di cui voglio modificare contenuto </param>
/// <returns></returns>
private Task CopyContentSash(int IndexCopy, int IndexModify)
{
@@ -375,8 +419,6 @@ namespace WebWindowComplex.Compo
return EC_UpdateSash.InvokeAsync(args);
}
private bool isOpen = false;
private void ToggleDropdown()
{
isOpen = !isOpen;
@@ -397,26 +439,10 @@ namespace WebWindowComplex.Compo
return "btn btn-secondary btn-sm";
}
private enum ModeView
{
NULL = 0,
View = 1,
Edit = 2
}
protected override void OnParametersSet()
{
//if (EditMode)
// mode = ModeView.Edit;
//else
// mode = ModeView.View;
}
private ModeView mode { get; set; } = ModeView.View;
private void doEdit(int index)
{
var args = new DataChangeMode
{
//Edit = true,
IndexSashEdit = index,
IndexSashClose = -1
};
@@ -438,7 +464,7 @@ namespace WebWindowComplex.Compo
ForceChangeAll = !ForceChangeAll;
}
private bool ForceChangeAll = false;
#endregion Private Methods
}
public class DataChangeMode {
+1 -1
View File
@@ -106,7 +106,7 @@
@if (!User)
{
<div class="col-md-8 d-flex justify-content-end align-items-center">
<div class="d-flex flex-wrap gap-1" role="group">
<div class="btn-group" role="group">
<button type="button" class="@ButtonJointCss(Json.WindowConst.Joints.ANGLED)" @onclick="() => ChangeAllJoints(WebWindowComplex.Json.WindowConst.Joints.ANGLED)">Angled</button>
<button type="button" class="@ButtonJointCss(Json.WindowConst.Joints.FULL_H)" @onclick="() => ChangeAllJoints(WebWindowComplex.Json.WindowConst.Joints.FULL_H)">Horizontal</button>
<button type="button" class="@ButtonJointCss(Json.WindowConst.Joints.FULL_V)" @onclick="() => ChangeAllJoints(WebWindowComplex.Json.WindowConst.Joints.FULL_V)">Vertical</button>
@@ -214,7 +214,6 @@
<div class="@AreaSashCss(i)">
<AreaSash CurrSashDim="CurrSashGroup.SashList[i]"
IndexSash="i"
SashDimEditList="currSashDimEdit"
EC_UpdateSash="UpdateSash"
EC_UpdateSashDim="UpdateSashDimension"
EC_ReqResetDict="ResetDict"
+60 -37
View File
@@ -70,20 +70,48 @@ namespace WebWindowComplex.Compo
[CascadingParameter(Name = "SashGroupList")]
public List<Sash> SashGroupList { get; set; } = null!;
/// <summary>
/// Lista di sash dimension in stato edit
/// </summary>
[CascadingParameter(Name = "SashDimEditList")]
public List<int> SashDimEditList { get; set; } = null!;
/// <summary>
/// Frame corrente
/// </summary>
[Parameter]
public Frame FrameWindow { get; set; } = null!;
/// <summary>
/// Evento per salvare stato edit singole ante
/// </summary>
[Parameter]
public EventCallback<List<int>> EC_EditSashDim { get; set; }
#endregion Public Properties
#region Protected Properties
protected override void OnParametersSet()
{
currSashDimEdit = SashDimEditList;
}
#endregion Protected Properties
#region Private Fields
private bool editMode = false;
private List<int> currSashDimEdit = new List<int>();
#endregion Private Fields
#region Private Properties
/// <summary>
/// Selezione quantità di ante
/// </summary>
protected int SashQty
private int SashQty
{
get => CurrSashGroup.nSashQty;
set
@@ -100,7 +128,7 @@ namespace WebWindowComplex.Compo
};
_ = EC_UpdateSashGroup.InvokeAsync(args);
_ = EC_ReqElement.InvokeAsync(CurrSashGroup);
if(CurrSashGroup.SelHardware.Id != "000000")
if (CurrSashGroup.SelHardware.Id != "000000")
_ = EC_ReqOptionHw.InvokeAsync(CurrSashGroup);
}
}
@@ -109,7 +137,7 @@ namespace WebWindowComplex.Compo
/// <summary>
/// Selezione quantit bottom rail
/// </summary>
protected int SashBottomRailQty
private int SashBottomRailQty
{
get => CurrSashGroup.SashBottomRailQty;
set
@@ -133,7 +161,7 @@ namespace WebWindowComplex.Compo
/// <summary>
/// Selezione tipo di orientamento della sash
/// </summary>
protected int OrientationSashTypeIndex
private int OrientationSashTypeIndex
{
get => CurrSashGroup.SelOrientationSashTypeIndex;
set
@@ -153,7 +181,7 @@ namespace WebWindowComplex.Compo
/// <summary>
/// Selezione famiglia hardware
/// </summary>
protected string FamilyHardware
private string FamilyHardware
{
get => CurrSashGroup.SelFamilyHardware;
set
@@ -167,7 +195,7 @@ namespace WebWindowComplex.Compo
svgNoHw = true
};
_ = EC_UpdateSashGroup.InvokeAsync(args);
_ = EC_ReqResetDict.InvokeAsync(new DataUpdateRes { req = DataAction.ResetHwOpt});
_ = EC_ReqResetDict.InvokeAsync(new DataUpdateRes { req = DataAction.ResetHwOpt });
_ = EC_ReqOptionHw.InvokeAsync(CurrSashGroup);
}
}
@@ -176,7 +204,7 @@ namespace WebWindowComplex.Compo
/// <summary>
/// Selezione hardware
/// </summary>
protected string SelHwType
private string SelHwType
{
get => CurrSashGroup.SelHardwareFromId;
set
@@ -194,19 +222,19 @@ namespace WebWindowComplex.Compo
}
}
protected MeasureTypes MeasureType
private MeasureTypes MeasureType
{
get
get
{
MeasureTypes type = CurrSashGroup.SashList.First().SelMeasureType;
for (int i = 1; i < CurrSashGroup.SashList.Count; i++)
{
if(CurrSashGroup.SashList.ElementAt(i).SelMeasureType != type)
if (CurrSashGroup.SashList.ElementAt(i).SelMeasureType != type)
return MeasureTypes.NULL;
}
return type;
}
set
set
{
for (int i = 0; i < CurrSashGroup.SashList.Count; i++)
{
@@ -217,17 +245,17 @@ namespace WebWindowComplex.Compo
currSash = CurrSashGroup,
noSvg = true
};
_= EC_UpdateSashGroup.InvokeAsync(args);
_ = EC_UpdateSashGroup.InvokeAsync(args);
}
}
protected int ChangeType
private int ChangeType
{
get
{
return CurrSashGroup.bIsDimensionLight ? 1 : 0;
}
set
set
{
if (value == 1)
CurrSashGroup.bIsDimensionLight = true;
@@ -254,21 +282,21 @@ namespace WebWindowComplex.Compo
}
}
#endregion Protected Properties
#endregion Private Properties
#region Protected Methods
#region Private Methods
/// <summary>
/// Metodo per rimuovere area corrente
/// </summary>
/// <returns></returns>
protected async Task RemoveArea()
/// <summary>
/// Metodo per rimuovere area corrente
/// </summary>
/// <returns></returns>
private async Task RemoveArea()
{
CurrSashGroup.Remove();
if (FrameWindow.SelThreshold.Name.Contains("Threshold") && SashGroupList.IndexOf(CurrSashGroup) == 0)
{
Threshold? updThreshold = FrameWindow.ThresholdList.FirstOrDefault(x => x.Name != "Threshold");
if(updThreshold != null)
if (updThreshold != null)
FrameWindow.SelThresholdFromName = updThreshold.Name;
}
var args = new DataUpdateFrame()
@@ -277,8 +305,8 @@ namespace WebWindowComplex.Compo
groupIdDelete = CurrSashGroup.GroupId
};
// richiesta reset dict shape
await EC_ReqResetDict.InvokeAsync(new DataUpdateRes { req=DataAction.ResetDictShape});
await EC_ReqResetDict.InvokeAsync(new DataUpdateRes { req = DataAction.ResetDimElem});
await EC_ReqResetDict.InvokeAsync(new DataUpdateRes { req = DataAction.ResetDictShape });
await EC_ReqResetDict.InvokeAsync(new DataUpdateRes { req = DataAction.ResetDimElem });
await EC_UpdateFrame.InvokeAsync(args);
await EC_ReqClose.InvokeAsync(true);
}
@@ -289,7 +317,7 @@ namespace WebWindowComplex.Compo
/// <returns></returns>
private Task ChangeTypeDimension(bool type)
{
if(CurrSashGroup.bIsDimensionLight != type)
if (CurrSashGroup.bIsDimensionLight != type)
{
CurrSashGroup.bIsDimensionLight = type;
foreach (var CurrSashDim in CurrSashGroup.SashList)
@@ -344,11 +372,11 @@ namespace WebWindowComplex.Compo
/// </summary>
/// <param name="updateSD"></param>
/// <returns></returns>
protected async Task UpdateSashDimension(SashDimension updateSD)
private async Task UpdateSashDimension(SashDimension updateSD)
{
_ = EC_ReqResetDict.InvokeAsync(new DataUpdateRes { req = LayoutConst.DataAction.ResetDimElem });
var currRec = CurrSashGroup.SashList.First(x => x.nSashId == updateSD.nSashId);
if(currRec != null)
if (currRec != null)
{
currRec = updateSD;
var args = new DataUpdateSash
@@ -365,7 +393,7 @@ namespace WebWindowComplex.Compo
/// </summary>
/// <param name="updateS"></param>
/// <returns></returns>
protected async Task UpdateSash(DataUpdateProfile updateS)
private async Task UpdateSash(DataUpdateProfile updateS)
{
_ = EC_ReqResetDict.InvokeAsync(new DataUpdateRes { req = LayoutConst.DataAction.ResetDimElem });
if (updateS != null)
@@ -386,7 +414,7 @@ namespace WebWindowComplex.Compo
/// </summary>
/// <param name="updRec"></param>
/// <returns></returns>
protected async Task UpdateBottomRail(DataBottomRail updRec)
private async Task UpdateBottomRail(DataBottomRail updRec)
{
if (updRec.sash != null)
{
@@ -404,7 +432,7 @@ namespace WebWindowComplex.Compo
/// </summary>
/// <param name="updRec"></param>
/// <returns></returns>
protected async Task UpdateBottomRail(ElementDimension updRec)
private async Task UpdateBottomRail(ElementDimension updRec)
{
var currRec = CurrSashGroup.BottomRailElemDimList.FirstOrDefault(x => x.ParentArea == updRec.ParentArea && x.nIndex == updRec.nIndex);
if (currRec != null)
@@ -423,17 +451,11 @@ namespace WebWindowComplex.Compo
/// </summary>
/// <param name="args"></param>
/// <returns></returns>
protected Task ResetDict(DataUpdateRes args)
private Task ResetDict(DataUpdateRes args)
{
return EC_ReqResetDict.InvokeAsync(args);
}
#endregion Protected Methods
#region Private Methods
private bool editMode = false;
private List<int> currSashDimEdit = new List<int>();
private void EditView(DataChangeMode args)
{
//editMode = args.Edit;
@@ -441,6 +463,7 @@ namespace WebWindowComplex.Compo
currSashDimEdit.Add(args.IndexSashEdit);
if (args.IndexSashClose != -1)
currSashDimEdit.Remove(args.IndexSashClose);
_ = EC_EditSashDim.InvokeAsync(currSashDimEdit);
}
/// <summary>
+2 -2
View File
@@ -101,7 +101,7 @@ namespace WebWindowComplex.Compo
};
// richiesta reset dict shape
await EC_ReqResetDict.InvokeAsync(new DataUpdateRes { req = DataAction.ResetDictShape });
await EC_ReqResetDict.InvokeAsync(new DataUpdateRes { req = DataAction.ResetDictShape });
await EC_ReqResetDict.InvokeAsync(new DataUpdateRes { req = DataAction.ResetDimElem });
await EC_UpdateFrame.InvokeAsync(args);
await EC_ReqClose.InvokeAsync(true);
}
@@ -259,7 +259,7 @@ namespace WebWindowComplex.Compo
currSplit = CurrSplit,
noSvg = updRec.noSvg
};
//await EC_ReqResetDict.InvokeAsync(new DataUpdateRes { req = DataAction.ResetDictShape });
await EC_ReqResetDict.InvokeAsync(new DataUpdateRes { req = DataAction.ResetDictShape });
await EC_UpdateSplit.InvokeAsync(args);
}
}
+1 -2
View File
@@ -80,8 +80,7 @@
</button>
}
@if (ItemTableList[i].Type is Json.WindowConst.AreaTypes.FRAME &&
((SashGroupList.Count == 0 && SplitList.Count == 0) || !(FrameWindow.AreaList.First() is Split)) &&
FrameWindow.AreaList.FirstOrDefault() != null && FrameWindow.AreaList.First()!.AreaList.Count == 0)
((SashGroupList.Count == 0 && SplitList.Count == 0) || !(FrameWindow.AreaList.First() is Split)))
{
<div class="dropdown px-4">
<button class="btn btn-sm dropdown-toggle" type="button" @onclick="ToggleDropdownFrame">
+1 -1
View File
@@ -152,7 +152,7 @@ namespace WebWindowComplex.Compo
private string Title()
{
return "Max: " + CurrRec.dMaxDim + ", Min: " + CurrRec.dMinDim;
return "Min: " + CurrRec.dMinDim + ", Max: " + CurrRec.dMaxDim;
}
#endregion Private Properties
@@ -45,7 +45,7 @@ namespace WebWindowComplex.Compo
private string Title()
{
return "Max: " + CurrRec.dMaxDim + ", Min: " + CurrRec.dMinDim;
return "Min: " + CurrRec.dMinDim + ", Max: " + CurrRec.dMaxDim;
}
//private string name()
+12 -9
View File
@@ -178,15 +178,18 @@
<CascadingValue Value="currLoading" Name="IsLoading">
<CascadingValue Value="SashGroupList[currSashIndex]" Name="CurrSashGroup">
<CascadingValue Value="SashGroupList" Name="SashGroupList">
<CardSashGroup FrameWindow="FrameWindow"
EC_UpdateFrame="UpdatePreviewFrame"
EC_UpdateSashGroup="UpdatePreviewSashGroup"
EC_ReqResetDict="ReqResetDict"
EC_ReqOptionHw="UpdateHwOptionsSash"
EC_ReqFirstOptionHw="ReqFirstOptionHw"
EC_ReqElement="UpdateElementSash"
EC_ReqClose="ReturnTree">
</CardSashGroup>
<CascadingValue Value="SashDimEditList" Name="SashDimEditList">
<CardSashGroup FrameWindow="FrameWindow"
EC_UpdateFrame="UpdatePreviewFrame"
EC_UpdateSashGroup="UpdatePreviewSashGroup"
EC_ReqResetDict="ReqResetDict"
EC_ReqOptionHw="UpdateHwOptionsSash"
EC_ReqFirstOptionHw="ReqFirstOptionHw"
EC_ReqElement="UpdateElementSash"
EC_EditSashDim="UpdateSashDimEditList"
EC_ReqClose="ReturnTree">
</CardSashGroup>
</CascadingValue>
</CascadingValue>
</CascadingValue>
</CascadingValue>
+20
View File
@@ -373,6 +373,8 @@ namespace WebWindowComplex
/// </summary>
private LivePayload? prevLiveData = null;
private List<int> m_sashDimEditList = new List<int>();
#endregion Private Fields
#region Private Properties
@@ -433,6 +435,12 @@ namespace WebWindowComplex
get => m_SashGroupList;
}
private List<int> SashDimEditList
{
get => m_sashDimEditList;
set => m_sashDimEditList = value;
}
private string SelColorMaterial { get; set; } = "";
private string SelFamilyHardware { get; set; } = "";
@@ -1808,6 +1816,18 @@ namespace WebWindowComplex
}
}
/// <summary>
/// Aggiornamento lista SashDimension in stato edit
/// </summary>
/// <param name="sashEditList"></param>
/// <returns></returns>
private void UpdateSashDimEditList(List<int> sashEditList)
{
if (sashEditList != null && sashEditList.Count > 0)
{
SashDimEditList = sashEditList;
}
}
/// <summary>
/// Aggiornamento Element a causa di un cambiamento nello split
/// </summary>
+14 -1
View File
@@ -6,7 +6,7 @@
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<Version>3.1.4.2916</Version>
<Version>3.1.5.1116</Version>
<Authors>Annamaria Sassi</Authors>
<Company>Egalware</Company>
<Description>Componente gestione Configurazioni avanzate Window per LUX</Description>
@@ -186,6 +186,19 @@
@@ -6,7 +6,7 @@
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<Version>3.1.4.2910</Version>
<Version>3.1.5.1116</Version>
<Authors>Annamaria Sassi</Authors>
<Company>Egalware</Company>
<Description>Componente gestione JWD per LUX</Description>
@@ -276,6 +276,20 @@