summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--grapher/Field.cs6
-rw-r--r--grapher/FieldXY.cs4
2 files changed, 7 insertions, 3 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;
diff --git a/grapher/FieldXY.cs b/grapher/FieldXY.cs
index f06cc4f..60da3a4 100644
--- a/grapher/FieldXY.cs
+++ b/grapher/FieldXY.cs
@@ -52,11 +52,11 @@ namespace grapher
{
if (LockCheckBox.CheckState == CheckState.Checked)
{
- SetUnlocked();
+ SetLocked();
}
else
{
- SetLocked();
+ SetUnlocked();
}
}