From c30c1382668e716a245255083a48d8c6a9f3db36 Mon Sep 17 00:00:00 2001 From: Jacob Palecki Date: Wed, 29 Jul 2020 21:09:48 -0700 Subject: Fix a few bugs around fieldXY --- grapher/Field.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'grapher/Field.cs') 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; -- cgit v1.2.3