Modificato aggiornamento dimensioni split a causa di una variazione delle dimensioni del frame
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System.ComponentModel.Design;
|
||||
using System.Linq;
|
||||
using WebWindowComplex.Json;
|
||||
using static WebWindowComplex.Json.WindowConst;
|
||||
|
||||
@@ -288,7 +289,21 @@ namespace WebWindowComplex.Models
|
||||
}
|
||||
}
|
||||
else
|
||||
SearchAreaList(node.AreaList.ElementAt(i), dim, nameDim);
|
||||
{
|
||||
Frame? f = node.ParentWindow.AreaList.First();
|
||||
double dimAvail = 0;
|
||||
if (nameDim.Equals("Width"))
|
||||
dimAvail = dim - f.ElementDimensionList.ElementAt(1).dDimension
|
||||
- f.ElementDimensionList.Last().dDimension
|
||||
+ f.ElementDimensionList.ElementAt(1).dOverlap
|
||||
+ f.ElementDimensionList.Last().dOverlap;
|
||||
else
|
||||
dimAvail = dim - f.ElementDimensionList.First().dDimension
|
||||
- f.ElementDimensionList.ElementAt(f.ElementDimensionList.Count - 2).dDimension
|
||||
+ f.ElementDimensionList.First().dOverlap
|
||||
+ f.ElementDimensionList.ElementAt(f.ElementDimensionList.Count - 2).dOverlap;
|
||||
SearchAreaList(node.AreaList.ElementAt(i), dimAvail, nameDim);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -335,7 +350,8 @@ namespace WebWindowComplex.Models
|
||||
else
|
||||
{
|
||||
for (int i = 1; i < sash.SashList.Count; i++)
|
||||
dim = dim + sash.SashList[i].ElementDimensionList.Last().dOverlap;
|
||||
dim = dim + sash.SashList[i].ElementDimensionList.Last().dOverlap
|
||||
+ sash.SashList.First().ElementDimensionList.Last().dOverlap;
|
||||
}
|
||||
double res = dim - sum;
|
||||
if (res > 0)
|
||||
@@ -345,7 +361,7 @@ namespace WebWindowComplex.Models
|
||||
sashDim.SetDimension(sashDim.dDimension + res / countAbsolute);
|
||||
}
|
||||
}
|
||||
else
|
||||
else if (res < 0)
|
||||
{
|
||||
foreach (var sashDim in sash.SashList)
|
||||
{
|
||||
@@ -371,14 +387,23 @@ namespace WebWindowComplex.Models
|
||||
{
|
||||
Split split = (Split)area;
|
||||
List<SplitDimension> splitList = new List<SplitDimension>();
|
||||
double sum = 0;
|
||||
if (nameDim.Equals("Width"))
|
||||
{
|
||||
splitList = split.SplitVertList;
|
||||
foreach (var item in split.ElemDimVertList)
|
||||
sum = sum + item.dDimension;
|
||||
}
|
||||
else
|
||||
{
|
||||
splitList = split.SplitHorizList;
|
||||
foreach (var item in split.ElemDimHorizList)
|
||||
sum = sum + item.dDimension;
|
||||
}
|
||||
int countAbsolute = splitList.Where(x => x.MeasureType.Equals(MeasureTypes.ABSOLUTE)).Count();
|
||||
if (countAbsolute != 0 && countAbsolute == splitList.Count)
|
||||
{
|
||||
double sum = splitList.Sum(x => x.dDimension);
|
||||
sum = sum + splitList.Sum(x => x.dDimension);
|
||||
double res = 0;
|
||||
res = dim - sum;
|
||||
if (res > 0)
|
||||
|
||||
@@ -182,7 +182,7 @@ namespace WebWindowComplex.Models
|
||||
if (m_Shape != (Shapes)value)
|
||||
{
|
||||
Shapes oldShape = m_Shape;
|
||||
Shapes SelShape = (Shapes)value;
|
||||
m_Shape = (Shapes)value;
|
||||
// salvo vecchie dimensioni
|
||||
List<FrameDimension> oldDimensionList = new List<FrameDimension>(DimensionList);
|
||||
// verifico parametri Dimension
|
||||
@@ -190,7 +190,7 @@ namespace WebWindowComplex.Models
|
||||
//double widthVal = oldDimensionList.Where(x => x.sName.Equals("Width")).Select(x => x.dValue).First();
|
||||
double widthVal = oldDimensionList.Where(x => x.sName.Equals("Width")).Select(x => x.dDimension).First();
|
||||
// aggiungo Dimensioni
|
||||
switch (SelShape)
|
||||
switch (m_Shape)
|
||||
{
|
||||
case Shapes.RECTANGLE:
|
||||
case Shapes.ARC_FULL:
|
||||
@@ -277,7 +277,7 @@ namespace WebWindowComplex.Models
|
||||
SearchSash(sashList, this);
|
||||
// aggiungo Joint
|
||||
m_JointList.Clear();
|
||||
switch (SelShape)
|
||||
switch (m_Shape)
|
||||
{
|
||||
case Shapes.RECTANGLE:
|
||||
case Shapes.RIGHTCHAMFER:
|
||||
@@ -353,7 +353,6 @@ namespace WebWindowComplex.Models
|
||||
// break;
|
||||
// }
|
||||
//}
|
||||
m_Shape = SelShape;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Version>3.1.2.1617</Version>
|
||||
<Version>3.1.2.1709</Version>
|
||||
<Authors>Annamaria Sassi</Authors>
|
||||
<Company>Egalware</Company>
|
||||
<Description>Componente gestione Configurazioni avanzate Window per LUX</Description>
|
||||
@@ -158,6 +158,9 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Version>3.1.2.1617</Version>
|
||||
<Version>3.1.2.1709</Version>
|
||||
<Authors>Annamaria Sassi</Authors>
|
||||
<Company>Egalware</Company>
|
||||
<Description>Componente gestione JWD per LUX</Description>
|
||||
@@ -139,6 +139,10 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user