summaryrefslogtreecommitdiff
path: root/grapher/Field.cs
diff options
context:
space:
mode:
authorJacob Palecki <[email protected]>2020-07-29 21:09:48 -0700
committerJacob Palecki <[email protected]>2020-07-29 21:09:48 -0700
commitc30c1382668e716a245255083a48d8c6a9f3db36 (patch)
tree769c426ad57df230244fa9fff03b9e3e07e1702a /grapher/Field.cs
parentAdd FieldXY (diff)
downloadrawaccel-c30c1382668e716a245255083a48d8c6a9f3db36.tar.xz
rawaccel-c30c1382668e716a245255083a48d8c6a9f3db36.zip
Fix a few bugs around fieldXY
Diffstat (limited to 'grapher/Field.cs')
-rw-r--r--grapher/Field.cs6
1 files changed, 5 insertions, 1 deletions
diff --git a/grapher/Field.cs b/grapher/Field.cs
index 3f4b170..0f65e3e 100644
--- a/grapher/Field.cs
+++ b/grapher/Field.cs
@@ -79,6 +79,7 @@ namespace grapher
{
Box.BackColor = Color.White;
Box.ForeColor = Color.Black;
+
State = FieldState.Typing;
}
@@ -91,6 +92,7 @@ namespace grapher
{
Box.BackColor = Color.AntiqueWhite;
Box.ForeColor = Color.DarkGray;
+
State = FieldState.Entered;
}
@@ -112,6 +114,8 @@ namespace grapher
Box.BackColor = Color.LightGray;
Box.ForeColor = Color.LightGray;
Box.Text = string.Empty;
+
+ State = FieldState.Unavailable;
}
}
@@ -158,9 +162,9 @@ namespace grapher
}
catch
{
- Box.Text = Data.ToString();
}
+ Box.Text = Data.ToString("N2");
e.Handled = true;
e.SuppressKeyPress = true;