- Modificata gestione elementi split (su dimensione secondaria si specifica solo una larghezza per split)
- Aggiunta gestione profili bottom rail per sash e frame - Iniziato a gestire dimensione solo luce per sash
This commit is contained in:
@@ -108,16 +108,6 @@
|
||||
"Index": 2,
|
||||
"Value": 78.0,
|
||||
"Area": 1
|
||||
},
|
||||
{
|
||||
"Index": 1,
|
||||
"Value": 78.0,
|
||||
"Area": 2
|
||||
},
|
||||
{
|
||||
"Index": 2,
|
||||
"Value": 78.0,
|
||||
"Area": 2
|
||||
}
|
||||
],
|
||||
"GroupId": 2,
|
||||
|
||||
@@ -39,6 +39,10 @@ namespace WebWindowComplex.Compo
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Metodo per aprire/chiudere area per hw option
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private async Task changeCollapsed()
|
||||
{
|
||||
hwOptCollapsed = !hwOptCollapsed;
|
||||
|
||||
@@ -116,29 +116,29 @@ namespace WebWindowComplex.Compo
|
||||
return 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Metodo per avere il lo step da usare nella form-input
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public double CssStepNumber()
|
||||
{
|
||||
switch (CurrSashDim.MeasureType)
|
||||
{
|
||||
case Json.WindowConst.MeasureTypes.ABSOLUTE:
|
||||
{
|
||||
return 0.5;
|
||||
}
|
||||
case Json.WindowConst.MeasureTypes.PROPORTIONAL:
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
case Json.WindowConst.MeasureTypes.PERCENTAGE:
|
||||
{
|
||||
return 0.5;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
///// <summary>
|
||||
///// Metodo per avere il lo step da usare nella form-input
|
||||
///// </summary>
|
||||
///// <returns></returns>
|
||||
//public double CssStepNumber()
|
||||
//{
|
||||
// switch (CurrSashDim.MeasureType)
|
||||
// {
|
||||
// case Json.WindowConst.MeasureTypes.ABSOLUTE:
|
||||
// {
|
||||
// return 0.5;
|
||||
// }
|
||||
// case Json.WindowConst.MeasureTypes.PROPORTIONAL:
|
||||
// {
|
||||
// return 1;
|
||||
// }
|
||||
// case Json.WindowConst.MeasureTypes.PERCENTAGE:
|
||||
// {
|
||||
// return 0.5;
|
||||
// }
|
||||
// }
|
||||
// return 0;
|
||||
//}
|
||||
|
||||
/// <summary>
|
||||
/// Selezione tipo di apertura anta
|
||||
@@ -192,6 +192,7 @@ namespace WebWindowComplex.Compo
|
||||
/// <summary>
|
||||
/// Sollevo evento richiesta per cambiare tutti i Joint
|
||||
/// </summary>
|
||||
/// <param name="JointType"> Tipo di giunto che si vuole </param>
|
||||
/// <returns></returns>
|
||||
private Task ChangeAllJoints(Json.WindowConst.Joints JointType)
|
||||
{
|
||||
@@ -203,7 +204,7 @@ namespace WebWindowComplex.Compo
|
||||
/// <summary>
|
||||
/// Aggiornamento joint
|
||||
/// </summary>
|
||||
/// <param name="updRec"></param>
|
||||
/// <param name="updRec"> Tipo di giunto che si vuole </param>
|
||||
/// <returns></returns>
|
||||
private async Task UpdateJoint(Joint updRec)
|
||||
{
|
||||
@@ -220,7 +221,7 @@ namespace WebWindowComplex.Compo
|
||||
/// <summary>
|
||||
/// Aggiornamento element
|
||||
/// </summary>
|
||||
/// <param name="updRec"></param>
|
||||
/// <param name="updRec"> Tipo di giunto che si vuole </param>
|
||||
/// <returns></returns>
|
||||
private async Task UpdateElement(ElementDimension updRec)
|
||||
{
|
||||
@@ -286,10 +287,12 @@ namespace WebWindowComplex.Compo
|
||||
};
|
||||
return EC_UpdateSash.InvokeAsync(args);
|
||||
}
|
||||
|
||||
|
||||
/// <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>
|
||||
/// <returns></returns>
|
||||
private Task CopyContentSash(int IndexCopy, int IndexModify)
|
||||
{
|
||||
@@ -353,6 +356,7 @@ namespace WebWindowComplex.Compo
|
||||
View = 1,
|
||||
Edit = 2
|
||||
}
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
if (EditMode)
|
||||
|
||||
@@ -39,6 +39,7 @@ namespace WebWindowComplex.Compo
|
||||
/// <summary>
|
||||
/// Metodo per copiare sash
|
||||
/// </summary>
|
||||
/// <param name="indexCurrSash"> Indice della finestra che si vuole copiare</param>
|
||||
/// <returns></returns>
|
||||
private Task RaiseCopySash(int indexCurrSash)
|
||||
{
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
<button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#BottomRail">
|
||||
<i class="fa-solid fa-pen-to-square"></i>
|
||||
</button>
|
||||
|
||||
<div class="modal fade" id="BottomRail" tabindex="-1" aria-labelledby="BottomRailLabel" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h1 class="modal-title fs-5" id="BottomRailLabel">Bottom Rail</h1>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
@if(CurrFrame() != null)
|
||||
{
|
||||
@for (int i = CurrFrame().BottomRailElemDimList.Count - 1; i >= 0; i-- )
|
||||
{
|
||||
<EditElement CurrRec="CurrFrame().BottomRailElemDimList.ElementAt(i)" IsBottomRail=true EC_Update="UpdateElement"></EditElement>
|
||||
}
|
||||
}
|
||||
@if (CurrSash() != null)
|
||||
{
|
||||
@for (int i = CurrSash().BottomRailElemDimList.Count - 1; i >= 0; i--)
|
||||
{
|
||||
<EditElement CurrRec="CurrSash().BottomRailElemDimList.ElementAt(i)" IsBottomRail=true EC_Update="UpdateElement"></EditElement>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,79 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using WebWindowComplex.Models;
|
||||
|
||||
namespace WebWindowComplex.Compo
|
||||
{
|
||||
public partial class BottomRail
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
[Parameter]
|
||||
public Area CurrArea { get; set; } = null!;
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<DataBottomRail> EC_UpdateBottomRail { get; set; }
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#region Private Properties
|
||||
|
||||
/// <summary>
|
||||
/// Aggiornamento element Bottom Rail
|
||||
/// </summary>
|
||||
/// <param name="updRec"></param>
|
||||
/// <returns></returns>
|
||||
private async Task UpdateElement(ElementDimension updRec)
|
||||
{
|
||||
if (updRec != null)
|
||||
{
|
||||
DataBottomRail ans = new();
|
||||
ElementDimension currRec = new(CurrArea, -1, 0);
|
||||
if (CurrFrame() != null)
|
||||
{
|
||||
// cerco il record
|
||||
currRec = CurrFrame().BottomRailElemDimList.FirstOrDefault(x => x.ParentArea == updRec.ParentArea && x.nIndex == updRec.nIndex);
|
||||
|
||||
}
|
||||
else if(CurrSash() != null)
|
||||
{
|
||||
// cerco il record
|
||||
currRec = CurrSash().BottomRailElemDimList.FirstOrDefault(x => x.ParentArea == updRec.ParentArea && x.nIndex == updRec.nIndex);
|
||||
}
|
||||
if (currRec != null)
|
||||
{
|
||||
currRec = updRec;
|
||||
ans = new DataBottomRail
|
||||
{
|
||||
frame = CurrFrame(),
|
||||
sash = CurrSash()
|
||||
};
|
||||
}
|
||||
await EC_UpdateBottomRail.InvokeAsync(ans);
|
||||
}
|
||||
}
|
||||
|
||||
private Frame? CurrFrame()
|
||||
{
|
||||
if(CurrArea is Frame)
|
||||
return (Frame)CurrArea;
|
||||
else
|
||||
return null;
|
||||
}
|
||||
|
||||
private Sash? CurrSash()
|
||||
{
|
||||
if (CurrArea is Sash)
|
||||
return (Sash)CurrArea;
|
||||
else
|
||||
return null;
|
||||
}
|
||||
|
||||
#endregion Private Properties
|
||||
}
|
||||
|
||||
public class DataBottomRail
|
||||
{
|
||||
public Sash? sash { get; set; }
|
||||
public Frame? frame { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -45,7 +45,7 @@ namespace WebWindowComplex.Compo
|
||||
/// <summary>
|
||||
/// Metodo per cambiare solo il Fill corrente
|
||||
/// </summary>
|
||||
/// <param name="reqFillType"> tipo di fill richiesto </param>
|
||||
/// <param name="reqFillType"> Tipo di fill richiesto </param>
|
||||
/// <returns></returns>
|
||||
protected Task ChangeOneFill(FillTypes reqFillType)
|
||||
{
|
||||
|
||||
@@ -80,11 +80,11 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
<input type="number" class="form-control" @bind="@FrameBottomRailQty">
|
||||
@if (CurrFrameWindow.BottomRailQty > 0)
|
||||
{
|
||||
<FrameBottomRail EC_UpdateFrame="UpdateFrame"></FrameBottomRail>
|
||||
<BottomRail CurrArea="CurrFrameWindow" EC_UpdateBottomRail="UpdateFrame"></BottomRail>
|
||||
}
|
||||
<input type="number" class="form-control" @bind="@FrameBottomRailQty">
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
@@ -102,17 +102,17 @@
|
||||
{
|
||||
<div class="col d-flex">
|
||||
<div class="input-group mb-2 justify-content-center">
|
||||
<button class="@ButtonJointCss(Json.WindowConst.Joints.ANGLED)" @onclick="() => ChangeAllJoints(WebWindowComplex.Json.WindowConst.Joints.ANGLED, CurrFrameWindow)">Angled</button>
|
||||
<button class="@ButtonJointCss(Json.WindowConst.Joints.ANGLED)" @onclick="() => ChangeAllJoints(WebWindowComplex.Json.WindowConst.Joints.ANGLED)">Angled</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col d-flex">
|
||||
<div class="input-group mb-2 justify-content-center">
|
||||
<button class="@ButtonJointCss(Json.WindowConst.Joints.FULL_H)" @onclick="() => ChangeAllJoints(WebWindowComplex.Json.WindowConst.Joints.FULL_H, CurrFrameWindow)">Horizontal</button>
|
||||
<button class="@ButtonJointCss(Json.WindowConst.Joints.FULL_H)" @onclick="() => ChangeAllJoints(WebWindowComplex.Json.WindowConst.Joints.FULL_H)">Horizontal</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col d-flex">
|
||||
<div class="input-group mb-2 justify-content-center">
|
||||
<button class="@ButtonJointCss(Json.WindowConst.Joints.FULL_V)" @onclick="() => ChangeAllJoints(WebWindowComplex.Json.WindowConst.Joints.FULL_V, CurrFrameWindow)">Vertical</button>
|
||||
<button class="@ButtonJointCss(Json.WindowConst.Joints.FULL_V)" @onclick="() => ChangeAllJoints(WebWindowComplex.Json.WindowConst.Joints.FULL_V)">Vertical</button>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
@@ -190,15 +190,13 @@ namespace WebWindowComplex.Compo
|
||||
/// <summary>
|
||||
/// Metodo per cambiare tutti i joint
|
||||
/// </summary>
|
||||
/// <param name="JointType"></param>
|
||||
/// <returns></returns>
|
||||
private Task ChangeAllJoints(Json.WindowConst.Joints JointType, Area a)
|
||||
private Task ChangeAllJoints(Json.WindowConst.Joints JointType)
|
||||
{
|
||||
if (a is Frame)
|
||||
foreach (Joint joint in CurrFrameWindow.JointList)
|
||||
{
|
||||
foreach (Joint joint in CurrFrameWindow.JointList)
|
||||
{
|
||||
joint.SetSelJointType(JointType);
|
||||
}
|
||||
joint.SetSelJointType(JointType);
|
||||
}
|
||||
var args = new DataUpdateFrame() { currFrame = CurrFrameWindow, svgNoHw = false };
|
||||
return EC_UpdateFrame.InvokeAsync(args);
|
||||
@@ -215,7 +213,8 @@ namespace WebWindowComplex.Compo
|
||||
/// <summary>
|
||||
/// Aggiornamento dimensione editata
|
||||
/// </summary>
|
||||
/// <param name="updRec"></param>
|
||||
/// <param name="updRec"> Dimensione aggiornata </param>
|
||||
/// <returns></returns>
|
||||
private async Task UpdateDim(FrameDimension updRec)
|
||||
{
|
||||
// cerco il record
|
||||
@@ -281,15 +280,15 @@ namespace WebWindowComplex.Compo
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Aggiornamento Bottom Rail
|
||||
/// Aggiornamento Frame
|
||||
/// </summary>
|
||||
/// <param name="updRec"></param>
|
||||
private async Task UpdateFrame(Frame updRec)
|
||||
private async Task UpdateFrame(DataBottomRail updRec)
|
||||
{
|
||||
// lo aggiorno
|
||||
if (updRec != null)
|
||||
if (updRec.frame != null)
|
||||
{
|
||||
CurrFrameWindow = updRec;
|
||||
CurrFrameWindow = updRec.frame;
|
||||
var args = new DataUpdateFrame()
|
||||
{
|
||||
currFrame = CurrFrameWindow,
|
||||
@@ -304,7 +303,7 @@ namespace WebWindowComplex.Compo
|
||||
/// </summary>
|
||||
/// <param name="type"></param>
|
||||
/// <returns></returns>
|
||||
private string ButtonJointCss(WebWindowComplex.Json.WindowConst.Joints type)
|
||||
private string ButtonJointCss(Json.WindowConst.Joints type)
|
||||
{
|
||||
foreach (var item in CurrFrameWindow.JointList)
|
||||
{
|
||||
|
||||
@@ -14,10 +14,10 @@
|
||||
<button class="btn btn-outline-secondary btn-sm" @onclick="() => RemoveArea()">Remove sash group</button>
|
||||
</div>
|
||||
</div>
|
||||
@* <div class="form-check form-switch">
|
||||
<div class="form-check form-switch">
|
||||
<input class="form-check-input" type="checkbox" role="switch" checked="@CurrSashGroup.bIsDimensionLight" @onclick="() => ChangeTypeDimension()">
|
||||
<label class="form-check-label" for="switchCheckDefault">Solo luce</label>
|
||||
</div> *@
|
||||
</div>
|
||||
}
|
||||
<div class="px-2">
|
||||
<button class="btn btn-close" @onclick="ReqClose"></button>
|
||||
@@ -69,11 +69,11 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
<input type="number" class="form-control" @bind="@SashBottomRailQty">
|
||||
@if (CurrSashGroup.SashBottomRailQty > 0)
|
||||
{
|
||||
<SashBottomRail EC_UpdateSash="UpdateSash"></SashBottomRail>
|
||||
<BottomRail CurrArea="CurrSashGroup" EC_UpdateBottomRail="UpdateBottomRail"></BottomRail>
|
||||
}
|
||||
<input type="number" class="form-control" @bind="@SashBottomRailQty">
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
@@ -198,6 +198,7 @@
|
||||
EditMode="editMode"
|
||||
EC_UpdateSash="UpdateSash"
|
||||
EC_UpdateSashDim="UpdateSashDimension"
|
||||
EC_ReqResetDict="ResetDict"
|
||||
EC_EditView="EditView">
|
||||
</AreaSash>
|
||||
}
|
||||
|
||||
@@ -198,9 +198,8 @@ namespace WebWindowComplex.Compo
|
||||
#region Protected Methods
|
||||
|
||||
/// <summary>
|
||||
/// Metodo per rimuovere area
|
||||
/// Metodo per rimuovere area corrente
|
||||
/// </summary>
|
||||
/// <param name="currArea"> area da rimuovere </param>
|
||||
/// <returns></returns>
|
||||
protected async Task RemoveArea()
|
||||
{
|
||||
@@ -218,37 +217,37 @@ namespace WebWindowComplex.Compo
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Metodo per cambiare l'anta su cui è presente la maniglia
|
||||
/// Metodo per cambiare dimensione solo luce
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
//private async Task ChangeTypeDimension()
|
||||
//{
|
||||
// CurrSashGroup.bIsDimensionLight = !CurrSashGroup.bIsDimensionLight;
|
||||
// foreach(var CurrSashDim in CurrSashGroup.SashList)
|
||||
// {
|
||||
// if(CurrSashDim.SelMeasureType is MeasureTypes.ABSOLUTE)
|
||||
// {
|
||||
// if (CurrSashGroup.bIsDimensionLight)
|
||||
// {
|
||||
// CurrSashDim.SetDimensionLight(CurrSashDim.dDimension -
|
||||
// CurrSashDim.ElementDimensionList.ElementAt(1).dDimension -
|
||||
// CurrSashDim.ElementDimensionList.ElementAt(3).dDimension);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// CurrSashDim.SetDimensionLight(CurrSashDim.dDimension +
|
||||
// CurrSashDim.ElementDimensionList.ElementAt(1).dDimension +
|
||||
// CurrSashDim.ElementDimensionList.ElementAt(3).dDimension);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// DataUpdateSash args = new DataUpdateSash()
|
||||
// {
|
||||
// currSash = CurrSashGroup,
|
||||
// noSvg = false
|
||||
// };
|
||||
// await EC_UpdateSashGroup.InvokeAsync(args);
|
||||
//}
|
||||
private Task ChangeTypeDimension()
|
||||
{
|
||||
CurrSashGroup.bIsDimensionLight = !CurrSashGroup.bIsDimensionLight;
|
||||
foreach (var CurrSashDim in CurrSashGroup.SashList)
|
||||
{
|
||||
if (CurrSashDim.SelMeasureType is MeasureTypes.ABSOLUTE)
|
||||
{
|
||||
if (CurrSashGroup.bIsDimensionLight)
|
||||
{
|
||||
CurrSashDim.SetDimensionLight(CurrSashDim.dDimension -
|
||||
CurrSashDim.ElementDimensionList.ElementAt(1).dDimension -
|
||||
CurrSashDim.ElementDimensionList.Last().dDimension);
|
||||
}
|
||||
else
|
||||
{
|
||||
CurrSashDim.SetDimensionLight(CurrSashDim.dDimension +
|
||||
CurrSashDim.ElementDimensionList.ElementAt(1).dDimension +
|
||||
CurrSashDim.ElementDimensionList.Last().dDimension);
|
||||
}
|
||||
}
|
||||
}
|
||||
DataUpdateSash args = new DataUpdateSash()
|
||||
{
|
||||
currSash = CurrSashGroup,
|
||||
noSvg = false
|
||||
};
|
||||
return EC_UpdateSashGroup.InvokeAsync(args);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Metodo per scegliere tipo di misura
|
||||
@@ -288,7 +287,7 @@ namespace WebWindowComplex.Compo
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Metodo per aggiornare sash
|
||||
/// Metodo per aggiornare sash group
|
||||
/// </summary>
|
||||
/// <param name="updateS"></param>
|
||||
/// <returns></returns>
|
||||
@@ -309,9 +308,27 @@ namespace WebWindowComplex.Compo
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Metodo per aggiornare sash
|
||||
/// Metodo per aggiornare sash group
|
||||
/// </summary>
|
||||
/// <param name="updateS"></param>
|
||||
/// <param name="updRec"></param>
|
||||
/// <returns></returns>
|
||||
protected async Task UpdateBottomRail(DataBottomRail updRec)
|
||||
{
|
||||
if (updRec.sash != null)
|
||||
{
|
||||
CurrSashGroup = updRec.sash;
|
||||
var args = new DataUpdateSash
|
||||
{
|
||||
currSash = CurrSashGroup
|
||||
};
|
||||
await EC_UpdateSashGroup.InvokeAsync(args);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Metodo per aggiornare bottom rail
|
||||
/// </summary>
|
||||
/// <param name="updRec"></param>
|
||||
/// <returns></returns>
|
||||
protected async Task UpdateBottomRail(ElementDimension updRec)
|
||||
{
|
||||
@@ -327,6 +344,11 @@ namespace WebWindowComplex.Compo
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Metodo per resettare dizionario richiesto
|
||||
/// </summary>
|
||||
/// <param name="args"></param>
|
||||
/// <returns></returns>
|
||||
protected Task ResetDict(DataUpdateRes args)
|
||||
{
|
||||
return EC_ReqResetDict.InvokeAsync(args);
|
||||
@@ -358,7 +380,7 @@ namespace WebWindowComplex.Compo
|
||||
/// <summary>
|
||||
/// Aggiornamento opzioni hardware
|
||||
/// </summary>
|
||||
/// <param name="updRec"></param>
|
||||
/// <param name="argsHw"></param>
|
||||
/// <returns></returns>
|
||||
private async Task UpdateOpt(DataUpdateHwOption argsHw)
|
||||
{
|
||||
@@ -368,40 +390,28 @@ namespace WebWindowComplex.Compo
|
||||
{
|
||||
// cerco il record
|
||||
var currRec = CurrSashGroup.HwOptionList.FirstOrDefault(x => x.sName == AGBOptCombo.sName && x.sDescription == AGBOptCombo.sDescription);
|
||||
// lo aggiorno
|
||||
if (AGBOptCombo != null)
|
||||
{
|
||||
currRec = AGBOptCombo;
|
||||
var args = new DataUpdateSash
|
||||
{
|
||||
currSash = CurrSashGroup
|
||||
};
|
||||
await EC_UpdateSashGroup.InvokeAsync(args);
|
||||
await EC_ReqOptionHw.InvokeAsync(CurrSashGroup);
|
||||
}
|
||||
currRec = AGBOptCombo;
|
||||
}
|
||||
else
|
||||
else if(AGBOptText != null)
|
||||
{
|
||||
// cerco il record
|
||||
var currRec = CurrSashGroup.HwOptionList.FirstOrDefault(x => x.sName == AGBOptText.sName && x.sDescription == AGBOptText.sDescription);
|
||||
// lo aggiorno
|
||||
if (AGBOptText != null)
|
||||
currRec = AGBOptText;
|
||||
}
|
||||
if(AGBOptCombo != null || AGBOptText != null)
|
||||
{
|
||||
var args = new DataUpdateSash
|
||||
{
|
||||
currRec = AGBOptText;
|
||||
var args = new DataUpdateSash
|
||||
{
|
||||
currSash = CurrSashGroup
|
||||
};
|
||||
await EC_UpdateSashGroup.InvokeAsync(args);
|
||||
await EC_ReqOptionHw.InvokeAsync(CurrSashGroup);
|
||||
}
|
||||
currSash = CurrSashGroup
|
||||
};
|
||||
await EC_UpdateSashGroup.InvokeAsync(args);
|
||||
await EC_ReqOptionHw.InvokeAsync(CurrSashGroup);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Prima chiamata hw option list
|
||||
/// </summary>
|
||||
/// <param name="updRec"></param>
|
||||
/// <returns></returns>
|
||||
private Task FirstHwOptionList()
|
||||
{
|
||||
@@ -409,16 +419,6 @@ namespace WebWindowComplex.Compo
|
||||
return EC_ReqFirstOptionHw.InvokeAsync(CurrSashGroup);
|
||||
}
|
||||
|
||||
private string ButtonMeasureCss(MeasureTypes type)
|
||||
{
|
||||
foreach(var item in CurrSashGroup.SashList)
|
||||
{
|
||||
if (!item.SelMeasureType.Equals(type))
|
||||
return "btn btn-outline-secondary btn-sm";
|
||||
}
|
||||
return "btn btn-secondary btn-sm";
|
||||
}
|
||||
|
||||
private bool isOpen = false;
|
||||
private void ToggleDropdown()
|
||||
{
|
||||
|
||||
@@ -181,7 +181,7 @@
|
||||
<div class="d-flex justify-content-start align-items-center px-2">
|
||||
<h6>Element vert</h6>
|
||||
</div>
|
||||
@foreach (var element in CurrSplit.ElemDimVertList)
|
||||
@foreach (var element in vertList())
|
||||
{
|
||||
<EditSplitElement CurrRec="element" EC_Update="UpdateElement"></EditSplitElement>
|
||||
}
|
||||
@@ -193,7 +193,7 @@
|
||||
<div class="d-flex justify-content-start align-items-center px-2">
|
||||
<h6>Element horiz</h6>
|
||||
</div>
|
||||
@foreach (var element in CurrSplit.ElemDimHorizList)
|
||||
@foreach (var element in horizList())
|
||||
{
|
||||
<EditSplitElement CurrRec="element" EC_Update="UpdateElement"></EditSplitElement>
|
||||
}
|
||||
|
||||
@@ -196,12 +196,34 @@ namespace WebWindowComplex.Compo
|
||||
/// <returns></returns>
|
||||
private async Task UpdateElement(SplitElementDimension updRec)
|
||||
{
|
||||
// cerco il record
|
||||
var currRec = CurrSplit.ElemDimHorizList.FirstOrDefault(x => x.ParentArea == updRec.ParentArea && x.nIndex == updRec.nIndex);
|
||||
// lo aggiorno
|
||||
if (updRec != null)
|
||||
{
|
||||
currRec = updRec;
|
||||
SplitElementDimension? currRec = new SplitElementDimension(null, 0,0,-1);
|
||||
if (updRec.nSubArea != 0)
|
||||
{
|
||||
List<SplitElementDimension> ElemIndexList = new List<SplitElementDimension>();
|
||||
if (CurrSplit.bSplitStartVert)
|
||||
ElemIndexList = CurrSplit.ElemDimHorizList
|
||||
.Where(x => x.nSubArea != updRec.nSubArea && x.nIndex == updRec.nIndex)
|
||||
.ToList();
|
||||
else
|
||||
ElemIndexList = CurrSplit.ElemDimVertList
|
||||
.Where(x => x.nSubArea == updRec.nSubArea && x.nIndex == updRec.nIndex)
|
||||
.ToList();
|
||||
foreach (var item in ElemIndexList)
|
||||
{
|
||||
item.dDimension = updRec.dDimension;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(CurrSplit.bSplitStartVert)
|
||||
currRec = CurrSplit.ElemDimVertList.FirstOrDefault(x => x.ParentArea == updRec.ParentArea && x.nIndex == updRec.nIndex);
|
||||
else
|
||||
currRec = CurrSplit.ElemDimHorizList.FirstOrDefault(x => x.ParentArea == updRec.ParentArea && x.nIndex == updRec.nIndex);
|
||||
// lo aggiorno
|
||||
currRec = updRec;
|
||||
}
|
||||
var args = new DataUpdateSplit()
|
||||
{
|
||||
currSplit = CurrSplit,
|
||||
@@ -331,6 +353,18 @@ namespace WebWindowComplex.Compo
|
||||
};
|
||||
return EC_UpdateSplit.InvokeAsync(args);
|
||||
}
|
||||
|
||||
private List<SplitElementDimension> horizList()
|
||||
{
|
||||
int subAreaMin = CurrSplit.ElemDimHorizList.Min(x => x.nSubArea);
|
||||
return CurrSplit.ElemDimHorizList.Where(x => x.nSubArea == subAreaMin).ToList();
|
||||
}
|
||||
|
||||
private List<SplitElementDimension> vertList()
|
||||
{
|
||||
int subAreaMin = CurrSplit.ElemDimVertList.Min(x => x.nSubArea);
|
||||
return CurrSplit.ElemDimVertList.Where(x => x.nSubArea == subAreaMin).ToList();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace WebWindowComplex.Compo
|
||||
|
||||
#region Private Properties
|
||||
/// <summary>
|
||||
/// Metodo per aggiornare element corrente
|
||||
/// Metodo per aggiornare nome element corrente
|
||||
/// </summary>
|
||||
private string name()
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
@using static WebWindowComplex.LayoutConst
|
||||
<div class="input-group mb-2">
|
||||
<span class="input-group-text">@name()</span>
|
||||
<span class="input-group-text">@CurrRec.nIndex</span>
|
||||
@if (User)
|
||||
{
|
||||
<input type="text" readonly class="form-control" value="@(CurrRec.dDimension)">
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace WebWindowComplex.Compo
|
||||
#region Public Properties
|
||||
|
||||
/// <summary>
|
||||
/// Joint corrente
|
||||
/// Element corrente
|
||||
/// </summary>
|
||||
[Parameter]
|
||||
public SplitElementDimension CurrRec { get; set; } = null!;
|
||||
@@ -42,14 +42,15 @@ namespace WebWindowComplex.Compo
|
||||
}
|
||||
}
|
||||
}
|
||||
private string name()
|
||||
{
|
||||
string ans = "";
|
||||
if (CurrRec.nSubArea > 0)
|
||||
ans = ans + "A:" + CurrRec.nSubArea + ", ";
|
||||
ans = ans + "N:" + CurrRec.nIndex;
|
||||
return ans;
|
||||
}
|
||||
|
||||
//private string name()
|
||||
//{
|
||||
// string ans = "";
|
||||
// if (CurrRec.nSubArea > 0)
|
||||
// ans = ans + "A:" + CurrRec.nSubArea + ", ";
|
||||
// ans = ans + "N:" + CurrRec.nIndex;
|
||||
// return ans;
|
||||
//}
|
||||
|
||||
#endregion Private Properties
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace WebWindowComplex.Compo
|
||||
#region Private Properties
|
||||
|
||||
/// <summary>
|
||||
/// Aggiornamento element
|
||||
/// Aggiornamento element Bottom Rail
|
||||
/// </summary>
|
||||
/// <param name="updRec"></param>
|
||||
/// <returns></returns>
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace WebWindowComplex.Compo
|
||||
public Sash SashGroup { get; set; } = null!;
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<DataUpdateProfile> EC_UpdateSash { get; set; }
|
||||
public EventCallback<Sash> EC_UpdateSash { get; set; }
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
@@ -33,12 +33,7 @@ namespace WebWindowComplex.Compo
|
||||
if (updRec != null)
|
||||
{
|
||||
currRec = updRec;
|
||||
DataUpdateProfile ans = new DataUpdateProfile
|
||||
{
|
||||
sash = SashGroup,
|
||||
reqProfile = false
|
||||
};
|
||||
await EC_UpdateSash.InvokeAsync(ans);
|
||||
await EC_UpdateSash.InvokeAsync(SashGroup);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -305,13 +305,23 @@ namespace WebWindowComplex.Json
|
||||
newFrame.SetSelThresholdFromName(m_Threshold);
|
||||
newFrame.SetBottomRail(m_bBottomRail);
|
||||
newFrame.SetBottomRailQty(m_nBottomRailQty);
|
||||
for (int i = 0; i < m_nBottomRailQty; i++)
|
||||
if(m_nBottomRailQty > 1)
|
||||
{
|
||||
newFrame.BottomRailElemDimList.Add(new ElementDimension(newFrame, BottomRailElemDimList[i].Index, BottomRailElemDimList[i].Value));
|
||||
newFrame.BottomRailElemDimList.ElementAt(i).SetNameElement("Frame_Rail_Bottom");
|
||||
for (int i = 0; i < m_nBottomRailQty-1; i++)
|
||||
{
|
||||
newFrame.BottomRailElemDimList.Add(new ElementDimension(newFrame, BottomRailElemDimList[i].Index, BottomRailElemDimList[i].Value));
|
||||
newFrame.BottomRailElemDimList.ElementAt(i).SetNameElement("Frame_Rail");
|
||||
newFrame.BottomRailElemDimList.ElementAt(i).SetMinDimension(Window.m_ParameterList.GetValueOrDefault(newFrame.BottomRailElemDimList.ElementAt(i).sName + "_DimMin"));
|
||||
newFrame.BottomRailElemDimList.ElementAt(i).SetMaxDimension(Window.m_ParameterList.GetValueOrDefault(newFrame.BottomRailElemDimList.ElementAt(i).sName + "_DimMax"));
|
||||
}
|
||||
}
|
||||
if (m_nBottomRailQty > 0)
|
||||
{
|
||||
newFrame.BottomRailElemDimList.Add(new ElementDimension(newFrame, BottomRailElemDimList.Last().Index, BottomRailElemDimList.Last().Value));
|
||||
newFrame.BottomRailElemDimList.Last().SetNameElement("Frame_Fill_Rail");
|
||||
newFrame.BottomRailElemDimList.Last().SetMinDimension(Window.m_ParameterList.GetValueOrDefault(newFrame.BottomRailElemDimList.Last().sName + "_DimMin"));
|
||||
newFrame.BottomRailElemDimList.Last().SetMaxDimension(Window.m_ParameterList.GetValueOrDefault(newFrame.BottomRailElemDimList.Last().sName + "_DimMax"));
|
||||
}
|
||||
if(m_nBottomRailQty > 0)
|
||||
newFrame.BottomRailElemDimList.ElementAt(m_nBottomRailQty - 1).SetNameElement("Frame_Fill_Rail");
|
||||
//if(ArcElement != null)
|
||||
// newFrame.SetFrameArcElem(ArcElement.Deserialize(newFrame, ParentWindow));
|
||||
//Frame.AppliedDone();
|
||||
@@ -349,19 +359,19 @@ namespace WebWindowComplex.Json
|
||||
}
|
||||
}
|
||||
|
||||
//private bool m_bIsDimensionLight;
|
||||
//[JsonProperty]
|
||||
//public bool IsDimensionLight
|
||||
//{
|
||||
// get
|
||||
// {
|
||||
// return m_bIsDimensionLight;
|
||||
// }
|
||||
// set
|
||||
// {
|
||||
// m_bIsDimensionLight = value;
|
||||
// }
|
||||
//}
|
||||
private bool m_bIsDimensionLight;
|
||||
[JsonProperty]
|
||||
public bool IsDimensionLight
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_bIsDimensionLight;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_bIsDimensionLight = value;
|
||||
}
|
||||
}
|
||||
|
||||
private List<JsonSashDimension> m_SashList = new List<JsonSashDimension>();
|
||||
[JsonProperty]
|
||||
@@ -476,10 +486,10 @@ namespace WebWindowComplex.Json
|
||||
{
|
||||
}
|
||||
|
||||
public JsonSash(bool IsSashVertical, SashTypes SashType, bool SashBottomRail, int SashBottomRailQty, string Hardware, int GroupId) : base(AreaTypes.SASH)
|
||||
public JsonSash(bool IsSashVertical, SashTypes SashType, bool SashBottomRail, int SashBottomRailQty, string Hardware, int GroupId, bool IsDimensionLight = false) : base(AreaTypes.SASH)
|
||||
{
|
||||
m_bIsSashVertical = IsSashVertical;
|
||||
//m_bIsDimensionLight = IsDimensionLight;
|
||||
m_bIsDimensionLight = IsDimensionLight;
|
||||
m_SashType = SashType;
|
||||
m_bBottomRail = SashBottomRail;
|
||||
m_nBottomRailQty = SashBottomRailQty;
|
||||
@@ -492,18 +502,28 @@ namespace WebWindowComplex.Json
|
||||
Sash newSash = new Sash(ParentArea, ParentWindow);
|
||||
newSash.SetGroupId(GroupId);
|
||||
newSash.SetAreaType(AreaTypes.SASH);
|
||||
//newSash.SetIsDimensionLight(IsDimensionLight);
|
||||
newSash.SetIsDimensionLight(IsDimensionLight);
|
||||
newSash.SetSashQty(m_SashList.Count);
|
||||
newSash.SetIsSashVertical(m_bIsSashVertical);
|
||||
newSash.SetSashBottomRail(m_bBottomRail);
|
||||
newSash.SetSashBottomRailQty(m_nBottomRailQty);
|
||||
for(int i = 0; i < m_nBottomRailQty; i++)
|
||||
if (m_nBottomRailQty > 1)
|
||||
{
|
||||
newSash.BottomRailElemDimList.Add(new ElementDimension(newSash, BottomRailElemDimList[i].Index, BottomRailElemDimList[i].Value));
|
||||
newSash.BottomRailElemDimList.ElementAt(i).SetNameElement("Sash_Rail_Bottom");
|
||||
for (int i = 0; i < m_nBottomRailQty - 1; i++)
|
||||
{
|
||||
newSash.BottomRailElemDimList.Add(new ElementDimension(newSash, BottomRailElemDimList[i].Index, BottomRailElemDimList[i].Value));
|
||||
newSash.BottomRailElemDimList.ElementAt(i).SetNameElement("Sash_Rail");
|
||||
newSash.BottomRailElemDimList.ElementAt(i).SetMinDimension(Window.m_ParameterList.GetValueOrDefault(newSash.BottomRailElemDimList.ElementAt(i).sName + "_DimMin"));
|
||||
newSash.BottomRailElemDimList.ElementAt(i).SetMaxDimension(Window.m_ParameterList.GetValueOrDefault(newSash.BottomRailElemDimList.ElementAt(i).sName + "_DimMax"));
|
||||
}
|
||||
}
|
||||
if (m_nBottomRailQty > 0)
|
||||
newSash.BottomRailElemDimList.ElementAt(m_nBottomRailQty - 1).SetNameElement("Sash_Fill_Rail");
|
||||
{
|
||||
newSash.BottomRailElemDimList.Add(new ElementDimension(newSash, BottomRailElemDimList.Last().Index, BottomRailElemDimList.Last().Value));
|
||||
newSash.BottomRailElemDimList.Last().SetNameElement("Sash_Fill_Rail");
|
||||
newSash.BottomRailElemDimList.Last().SetMinDimension(Window.m_ParameterList.GetValueOrDefault(newSash.BottomRailElemDimList.Last().sName + "_DimMin"));
|
||||
newSash.BottomRailElemDimList.Last().SetMaxDimension(Window.m_ParameterList.GetValueOrDefault(newSash.BottomRailElemDimList.Last().sName + "_DimMax"));
|
||||
}
|
||||
for (var SashIndex = 0; SashIndex <= m_SashList.Count - 1; SashIndex++)
|
||||
{
|
||||
newSash.SashList[SashIndex].SetOpeningType(m_SashList[SashIndex].OpeningType);
|
||||
@@ -641,7 +661,9 @@ namespace WebWindowComplex.Json
|
||||
split.SplitVertList[SplitIndex].SetDimension(m_SplitVertList[SplitIndex].Dimension);
|
||||
split.SplitVertList[SplitIndex].SetMeasureType(m_SplitVertList[SplitIndex].MeasureType);
|
||||
}
|
||||
for (int index = 0; index < ElementDimVertList.Count; index++)
|
||||
int subAreaMin = ElementDimVertList.Min(x => x.Area);
|
||||
List<JsonSplitElementDimension> vertList = ElementDimVertList.Where(x => x.Area == subAreaMin).ToList();
|
||||
for (int index = 0; index < vertList.Count; index++)
|
||||
{
|
||||
split.ElemDimVertList.ElementAt(index).SetSubArea(m_ElemDimVertList[index].Area);
|
||||
split.ElemDimVertList.ElementAt(index).SetIndex(m_ElemDimVertList[index].Index);
|
||||
@@ -659,7 +681,9 @@ namespace WebWindowComplex.Json
|
||||
split.SplitHorizList[SplitIndex].SetDimension(m_SplitHorizList[SplitIndex].Dimension);
|
||||
split.SplitHorizList[SplitIndex].SetMeasureType(m_SplitHorizList[SplitIndex].MeasureType);
|
||||
}
|
||||
for (int index = 0; index < ElementDimHorizList.Count; index++)
|
||||
int subAreaMin = ElementDimHorizList.Min(x => x.Area);
|
||||
List<JsonSplitElementDimension> horizList = ElementDimHorizList.Where(x => x.Area == subAreaMin).ToList();
|
||||
for (int index = 0; index < horizList.Count; index++)
|
||||
{
|
||||
split.ElemDimHorizList.ElementAt(index).SetSubArea(m_ElemDimHorizList[index].Area);
|
||||
split.ElemDimHorizList.ElementAt(index).SetIndex(m_ElemDimHorizList[index].Index);
|
||||
|
||||
@@ -101,9 +101,14 @@ namespace WebWindowComplex.Models
|
||||
public void AddFirstSash()
|
||||
{
|
||||
// Salvo il parent
|
||||
Area ParentArea = AreaList[0].ParentArea;
|
||||
if(this is Frame)
|
||||
{
|
||||
Frame f = (Frame)this;
|
||||
f.BottomRailQty = 0;
|
||||
f.BottomRailElemDimList.Clear();
|
||||
}
|
||||
// Creo area sash di default
|
||||
Sash SashArea = Sash.CreateSash(ParentArea);
|
||||
Sash SashArea = Sash.CreateSash(this);
|
||||
// Inserisco famiglia hardware vuota
|
||||
SashArea.SetSelFamilyHardware("");
|
||||
// Inserisco hardware di default
|
||||
|
||||
@@ -97,17 +97,36 @@ namespace WebWindowComplex.Models
|
||||
}
|
||||
set
|
||||
{
|
||||
if (m_nBottomRailQty >= 0)
|
||||
if (value >= 0)
|
||||
{
|
||||
if(value > m_nBottomRailQty)
|
||||
{
|
||||
// Aggiungo un element
|
||||
// Aggiungo un element in coda
|
||||
BottomRailElemDimList.Add(new ElementDimension(this, BottomRailElemDimList.Count + 1, 78));
|
||||
BottomRailElemDimList.Last().SetNameElement("Frame_Fill_Rail");
|
||||
BottomRailElemDimList.Last().SetMinDimension(Window.m_ParameterList.GetValueOrDefault(BottomRailElemDimList.Last().sName + "_DimMin"));
|
||||
BottomRailElemDimList.Last().SetMaxDimension(Window.m_ParameterList.GetValueOrDefault(BottomRailElemDimList.Last().sName + "_DimMax"));
|
||||
BottomRailElemDimList.Last().SetDimension(Window.m_ParameterList.GetValueOrDefault(BottomRailElemDimList.Last().sName + "_DimStd"));
|
||||
if (value > 1 && BottomRailElemDimList.Count - 2 >= 0)
|
||||
{
|
||||
BottomRailElemDimList.ElementAt(BottomRailElemDimList.Count - 2).SetNameElement("Frame_Rail");
|
||||
BottomRailElemDimList.ElementAt(BottomRailElemDimList.Count - 2).SetMinDimension(Window.m_ParameterList.GetValueOrDefault(BottomRailElemDimList.ElementAt(BottomRailElemDimList.Count - 2).sName + "_DimMin"));
|
||||
BottomRailElemDimList.ElementAt(BottomRailElemDimList.Count - 2).SetMaxDimension(Window.m_ParameterList.GetValueOrDefault(BottomRailElemDimList.ElementAt(BottomRailElemDimList.Count - 2).sName + "_DimMax"));
|
||||
BottomRailElemDimList.ElementAt(BottomRailElemDimList.Count - 2).SetDimension(BottomRailElemDimList.ElementAt(BottomRailElemDimList.Count - 2).dDimension);
|
||||
}
|
||||
}
|
||||
else if (value < m_nBottomRailQty)
|
||||
{
|
||||
// Elimino un element
|
||||
BottomRailElemDimList.RemoveAt(BottomRailElemDimList.Count - 1);
|
||||
// Elimino gli element
|
||||
for(int i = BottomRailElemDimList.Count-1; i == value; i--)
|
||||
BottomRailElemDimList.RemoveAt(i);
|
||||
if (value >= 1)
|
||||
{
|
||||
BottomRailElemDimList.Last().SetNameElement("Frame_Fill_Rail");
|
||||
BottomRailElemDimList.Last().SetMinDimension(Window.m_ParameterList.GetValueOrDefault(BottomRailElemDimList.Last().sName + "_DimMin"));
|
||||
BottomRailElemDimList.Last().SetMaxDimension(Window.m_ParameterList.GetValueOrDefault(BottomRailElemDimList.Last().sName + "_DimMax"));
|
||||
BottomRailElemDimList.Last().SetDimension(BottomRailElemDimList.Last().dDimension);
|
||||
}
|
||||
}
|
||||
m_nBottomRailQty = value;
|
||||
if (value > 0)
|
||||
|
||||
@@ -451,11 +451,30 @@ namespace WebWindowComplex.Models
|
||||
{
|
||||
// Aggiungo un element
|
||||
BottomRailElemDimList.Add(new ElementDimension(this, BottomRailElemDimList.Count + 1, 78));
|
||||
BottomRailElemDimList.Last().SetNameElement("Sash_Fill_Rail");
|
||||
BottomRailElemDimList.Last().SetMinDimension(Window.m_ParameterList.GetValueOrDefault(BottomRailElemDimList.Last().sName + "_DimMin"));
|
||||
BottomRailElemDimList.Last().SetMaxDimension(Window.m_ParameterList.GetValueOrDefault(BottomRailElemDimList.Last().sName + "_DimMax"));
|
||||
BottomRailElemDimList.Last().SetDimension(Window.m_ParameterList.GetValueOrDefault(BottomRailElemDimList.Last().sName + "_DimStd"));
|
||||
if (value > 1 && BottomRailElemDimList.Count - 2 >= 0)
|
||||
{
|
||||
BottomRailElemDimList.ElementAt(BottomRailElemDimList.Count - 2).SetNameElement("Sash_Rail");
|
||||
BottomRailElemDimList.ElementAt(BottomRailElemDimList.Count - 2).SetMinDimension(Window.m_ParameterList.GetValueOrDefault(BottomRailElemDimList.ElementAt(BottomRailElemDimList.Count - 2).sName + "_DimMin"));
|
||||
BottomRailElemDimList.ElementAt(BottomRailElemDimList.Count - 2).SetMaxDimension(Window.m_ParameterList.GetValueOrDefault(BottomRailElemDimList.ElementAt(BottomRailElemDimList.Count - 2).sName + "_DimMax"));
|
||||
BottomRailElemDimList.ElementAt(BottomRailElemDimList.Count - 2).SetDimension(BottomRailElemDimList.ElementAt(BottomRailElemDimList.Count - 2).dDimension);
|
||||
}
|
||||
}
|
||||
else if (value < m_nSashBottomRailQty)
|
||||
{
|
||||
// Elimino un element
|
||||
BottomRailElemDimList.RemoveAt(BottomRailElemDimList.Count - 1);
|
||||
// Elimino gli element
|
||||
for (int i = BottomRailElemDimList.Count - 1; i == value; i--)
|
||||
BottomRailElemDimList.RemoveAt(i);
|
||||
if (value >= 1)
|
||||
{
|
||||
BottomRailElemDimList.Last().SetNameElement("Sash_Fill_Rail");
|
||||
BottomRailElemDimList.Last().SetMinDimension(Window.m_ParameterList.GetValueOrDefault(BottomRailElemDimList.Last().sName + "_DimMin"));
|
||||
BottomRailElemDimList.Last().SetMaxDimension(Window.m_ParameterList.GetValueOrDefault(BottomRailElemDimList.Last().sName + "_DimMax"));
|
||||
BottomRailElemDimList.Last().SetDimension(BottomRailElemDimList.Last().dDimension);
|
||||
}
|
||||
}
|
||||
m_nSashBottomRailQty = value;
|
||||
if (m_nSashBottomRailQty > 0)
|
||||
@@ -835,7 +854,7 @@ namespace WebWindowComplex.Models
|
||||
if (nCounterGroup < GroupId)
|
||||
Area.nCounterGroup = GroupId;
|
||||
string currHwId = hideHw ? CustomHwId : m_SelHardware!.Id;
|
||||
JsonSash JsonSash = new JsonSash(m_bIsSashVertical, m_SashType, m_bSashBottomRail, m_nSashBottomRailQty, currHwId, GroupId);
|
||||
JsonSash JsonSash = new JsonSash(m_bIsSashVertical, m_SashType, m_bSashBottomRail, m_nSashBottomRailQty, currHwId, GroupId, bIsDimensionLight);
|
||||
foreach (var SashDimension in SashList)
|
||||
JsonSash.SashList.Add(SashDimension.Serialize());
|
||||
foreach (var BottomRailDim in BottomRailElemDimList)
|
||||
|
||||
@@ -432,17 +432,6 @@ namespace WebWindowComplex.Models
|
||||
m_ElemDimVertList = value;
|
||||
}
|
||||
}
|
||||
public List<SplitDimension> SplitPositionList
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_SplitPositionList;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_SplitPositionList = value;
|
||||
}
|
||||
}
|
||||
|
||||
public List<IdNameStruct> SplitShapeList
|
||||
{
|
||||
@@ -531,34 +520,6 @@ namespace WebWindowComplex.Models
|
||||
}
|
||||
}
|
||||
|
||||
public bool OnlySashChild()
|
||||
{
|
||||
foreach (var areaSplitted in AreaList)
|
||||
{
|
||||
if (!(areaSplitted.AreaList.FirstOrDefault()?.AreaType is AreaTypes.SASH))
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
public bool MinOneSashChild()
|
||||
{
|
||||
foreach (var areaSplitted in AreaList)
|
||||
{
|
||||
if (areaSplitted.AreaList.FirstOrDefault()?.AreaType is AreaTypes.SASH)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
public bool SashChildSxOrDx()
|
||||
{
|
||||
foreach (var areaSplitted in AreaList)
|
||||
{
|
||||
if (areaSplitted.AreaList.FirstOrDefault()?.AreaType is AreaTypes.SASH)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
|
||||
#region Internal Properties
|
||||
@@ -597,10 +558,20 @@ namespace WebWindowComplex.Models
|
||||
JsonSplit.SplitVertList.Add(SplitVert.Serialize());
|
||||
foreach (var SplitHoriz in m_SplitHorizList)
|
||||
JsonSplit.SplitHorizList.Add(SplitHoriz.Serialize());
|
||||
foreach (var Elem in m_ElemDimHorizList)
|
||||
JsonSplit.ElementDimHorizList.Add(Elem.Serialize());
|
||||
foreach (var Elem in m_ElemDimVertList)
|
||||
JsonSplit.ElementDimVertList.Add(Elem.Serialize());
|
||||
if(m_ElemDimHorizList != null && m_ElemDimHorizList.Count > 0)
|
||||
{
|
||||
int subAreaMinHoriz = m_ElemDimHorizList.Min(x => x.nSubArea);
|
||||
List<SplitElementDimension> horizList = m_ElemDimHorizList.Where(x => x.nSubArea == subAreaMinHoriz).ToList();
|
||||
foreach (var Elem in horizList)
|
||||
JsonSplit.ElementDimHorizList.Add(Elem.Serialize());
|
||||
}
|
||||
if (m_ElemDimVertList != null && m_ElemDimVertList.Count > 0)
|
||||
{
|
||||
int subAreaMinVert = m_ElemDimVertList.Min(x => x.nSubArea);
|
||||
List<SplitElementDimension> vertList = m_ElemDimVertList.Where(x => x.nSubArea == subAreaMinVert).ToList();
|
||||
foreach (var Elem in vertList.ToList())
|
||||
JsonSplit.ElementDimVertList.Add(Elem.Serialize());
|
||||
}
|
||||
foreach (var Area in AreaList)
|
||||
JsonSplit.AreaList.Add(Area.Serialize(hideHw));
|
||||
return JsonSplit;
|
||||
@@ -636,12 +607,19 @@ namespace WebWindowComplex.Models
|
||||
}
|
||||
else
|
||||
{
|
||||
// Un Elemento per ogni dimensione principale e secondaria
|
||||
//int subArea = 1;
|
||||
//if (!bSplitStartVert)
|
||||
// subArea = 0;
|
||||
//for (int i = 0; i < QtyHoriz; i++)
|
||||
// ElemDimHorizList.Add(new SplitElementDimension(this, i + 1, 78, subArea));
|
||||
// Un Elemento per ogni dimensione principale e per ogni sotto dimensione
|
||||
if (bSplitStartVert)
|
||||
{
|
||||
for(int subArea = 0; subArea <= QtyVert; subArea++)
|
||||
for (int subArea = 0; subArea <= QtyVert; subArea++)
|
||||
{
|
||||
for (int i = 0; i < QtyHoriz; i++)
|
||||
ElemDimHorizList.Add(new SplitElementDimension(this, i + 1, 78, subArea+1));
|
||||
ElemDimHorizList.Add(new SplitElementDimension(this, i + 1, 78, subArea + 1));
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -682,6 +660,13 @@ namespace WebWindowComplex.Models
|
||||
}
|
||||
else
|
||||
{
|
||||
// Un Elemento per ogni dimensione principale e secondaria
|
||||
//int subArea = 0;
|
||||
//if (!bSplitStartVert)
|
||||
// subArea = 1;
|
||||
//for (int i = 0; i < QtyVert; i++)
|
||||
// ElemDimVertList.Add(new SplitElementDimension(this, i + 1, 78, subArea));
|
||||
// Un Elemento per ogni dimensione principale e per ogni sotto dimensione
|
||||
if (bSplitStartVert)
|
||||
{
|
||||
for (int i = 0; i < QtyVert; i++)
|
||||
@@ -689,12 +674,12 @@ namespace WebWindowComplex.Models
|
||||
}
|
||||
else
|
||||
{
|
||||
for(int subArea = 0; subArea <= QtyHoriz; subArea++)
|
||||
for (int subArea = 0; subArea <= QtyHoriz; subArea++)
|
||||
{
|
||||
for (int i = 0; i < QtyVert; i++)
|
||||
ElemDimVertList.Add(new SplitElementDimension(this, i+1, 78, subArea + 1));
|
||||
ElemDimVertList.Add(new SplitElementDimension(this, i + 1, 78, subArea + 1));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1171,7 +1171,7 @@ namespace WebWindowComplex
|
||||
/// </summary>
|
||||
/// <param name="profileNameList"> Lista dei profili </param>
|
||||
/// <param name="GroupIdSearch"> Id Area che si sta cercando </param>
|
||||
/// <param name="EntityIdSearch"> Id dell'anta (se -1 non usare) </param>
|
||||
/// <param name="EntityIdSearch"> Id dell'anta o dello split (se -1 non usare) </param>
|
||||
/// <returns></returns>
|
||||
private void UpdateProfileElement(List<string> profileNameList, int GroupIdSearch, int EntityIdSearch)
|
||||
{
|
||||
@@ -1615,7 +1615,6 @@ namespace WebWindowComplex
|
||||
return "btn btn-secondary btn-sm";
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Metodo per ottenere lista groupId
|
||||
/// </summary>
|
||||
@@ -1632,6 +1631,7 @@ namespace WebWindowComplex
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
}
|
||||
}
|
||||
@@ -6,7 +6,7 @@
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Version>3.1.2.510</Version>
|
||||
<Version>3.1.2.617</Version>
|
||||
<Authors>Annamaria Sassi</Authors>
|
||||
<Company>Egalware</Company>
|
||||
<Description>Componente gestione Configurazioni avanzate Window per LUX</Description>
|
||||
@@ -75,6 +75,26 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Version>3.1.2.510</Version>
|
||||
<Version>3.1.2.617</Version>
|
||||
<Authors>Annamaria Sassi</Authors>
|
||||
<Company>Egalware</Company>
|
||||
<Description>Componente gestione JWD per LUX</Description>
|
||||
@@ -99,5 +99,6 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user