diff --git a/Test.UI/Data/FinestraSplitGrid.jwd b/Test.UI/Data/FinestraSplitGrid.jwd
index f1d93c7..0df35d6 100644
--- a/Test.UI/Data/FinestraSplitGrid.jwd
+++ b/Test.UI/Data/FinestraSplitGrid.jwd
@@ -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,
diff --git a/WebWindowComplex/Compo/AreaHwOption.razor.cs b/WebWindowComplex/Compo/AreaHwOption.razor.cs
index f184a3d..e478947 100644
--- a/WebWindowComplex/Compo/AreaHwOption.razor.cs
+++ b/WebWindowComplex/Compo/AreaHwOption.razor.cs
@@ -39,6 +39,10 @@ namespace WebWindowComplex.Compo
}
}
+ ///
+ /// Metodo per aprire/chiudere area per hw option
+ ///
+ ///
private async Task changeCollapsed()
{
hwOptCollapsed = !hwOptCollapsed;
diff --git a/WebWindowComplex/Compo/AreaSash.razor.cs b/WebWindowComplex/Compo/AreaSash.razor.cs
index 3ad50dc..520d797 100644
--- a/WebWindowComplex/Compo/AreaSash.razor.cs
+++ b/WebWindowComplex/Compo/AreaSash.razor.cs
@@ -116,29 +116,29 @@ namespace WebWindowComplex.Compo
return 0;
}
- ///
- /// Metodo per avere il lo step da usare nella form-input
- ///
- ///
- 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;
- }
+ /////
+ ///// Metodo per avere il lo step da usare nella form-input
+ /////
+ /////
+ //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;
+ //}
///
/// Selezione tipo di apertura anta
@@ -192,6 +192,7 @@ namespace WebWindowComplex.Compo
///
/// Sollevo evento richiesta per cambiare tutti i Joint
///
+ /// Tipo di giunto che si vuole
///
private Task ChangeAllJoints(Json.WindowConst.Joints JointType)
{
@@ -203,7 +204,7 @@ namespace WebWindowComplex.Compo
///
/// Aggiornamento joint
///
- ///
+ /// Tipo di giunto che si vuole
///
private async Task UpdateJoint(Joint updRec)
{
@@ -220,7 +221,7 @@ namespace WebWindowComplex.Compo
///
/// Aggiornamento element
///
- ///
+ /// Tipo di giunto che si vuole
///
private async Task UpdateElement(ElementDimension updRec)
{
@@ -286,10 +287,12 @@ namespace WebWindowComplex.Compo
};
return EC_UpdateSash.InvokeAsync(args);
}
-
+
///
/// Copio contenuto anta da indexCopy a IndexModify
///
+ /// Indice dell'ante di cui voglio copiare contenuto
+ /// Indice dell'ante di cui voglio modificare contenuto
///
private Task CopyContentSash(int IndexCopy, int IndexModify)
{
@@ -353,6 +356,7 @@ namespace WebWindowComplex.Compo
View = 1,
Edit = 2
}
+
protected override void OnParametersSet()
{
if (EditMode)
diff --git a/WebWindowComplex/Compo/AreaSplit.razor.cs b/WebWindowComplex/Compo/AreaSplit.razor.cs
index 3594d1a..a272dfa 100644
--- a/WebWindowComplex/Compo/AreaSplit.razor.cs
+++ b/WebWindowComplex/Compo/AreaSplit.razor.cs
@@ -39,6 +39,7 @@ namespace WebWindowComplex.Compo
///
/// Metodo per copiare sash
///
+ /// Indice della finestra che si vuole copiare
///
private Task RaiseCopySash(int indexCurrSash)
{
diff --git a/WebWindowComplex/Compo/BottomRail.razor b/WebWindowComplex/Compo/BottomRail.razor
new file mode 100644
index 0000000..97cc835
--- /dev/null
+++ b/WebWindowComplex/Compo/BottomRail.razor
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+ @if(CurrFrame() != null)
+ {
+ @for (int i = CurrFrame().BottomRailElemDimList.Count - 1; i >= 0; i-- )
+ {
+
+ }
+ }
+ @if (CurrSash() != null)
+ {
+ @for (int i = CurrSash().BottomRailElemDimList.Count - 1; i >= 0; i--)
+ {
+
+ }
+ }
+
+
+
+
\ No newline at end of file
diff --git a/WebWindowComplex/Compo/BottomRail.razor.cs b/WebWindowComplex/Compo/BottomRail.razor.cs
new file mode 100644
index 0000000..960e105
--- /dev/null
+++ b/WebWindowComplex/Compo/BottomRail.razor.cs
@@ -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 EC_UpdateBottomRail { get; set; }
+
+ #endregion Public Properties
+
+ #region Private Properties
+
+ ///
+ /// Aggiornamento element Bottom Rail
+ ///
+ ///
+ ///
+ 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; }
+ }
+}
\ No newline at end of file
diff --git a/WebWindowComplex/Compo/CardFill.razor.cs b/WebWindowComplex/Compo/CardFill.razor.cs
index e392a10..6ce6aa9 100644
--- a/WebWindowComplex/Compo/CardFill.razor.cs
+++ b/WebWindowComplex/Compo/CardFill.razor.cs
@@ -45,7 +45,7 @@ namespace WebWindowComplex.Compo
///
/// Metodo per cambiare solo il Fill corrente
///
- /// tipo di fill richiesto
+ /// Tipo di fill richiesto
///
protected Task ChangeOneFill(FillTypes reqFillType)
{
diff --git a/WebWindowComplex/Compo/CardFrame.razor b/WebWindowComplex/Compo/CardFrame.razor
index 0dcce3a..1c8f405 100644
--- a/WebWindowComplex/Compo/CardFrame.razor
+++ b/WebWindowComplex/Compo/CardFrame.razor
@@ -80,11 +80,11 @@
}
else
{
-
@if (CurrFrameWindow.BottomRailQty > 0)
{
-
+
}
+
}
@@ -102,17 +102,17 @@
{
-
+
-
+
-
+
}
diff --git a/WebWindowComplex/Compo/CardFrame.razor.cs b/WebWindowComplex/Compo/CardFrame.razor.cs
index f5f13ba..1e2fcfb 100644
--- a/WebWindowComplex/Compo/CardFrame.razor.cs
+++ b/WebWindowComplex/Compo/CardFrame.razor.cs
@@ -190,15 +190,13 @@ namespace WebWindowComplex.Compo
///
/// Metodo per cambiare tutti i joint
///
+ ///
///
- 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
///
/// Aggiornamento dimensione editata
///
- ///
+ /// Dimensione aggiornata
+ ///
private async Task UpdateDim(FrameDimension updRec)
{
// cerco il record
@@ -281,15 +280,15 @@ namespace WebWindowComplex.Compo
}
///
- /// Aggiornamento Bottom Rail
+ /// Aggiornamento Frame
///
///
- 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
///
///
///
- private string ButtonJointCss(WebWindowComplex.Json.WindowConst.Joints type)
+ private string ButtonJointCss(Json.WindowConst.Joints type)
{
foreach (var item in CurrFrameWindow.JointList)
{
diff --git a/WebWindowComplex/Compo/CardSashGroup.razor b/WebWindowComplex/Compo/CardSashGroup.razor
index e340b36..e2e88a3 100644
--- a/WebWindowComplex/Compo/CardSashGroup.razor
+++ b/WebWindowComplex/Compo/CardSashGroup.razor
@@ -14,10 +14,10 @@
- @*
}
@@ -69,11 +69,11 @@
}
else
{
-
@if (CurrSashGroup.SashBottomRailQty > 0)
{
-
+
}
+
}
@@ -198,6 +198,7 @@
EditMode="editMode"
EC_UpdateSash="UpdateSash"
EC_UpdateSashDim="UpdateSashDimension"
+ EC_ReqResetDict="ResetDict"
EC_EditView="EditView">
}
diff --git a/WebWindowComplex/Compo/CardSashGroup.razor.cs b/WebWindowComplex/Compo/CardSashGroup.razor.cs
index 608ce00..57838a3 100644
--- a/WebWindowComplex/Compo/CardSashGroup.razor.cs
+++ b/WebWindowComplex/Compo/CardSashGroup.razor.cs
@@ -198,9 +198,8 @@ namespace WebWindowComplex.Compo
#region Protected Methods
///
- /// Metodo per rimuovere area
+ /// Metodo per rimuovere area corrente
///
- /// area da rimuovere
///
protected async Task RemoveArea()
{
@@ -218,37 +217,37 @@ namespace WebWindowComplex.Compo
}
///
- /// Metodo per cambiare l'anta su cui è presente la maniglia
+ /// Metodo per cambiare dimensione solo luce
///
///
- //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);
+ }
///
/// Metodo per scegliere tipo di misura
@@ -288,7 +287,7 @@ namespace WebWindowComplex.Compo
}
///
- /// Metodo per aggiornare sash
+ /// Metodo per aggiornare sash group
///
///
///
@@ -309,9 +308,27 @@ namespace WebWindowComplex.Compo
}
///
- /// Metodo per aggiornare sash
+ /// Metodo per aggiornare sash group
///
- ///
+ ///
+ ///
+ protected async Task UpdateBottomRail(DataBottomRail updRec)
+ {
+ if (updRec.sash != null)
+ {
+ CurrSashGroup = updRec.sash;
+ var args = new DataUpdateSash
+ {
+ currSash = CurrSashGroup
+ };
+ await EC_UpdateSashGroup.InvokeAsync(args);
+ }
+ }
+
+ ///
+ /// Metodo per aggiornare bottom rail
+ ///
+ ///
///
protected async Task UpdateBottomRail(ElementDimension updRec)
{
@@ -327,6 +344,11 @@ namespace WebWindowComplex.Compo
}
}
+ ///
+ /// Metodo per resettare dizionario richiesto
+ ///
+ ///
+ ///
protected Task ResetDict(DataUpdateRes args)
{
return EC_ReqResetDict.InvokeAsync(args);
@@ -358,7 +380,7 @@ namespace WebWindowComplex.Compo
///
/// Aggiornamento opzioni hardware
///
- ///
+ ///
///
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);
}
}
///
/// Prima chiamata hw option list
///
- ///
///
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()
{
diff --git a/WebWindowComplex/Compo/CardSplit.razor b/WebWindowComplex/Compo/CardSplit.razor
index 7d3f8f9..3f5db0a 100644
--- a/WebWindowComplex/Compo/CardSplit.razor
+++ b/WebWindowComplex/Compo/CardSplit.razor
@@ -181,7 +181,7 @@
Element vert
- @foreach (var element in CurrSplit.ElemDimVertList)
+ @foreach (var element in vertList())
{
}
@@ -193,7 +193,7 @@
Element horiz
- @foreach (var element in CurrSplit.ElemDimHorizList)
+ @foreach (var element in horizList())
{
}
diff --git a/WebWindowComplex/Compo/CardSplit.razor.cs b/WebWindowComplex/Compo/CardSplit.razor.cs
index 95c5e5a..e80a4db 100644
--- a/WebWindowComplex/Compo/CardSplit.razor.cs
+++ b/WebWindowComplex/Compo/CardSplit.razor.cs
@@ -196,12 +196,34 @@ namespace WebWindowComplex.Compo
///
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 ElemIndexList = new List();
+ 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 horizList()
+ {
+ int subAreaMin = CurrSplit.ElemDimHorizList.Min(x => x.nSubArea);
+ return CurrSplit.ElemDimHorizList.Where(x => x.nSubArea == subAreaMin).ToList();
+ }
+
+ private List vertList()
+ {
+ int subAreaMin = CurrSplit.ElemDimVertList.Min(x => x.nSubArea);
+ return CurrSplit.ElemDimVertList.Where(x => x.nSubArea == subAreaMin).ToList();
+ }
}
///
diff --git a/WebWindowComplex/Compo/EditElement.razor.cs b/WebWindowComplex/Compo/EditElement.razor.cs
index 14fd91c..ba82bbd 100644
--- a/WebWindowComplex/Compo/EditElement.razor.cs
+++ b/WebWindowComplex/Compo/EditElement.razor.cs
@@ -30,7 +30,7 @@ namespace WebWindowComplex.Compo
#region Private Properties
///
- /// Metodo per aggiornare element corrente
+ /// Metodo per aggiornare nome element corrente
///
private string name()
{
diff --git a/WebWindowComplex/Compo/EditSplitElement.razor b/WebWindowComplex/Compo/EditSplitElement.razor
index d120612..2b7c6fa 100644
--- a/WebWindowComplex/Compo/EditSplitElement.razor
+++ b/WebWindowComplex/Compo/EditSplitElement.razor
@@ -1,6 +1,6 @@
@using static WebWindowComplex.LayoutConst