diff --git a/WebWindowComplex/Compo/CardSashGroup.razor b/WebWindowComplex/Compo/CardSashGroup.razor
index e3dd50d..abddb98 100644
--- a/WebWindowComplex/Compo/CardSashGroup.razor
+++ b/WebWindowComplex/Compo/CardSashGroup.razor
@@ -214,7 +214,6 @@
SashGroupList { get; set; } = null!;
+ ///
+ /// Lista di sash dimension in stato edit
+ ///
+ [CascadingParameter(Name = "SashDimEditList")]
+ public List SashDimEditList { get; set; } = null!;
+
///
/// Frame corrente
///
[Parameter]
public Frame FrameWindow { get; set; } = null!;
+ ///
+ /// Evento per salvare stato edit singole ante
+ ///
+ [Parameter]
+ public EventCallback> 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 currSashDimEdit = new List();
+
+ #endregion Private Fields
+
+ #region Private Properties
+
///
/// Selezione quantità di ante
///
- 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
///
/// Selezione quantit� bottom rail
///
- protected int SashBottomRailQty
+ private int SashBottomRailQty
{
get => CurrSashGroup.SashBottomRailQty;
set
@@ -133,7 +161,7 @@ namespace WebWindowComplex.Compo
///
/// Selezione tipo di orientamento della sash
///
- protected int OrientationSashTypeIndex
+ private int OrientationSashTypeIndex
{
get => CurrSashGroup.SelOrientationSashTypeIndex;
set
@@ -153,7 +181,7 @@ namespace WebWindowComplex.Compo
///
/// Selezione famiglia hardware
///
- 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
///
/// Selezione hardware
///
- 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
- ///
- /// Metodo per rimuovere area corrente
- ///
- ///
- protected async Task RemoveArea()
+ ///
+ /// Metodo per rimuovere area corrente
+ ///
+ ///
+ 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
///
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
///
///
///
- 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
///
///
///
- 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
///
///
///
- protected async Task UpdateBottomRail(DataBottomRail updRec)
+ private async Task UpdateBottomRail(DataBottomRail updRec)
{
if (updRec.sash != null)
{
@@ -404,7 +432,7 @@ namespace WebWindowComplex.Compo
///
///
///
- 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
///
///
///
- 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 currSashDimEdit = new List();
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);
}
///
diff --git a/WebWindowComplex/Compo/CardSplit.razor.cs b/WebWindowComplex/Compo/CardSplit.razor.cs
index 904511b..09bda92 100644
--- a/WebWindowComplex/Compo/CardSplit.razor.cs
+++ b/WebWindowComplex/Compo/CardSplit.razor.cs
@@ -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);
}
}
diff --git a/WebWindowComplex/Compo/CardTree.razor b/WebWindowComplex/Compo/CardTree.razor
index 592b846..e0c1fad 100644
--- a/WebWindowComplex/Compo/CardTree.razor
+++ b/WebWindowComplex/Compo/CardTree.razor
@@ -80,8 +80,7 @@
}
@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)))
{