From 246fb772c5bf7dd6a85143fadebece3b4d9f1e04 Mon Sep 17 00:00:00 2001 From: Jacob Palecki Date: Tue, 1 Sep 2020 02:18:41 -0700 Subject: Add constants class and separate classes into regions --- grapher/Models/Options/ActiveValueLabel.cs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'grapher/Models/Options/ActiveValueLabel.cs') diff --git a/grapher/Models/Options/ActiveValueLabel.cs b/grapher/Models/Options/ActiveValueLabel.cs index 138775a..b2355b5 100644 --- a/grapher/Models/Options/ActiveValueLabel.cs +++ b/grapher/Models/Options/ActiveValueLabel.cs @@ -10,12 +10,22 @@ namespace grapher.Models.Options { public class ActiveValueLabel { + #region Constants + public const string DefaultFormatString = "0.######"; public static readonly Color ActiveValueFontColor = Color.FromArgb(255, 65, 65, 65); + #endregion Constants + + #region Fields + private string _prefix; private string _value; + #endregion Fields + + #region Constructors + public ActiveValueLabel(Label valueLabel, Label centeringLabel) { ValueLabel = valueLabel; @@ -29,6 +39,10 @@ namespace grapher.Models.Options Prefix = string.Empty; } + #endregion Constructors + + #region Properties + public Label ValueLabel { get; } public string FormatString { get; set; } @@ -79,6 +93,10 @@ namespace grapher.Models.Options } } + #endregion Properties + + #region Methods + public void Hide() { ValueLabel.Hide(); @@ -103,5 +121,7 @@ namespace grapher.Models.Options { ValueLabel.Text = string.IsNullOrWhiteSpace(Prefix) ? Value: $"{Prefix}: {Value}"; } + + #endregion Methods } } -- cgit v1.2.3