summaryrefslogtreecommitdiff
path: root/grapher/Models/Options/AccelOptions.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/AccelOptions.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/AccelOptions.cs')
-rw-r--r--grapher/Models/Options/AccelOptions.cs20
1 files changed, 20 insertions, 0 deletions
diff --git a/grapher/Models/Options/AccelOptions.cs b/grapher/Models/Options/AccelOptions.cs
index 6b98274..224c5cb 100644
--- a/grapher/Models/Options/AccelOptions.cs
+++ b/grapher/Models/Options/AccelOptions.cs
@@ -11,9 +11,15 @@ namespace grapher
{
public class AccelOptions
{
+ #region Constants
+
public const int PossibleOptionsCount = 4;
public const int PossibleOptionsXYCount = 2;
+ #endregion Constants
+
+ #region Fields
+
public static readonly Dictionary<string, LayoutBase> AccelerationTypes = new List<LayoutBase>
{
new LinearLayout(),
@@ -27,6 +33,10 @@ namespace grapher
new OffLayout()
}.ToDictionary(k => k.Name);
+ #endregion Fields
+
+ #region Constructors
+
public AccelOptions(
ComboBox accelDropdown,
Option[] options,
@@ -57,6 +67,10 @@ namespace grapher
Layout("Off");
}
+ #endregion Constructors
+
+ #region Properties
+
public Button WriteButton { get; }
public ComboBox AccelDropdown { get; }
@@ -69,6 +83,10 @@ namespace grapher
public OptionXY[] OptionsXY { get; }
+ #endregion Properties
+
+ #region Methods
+
public void SetActiveValue(int index)
{
var name = AccelerationTypes.Where(t => t.Value.Index == index).FirstOrDefault().Value.Name;
@@ -87,5 +105,7 @@ namespace grapher
AccelerationIndex = accelerationType.Index;
accelerationType.Layout(Options, OptionsXY, WriteButton);
}
+
+ #endregion Methods
}
}