summaryrefslogtreecommitdiff
path: root/grapher/Models/Charts/AccelCharts.cs
diff options
context:
space:
mode:
Diffstat (limited to 'grapher/Models/Charts/AccelCharts.cs')
-rw-r--r--grapher/Models/Charts/AccelCharts.cs35
1 files changed, 19 insertions, 16 deletions
diff --git a/grapher/Models/Charts/AccelCharts.cs b/grapher/Models/Charts/AccelCharts.cs
index 1aa3909..5e4b3de 100644
--- a/grapher/Models/Charts/AccelCharts.cs
+++ b/grapher/Models/Charts/AccelCharts.cs
@@ -14,18 +14,14 @@ namespace grapher
{
public class AccelCharts
{
- public const int ChartSeparationVertical = 10;
-
- /// <summary> Needed to show full contents in form. Unsure why. </summary>
- public const int FormHeightPadding = 35;
+ #region Constructors
public AccelCharts(
Form form,
ChartXY sensitivityChart,
ChartXY velocityChart,
ChartXY gainChart,
- ToolStripMenuItem enableVelocityAndGain,
- ICollection<CheckBox> checkBoxesXY)
+ ToolStripMenuItem enableVelocityAndGain)
{
Estimated = new EstimatedPoints();
EstimatedX = new EstimatedPoints();
@@ -37,7 +33,6 @@ namespace grapher
VelocityChart = velocityChart;
GainChart = gainChart;
EnableVelocityAndGain = enableVelocityAndGain;
- CheckBoxesXY = checkBoxesXY;
SensitivityChart.SetPointBinds(Estimated.Sensitivity, EstimatedX.Sensitivity, EstimatedY.Sensitivity);
VelocityChart.SetPointBinds(Estimated.Velocity, EstimatedX.Velocity, EstimatedY.Velocity);
@@ -45,9 +40,9 @@ namespace grapher
SensitivityChart.SetTop(0);
VelocityChart.SetHeight(SensitivityChart.Height);
- VelocityChart.SetTop(SensitivityChart.Height + ChartSeparationVertical);
+ VelocityChart.SetTop(SensitivityChart.Height + Constants.ChartSeparationVertical);
GainChart.SetHeight(SensitivityChart.Height);
- GainChart.SetTop(VelocityChart.Top + VelocityChart.Height + ChartSeparationVertical);
+ GainChart.SetTop(VelocityChart.Top + VelocityChart.Height + Constants.ChartSeparationVertical);
Rectangle screenRectangle = ContaingForm.RectangleToScreen(ContaingForm.ClientRectangle);
FormBorderHeight = screenRectangle.Top - ContaingForm.Top;
@@ -60,6 +55,10 @@ namespace grapher
ShowCombined();
}
+ #endregion Constructors
+
+ #region Properties
+
public Form ContaingForm { get; }
public ChartXY SensitivityChart { get; }
@@ -78,12 +77,14 @@ namespace grapher
private EstimatedPoints EstimatedY { get; }
- private ICollection<CheckBox> CheckBoxesXY { get; }
-
private bool Combined { get; set; }
private int FormBorderHeight { get; }
+ #endregion Properties
+
+ #region Methods
+
public void MakeDots(int x, int y, double timeInMs)
{
if (Combined)
@@ -119,9 +120,9 @@ namespace grapher
}
}
- public void RefreshXY()
+ public void RefreshXY(bool isWhole)
{
- if (CheckBoxesXY.All(box => box.Checked))
+ if (isWhole)
{
ShowCombined();
}
@@ -152,10 +153,10 @@ namespace grapher
{
VelocityChart.Show();
GainChart.Show();
- ContaingForm.Height = SensitivityChart.Height +
- ChartSeparationVertical +
+ ContaingForm.Height = SensitivityChart.Height +
+ Constants.ChartSeparationVertical +
VelocityChart.Height +
- ChartSeparationVertical +
+ Constants.ChartSeparationVertical +
GainChart.Height +
FormBorderHeight;
}
@@ -199,5 +200,7 @@ namespace grapher
{
ContaingForm.Width = SensitivityChart.Left + SensitivityChart.Width;
}
+
+ #endregion Methods
}
}