Update settings & altro
This commit is contained in:
@@ -424,7 +424,6 @@ namespace WebWindowComplex
|
||||
case AreaTypes.SASH:
|
||||
{
|
||||
m_SashList.Add((Sash)node);
|
||||
calculateWidth((Sash)node);
|
||||
break;
|
||||
}
|
||||
case AreaTypes.FILL:
|
||||
@@ -435,7 +434,6 @@ namespace WebWindowComplex
|
||||
case AreaTypes.SPLIT:
|
||||
{
|
||||
m_SplitList.Add((Split)node);
|
||||
calculateWidth((Split)node);
|
||||
break;
|
||||
}
|
||||
case AreaTypes.SPLITTED:
|
||||
@@ -454,91 +452,91 @@ namespace WebWindowComplex
|
||||
}
|
||||
}
|
||||
|
||||
protected void calculateWidth(Area area)
|
||||
{
|
||||
if (area is Sash)
|
||||
{
|
||||
Sash sash = (Sash)area;
|
||||
if (area.ParentArea is Frame)
|
||||
{
|
||||
Frame frame = (Frame)area.ParentArea;
|
||||
sash.Width = (frame.DimensionList.Where(x => x.sName == "Width").FirstOrDefault())!.dValue;
|
||||
}
|
||||
else if (sash.ParentArea.ParentArea is Split)
|
||||
{
|
||||
Split split = (Split)sash.ParentArea.ParentArea;
|
||||
if (split.SplitVertList.Count > 0)
|
||||
{
|
||||
int indexSplit = 0;
|
||||
for(int i = 0; i < split.AreaList.Count; i++)
|
||||
{
|
||||
if (split.AreaList.ElementAt(i).AreaList.First().Equals(sash))
|
||||
indexSplit = i;
|
||||
}
|
||||
switch (split.SplitVertList.ElementAt(indexSplit).MeasureType)
|
||||
{
|
||||
case MeasureTypes.ABSOLUT:
|
||||
{
|
||||
sash.Width = split.SplitVertList.ElementAt(indexSplit).dDimension;
|
||||
break;
|
||||
}
|
||||
case MeasureTypes.PROPORTIONAL:
|
||||
{
|
||||
/// TO DO!!!!!
|
||||
break;
|
||||
}
|
||||
case MeasureTypes.PERCENTAGE:
|
||||
{
|
||||
sash.Width = split.SplitVertList.ElementAt(indexSplit).dDimension / 100 * split.Width;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Frame frame = (Frame)sash.ParentWindow.AreaList[0];
|
||||
sash.Width = (frame.DimensionList.Where(x => x.sName == "Width").FirstOrDefault())!.dValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (area is Split)
|
||||
{
|
||||
Split split = (Split)area;
|
||||
if (area.ParentArea is Frame)
|
||||
{
|
||||
Frame frame = (Frame)area.ParentArea;
|
||||
split.Width = (frame.DimensionList.Where(x => x.sName == "Width").FirstOrDefault())!.dValue;
|
||||
}
|
||||
else if (split.ParentArea.ParentArea is Sash)
|
||||
{
|
||||
Sash sash = (Sash)split.ParentArea.ParentArea;
|
||||
int indexSash = 0;
|
||||
for (int i = 0; i < sash.AreaList.Count; i++)
|
||||
{
|
||||
if (sash.AreaList.ElementAt(i).AreaList.First().Equals(split))
|
||||
indexSash = i;
|
||||
}
|
||||
switch (sash.SashList.ElementAt(indexSash).MeasureType)
|
||||
{
|
||||
case MeasureTypes.ABSOLUT:
|
||||
{
|
||||
split.Width = sash.SashList.ElementAt(indexSash).dDimension;
|
||||
break;
|
||||
}
|
||||
case MeasureTypes.PROPORTIONAL:
|
||||
{
|
||||
/// TO DO!!!!!
|
||||
break;
|
||||
}
|
||||
case MeasureTypes.PERCENTAGE:
|
||||
{
|
||||
split.Width = sash.SashList.ElementAt(indexSash).dDimension / 100 * sash.Width;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//protected void calculateWidth(Area area)
|
||||
//{
|
||||
// if (area is Sash)
|
||||
// {
|
||||
// Sash sash = (Sash)area;
|
||||
// if (area.ParentArea is Frame)
|
||||
// {
|
||||
// Frame frame = (Frame)area.ParentArea;
|
||||
// sash.Width = (frame.DimensionList.Where(x => x.sName == "Width").FirstOrDefault())!.dValue;
|
||||
// }
|
||||
// else if (sash.ParentArea.ParentArea is Split)
|
||||
// {
|
||||
// Split split = (Split)sash.ParentArea.ParentArea;
|
||||
// if (split.SplitVertList.Count > 0)
|
||||
// {
|
||||
// int indexSplit = 0;
|
||||
// for(int i = 0; i < split.AreaList.Count; i++)
|
||||
// {
|
||||
// if (split.AreaList.ElementAt(i).AreaList.First().Equals(sash))
|
||||
// indexSplit = i;
|
||||
// }
|
||||
// switch (split.SplitVertList.ElementAt(indexSplit).MeasureType)
|
||||
// {
|
||||
// case MeasureTypes.ABSOLUT:
|
||||
// {
|
||||
// sash.Width = split.SplitVertList.ElementAt(indexSplit).dDimension;
|
||||
// break;
|
||||
// }
|
||||
// case MeasureTypes.PROPORTIONAL:
|
||||
// {
|
||||
// /// TO DO!!!!!
|
||||
// break;
|
||||
// }
|
||||
// case MeasureTypes.PERCENTAGE:
|
||||
// {
|
||||
// sash.Width = split.SplitVertList.ElementAt(indexSplit).dDimension / 100 * split.Width;
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// Frame frame = (Frame)sash.ParentWindow.AreaList[0];
|
||||
// sash.Width = (frame.DimensionList.Where(x => x.sName == "Width").FirstOrDefault())!.dValue;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// else if (area is Split)
|
||||
// {
|
||||
// Split split = (Split)area;
|
||||
// if (area.ParentArea is Frame)
|
||||
// {
|
||||
// Frame frame = (Frame)area.ParentArea;
|
||||
// split.Width = (frame.DimensionList.Where(x => x.sName == "Width").FirstOrDefault())!.dValue;
|
||||
// }
|
||||
// else if (split.ParentArea.ParentArea is Sash)
|
||||
// {
|
||||
// Sash sash = (Sash)split.ParentArea.ParentArea;
|
||||
// int indexSash = 0;
|
||||
// for (int i = 0; i < sash.AreaList.Count; i++)
|
||||
// {
|
||||
// if (sash.AreaList.ElementAt(i).AreaList.First().Equals(split))
|
||||
// indexSash = i;
|
||||
// }
|
||||
// switch (sash.SashList.ElementAt(indexSash).MeasureType)
|
||||
// {
|
||||
// case MeasureTypes.ABSOLUT:
|
||||
// {
|
||||
// split.Width = sash.SashList.ElementAt(indexSash).dDimension;
|
||||
// break;
|
||||
// }
|
||||
// case MeasureTypes.PROPORTIONAL:
|
||||
// {
|
||||
// //split.Width = Proportional2AbsolutVal(split);
|
||||
// break;
|
||||
// }
|
||||
// case MeasureTypes.PERCENTAGE:
|
||||
// {
|
||||
// split.Width = sash.SashList.ElementAt(indexSash).dDimension / 100 * sash.Width;
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
/// <summary>
|
||||
/// Calcola CSS warning
|
||||
|
||||
Reference in New Issue
Block a user