summaryrefslogtreecommitdiff
path: root/grapher/Models/Fields/FieldXY.cs
diff options
context:
space:
mode:
Diffstat (limited to 'grapher/Models/Fields/FieldXY.cs')
-rw-r--r--grapher/Models/Fields/FieldXY.cs18
1 files changed, 5 insertions, 13 deletions
diff --git a/grapher/Models/Fields/FieldXY.cs b/grapher/Models/Fields/FieldXY.cs
index 83f6434..826be27 100644
--- a/grapher/Models/Fields/FieldXY.cs
+++ b/grapher/Models/Fields/FieldXY.cs
@@ -9,31 +9,23 @@ namespace grapher
{
public class FieldXY
{
- #region Constants
-
- public const int DefaultSeparation = 4;
-
- public const string ShortenedFormatString = "0.###";
-
- #endregion Constants
-
#region Constructors
public FieldXY(TextBox xBox, TextBox yBox, CheckBox lockCheckBox, Form containingForm, double defaultData)
{
XField = new Field(xBox, containingForm, defaultData);
YField = new Field(yBox, containingForm, defaultData);
- YField.FormatString = ShortenedFormatString;
+ YField.FormatString = Constants.ShortenedFormatString;
LockCheckBox = lockCheckBox;
LockCheckBox.CheckedChanged += new System.EventHandler(CheckChanged);
- XField.Box.Width = (YField.Box.Left + YField.Box.Width - XField.Box.Left - DefaultSeparation) / 2;
+ XField.Box.Width = (YField.Box.Left + YField.Box.Width - XField.Box.Left - Constants.DefaultFieldSeparation) / 2;
YField.Box.Width = XField.Box.Width;
DefaultWidthX = XField.Box.Width;
DefaultWidthY = YField.Box.Width;
- YField.Box.Left = XField.Box.Left + XField.Box.Width + DefaultSeparation;
+ YField.Box.Left = XField.Box.Left + XField.Box.Width + Constants.DefaultFieldSeparation;
CombinedWidth = DefaultWidthX + DefaultWidthY + YField.Box.Left - (XField.Box.Left + DefaultWidthX);
SetCombined();
@@ -99,7 +91,7 @@ namespace grapher
YField.SetToUnavailable();
YField.Box.Hide();
XField.Box.Width = CombinedWidth;
- XField.FormatString = Field.DefaultFormatString;
+ XField.FormatString = Constants.DefaultFieldFormatString;
}
public void SetSeparate()
@@ -109,7 +101,7 @@ namespace grapher
XField.Box.Width = DefaultWidthX;
YField.Box.Width = DefaultWidthY;
- XField.FormatString = ShortenedFormatString;
+ XField.FormatString = Constants.ShortenedFormatString;
if (XField.State == Field.FieldState.Default)
{