fixed a bunch more

This commit is contained in:
Clint Rutkas
2019-12-12 14:34:25 -08:00
parent 4c88c9b029
commit 151a937c10
15 changed files with 180 additions and 173 deletions

View File

@@ -6,6 +6,16 @@ namespace FancyZonesEditor
{
public class RowColInfo
{
private const int _multiplier = 10000;
public double Extent { get; set; }
public double Start { get; set; }
public double End { get; set; }
public int Percent { get; set; }
public RowColInfo(int percent)
{
Percent = percent;
@@ -13,15 +23,13 @@ namespace FancyZonesEditor
public RowColInfo(int index, int count)
{
Percent = (c_multiplier / count) + ((index == 0) ? (c_multiplier % count) : 0);
Percent = (_multiplier / count) + ((index == 0) ? (_multiplier % count) : 0);
}
private const int c_multiplier = 10000;
public double SetExtent(double start, double totalExtent)
public double Recalculate(double start, double totalExtent)
{
Start = start;
Extent = totalExtent * Percent / c_multiplier;
Extent = totalExtent * Percent / _multiplier;
End = Start + Extent;
return Extent;
}
@@ -35,10 +43,5 @@ namespace FancyZonesEditor
info[1] = new RowColInfo(Percent - newPercent);
return info;
}
public int Percent;
public double Extent;
public double Start;
public double End;
}
}