- Modificato ricalcolo aree per modifica elemento
- Testo selezionato in grassetto nei dropdown
This commit is contained in:
@@ -34,12 +34,14 @@ namespace WebWindowComplex.Models
|
||||
{
|
||||
if(dDimension != value)
|
||||
{
|
||||
if (value > m_dMax)
|
||||
m_dDimension = m_dMax;
|
||||
else if (value < m_dMin)
|
||||
m_dDimension = m_dMin;
|
||||
else
|
||||
m_dDimension = value;
|
||||
if (m_ParentArea is Split split)
|
||||
{
|
||||
if (value > m_dMax)
|
||||
value = m_dMax;
|
||||
else if (value < m_dMin)
|
||||
value = m_dMin;
|
||||
SplitElementDimension splitElem = (SplitElementDimension)this;
|
||||
List<SplitDimension> elemList = new List<SplitDimension>();
|
||||
Frame? frame = split.ParentWindow.AreaList.First();
|
||||
@@ -65,45 +67,73 @@ namespace WebWindowComplex.Models
|
||||
if(elemList.ElementAt(m_nIndex).MeasureType is MeasureTypes.ABSOLUTE)
|
||||
elemList.ElementAt(m_nIndex).SetDimension(elemList.ElementAt(m_nIndex).dDimension + diff);
|
||||
}
|
||||
}
|
||||
else if(m_ParentArea is Sash sash && (m_nIndex == 2 || m_nIndex == 4))
|
||||
{
|
||||
if (value > m_dMax)
|
||||
value = m_dMax;
|
||||
else if (value < m_dMin)
|
||||
value = m_dMin;
|
||||
if (sash.bIsDimensionLight)
|
||||
if (split.SplitHorizList.Count > 0)
|
||||
{
|
||||
int indSash = -1;
|
||||
for(int i = 0; i < sash.SashList.Count; i++)
|
||||
for (int i = 0; i < split.AreaList.Count; i++)
|
||||
{
|
||||
if (sash.SashList.ElementAt(i).ElementDimensionList.Contains(this))
|
||||
{
|
||||
indSash = i;
|
||||
break;
|
||||
}
|
||||
if (i < split.SplitHorizList.Count)
|
||||
split.AreaList.ElementAt(i).SearchAreaList(split.AreaList.ElementAt(i), split.SplitHorizList.ElementAt(i).dDimension, "Width");
|
||||
}
|
||||
if(sash.SashList.ElementAt(indSash).MeasureType is MeasureTypes.ABSOLUTE)
|
||||
}
|
||||
if (split.SplitVertList.Count > 0)
|
||||
{
|
||||
for (int i = 0; i < split.AreaList.Count; i++)
|
||||
{
|
||||
if (value > m_dDimension)
|
||||
{
|
||||
double diff = (value - m_dDimension);
|
||||
sash.SashList.ElementAt(indSash).SetDimension(sash.SashList.ElementAt(indSash).dDimension - diff);
|
||||
}
|
||||
else
|
||||
{
|
||||
double diff = m_dDimension - value;
|
||||
sash.SashList.ElementAt(indSash).SetDimension(sash.SashList.ElementAt(indSash).dDimension + diff);
|
||||
}
|
||||
if (i < split.SplitVertList.Count)
|
||||
split.AreaList.ElementAt(i).SearchAreaList(split.AreaList.ElementAt(i), split.SplitVertList.ElementAt(i).dDimension, "Height");
|
||||
}
|
||||
}
|
||||
}
|
||||
if (value > m_dMax)
|
||||
m_dDimension = m_dMax;
|
||||
else if (value < m_dMin)
|
||||
m_dDimension = m_dMin;
|
||||
else
|
||||
m_dDimension = value;
|
||||
else if(m_ParentArea is Sash sash)
|
||||
{
|
||||
if(m_nIndex == 2 || m_nIndex == 4)
|
||||
{
|
||||
if (sash.bIsDimensionLight)
|
||||
{
|
||||
int indSash = -1;
|
||||
for(int i = 0; i < sash.SashList.Count; i++)
|
||||
{
|
||||
if (sash.SashList.ElementAt(i).ElementDimensionList.Contains(this))
|
||||
{
|
||||
indSash = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(sash.SashList.ElementAt(indSash).MeasureType is MeasureTypes.ABSOLUTE)
|
||||
{
|
||||
if (value > m_dDimension)
|
||||
{
|
||||
double diff = (value - m_dDimension);
|
||||
sash.SashList.ElementAt(indSash).SetDimension(sash.SashList.ElementAt(indSash).dDimension - diff);
|
||||
}
|
||||
else
|
||||
{
|
||||
double diff = m_dDimension - value;
|
||||
sash.SashList.ElementAt(indSash).SetDimension(sash.SashList.ElementAt(indSash).dDimension + diff);
|
||||
}
|
||||
for (int i = 0; i < sash.AreaList.Count; i++)
|
||||
sash.AreaList.ElementAt(i).SearchAreaList(sash.AreaList.ElementAt(i), sash.SashList.ElementAt(i).dDimension, "Width");
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Frame? frame = sash.ParentWindow.AreaList.FirstOrDefault();
|
||||
if(frame != null)
|
||||
{
|
||||
for (int i = 0; i < sash.AreaList.Count; i++)
|
||||
sash.AreaList.ElementAt(i).SearchAreaList(sash.AreaList.ElementAt(i), sash.AreaList.ElementAt(i).CalculateHeightArea(frame, frame.AvailHeightArea()), "Height");
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(m_ParentArea is Frame frame)
|
||||
{
|
||||
for (int i = 0; i < frame.AreaList.Count; i++)
|
||||
{
|
||||
frame.AreaList.ElementAt(i).SearchAreaList(frame, frame.AvailWidthArea(), "Width");
|
||||
frame.AreaList.ElementAt(i).SearchAreaList(frame, frame.AvailHeightArea(), "Height");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -433,8 +433,8 @@ namespace WebWindowComplex.Models
|
||||
if (AreaList.First() is Sash)
|
||||
overlap = ElementDimensionList.First().dOverlap +
|
||||
ElementDimensionList.ElementAt(ElementDimensionList.Count() - 2).dOverlap;
|
||||
return dim - ElementDimensionList.ElementAt(0).dDimension -
|
||||
ElementDimensionList.Last().dDimension +
|
||||
return dim - ElementDimensionList.First().dDimension -
|
||||
ElementDimensionList.ElementAt(ElementDimensionList.Count() - 2).dDimension +
|
||||
overlap;
|
||||
}
|
||||
|
||||
@@ -462,7 +462,7 @@ namespace WebWindowComplex.Models
|
||||
overlap = ElementDimensionList.ElementAt(1).dOverlap +
|
||||
ElementDimensionList.Last().dOverlap;
|
||||
}
|
||||
return dim - ElementDimensionList.ElementAt(0).dDimension -
|
||||
return dim - ElementDimensionList.ElementAt(1).dDimension -
|
||||
ElementDimensionList.Last().dDimension +
|
||||
overlap;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user