summaryrefslogtreecommitdiff
path: root/grapher/Models/Options/ActiveValueLabel.cs
diff options
context:
space:
mode:
authorJacob Palecki <[email protected]>2020-09-01 02:18:41 -0700
committerJacob Palecki <[email protected]>2020-09-01 02:18:41 -0700
commit246fb772c5bf7dd6a85143fadebece3b4d9f1e04 (patch)
tree454c869d44c69a0e7603ceb1e03de8a3e4f5e70a /grapher/Models/Options/ActiveValueLabel.cs
parentShow xy charts only when accel applied by component (diff)
downloadrawaccel-246fb772c5bf7dd6a85143fadebece3b4d9f1e04.tar.xz
rawaccel-246fb772c5bf7dd6a85143fadebece3b4d9f1e04.zip
Add constants class and separate classes into regions
Diffstat (limited to 'grapher/Models/Options/ActiveValueLabel.cs')
-rw-r--r--grapher/Models/Options/ActiveValueLabel.cs20
1 files changed, 20 insertions, 0 deletions
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
}
}