summaryrefslogtreecommitdiff
path: root/grapher/Models/Options/ActiveValueLabelXY.cs
diff options
context:
space:
mode:
Diffstat (limited to 'grapher/Models/Options/ActiveValueLabelXY.cs')
-rw-r--r--grapher/Models/Options/ActiveValueLabelXY.cs28
1 files changed, 21 insertions, 7 deletions
diff --git a/grapher/Models/Options/ActiveValueLabelXY.cs b/grapher/Models/Options/ActiveValueLabelXY.cs
index 12506e9..c8caddf 100644
--- a/grapher/Models/Options/ActiveValueLabelXY.cs
+++ b/grapher/Models/Options/ActiveValueLabelXY.cs
@@ -8,8 +8,12 @@ namespace grapher.Models.Options
{
public class ActiveValueLabelXY
{
- public const int ActiveLabelXYSeparation = 2;
- public const string ShortenedFormatString = "0.###";
+ #region Constants
+
+
+ #endregion Constants
+
+ #region Constructors
public ActiveValueLabelXY(
ActiveValueLabel x,
@@ -19,16 +23,20 @@ namespace grapher.Models.Options
Y = y;
FullWidth = x.Width;
- ShortenedWidth = (FullWidth - ActiveLabelXYSeparation) / 2;
+ ShortenedWidth = (FullWidth - Constants.ActiveLabelXYSeparation) / 2;
- Y.Left = X.Left + ShortenedWidth + ActiveLabelXYSeparation;
+ Y.Left = X.Left + ShortenedWidth + Constants.ActiveLabelXYSeparation;
Y.Width = ShortenedWidth;
- Y.FormatString = ShortenedFormatString;
+ Y.FormatString = Constants.ShortenedFormatString;
Combined = false;
SetCombined();
}
+ #endregion Constructors
+
+ #region Properties
+
public ActiveValueLabel X { get; }
public ActiveValueLabel Y { get; }
@@ -39,6 +47,10 @@ namespace grapher.Models.Options
private int ShortenedWidth { get; }
+ #endregion Properties
+
+ #region Methods
+
public void SetValues(double x, double y)
{
X.SetValue(x);
@@ -58,7 +70,7 @@ namespace grapher.Models.Options
{
if (!Combined)
{
- X.FormatString = ActiveValueLabel.DefaultFormatString;
+ X.FormatString = Constants.DefaultActiveValueFormatString;
X.Width = FullWidth;
X.Prefix = string.Empty;
Y.Hide();
@@ -71,7 +83,7 @@ namespace grapher.Models.Options
{
if (Combined)
{
- X.FormatString = ShortenedFormatString;
+ X.FormatString = Constants.ShortenedFormatString;
X.Width = ShortenedWidth;
X.Prefix = "X";
Y.Prefix = "Y";
@@ -80,5 +92,7 @@ namespace grapher.Models.Options
Combined = false;
}
+
+ #endregion Methods
}
}