From 95cc3ed0a0bf66f5535b873f245bc1c35a145478 Mon Sep 17 00:00:00 2001 From: Jacob Palecki Date: Tue, 1 Sep 2020 21:45:42 -0700 Subject: intermittent commit - large commit halfway done --- grapher/Layouts/LayoutBase.cs | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'grapher/Layouts') diff --git a/grapher/Layouts/LayoutBase.cs b/grapher/Layouts/LayoutBase.cs index eed1716..0ad855a 100644 --- a/grapher/Layouts/LayoutBase.cs +++ b/grapher/Layouts/LayoutBase.cs @@ -40,7 +40,7 @@ namespace grapher.Layouts internal bool ButtonEnabled { get; set; } - public void Layout(Option[] options, OptionXY[] optionsXY, Button button) + public void Layout(Option[] options, Button button) { // Relies on AccelOptions to keep lengths correct. for (int i = 0; i < options.Length; i++) @@ -55,19 +55,6 @@ namespace grapher.Layouts } } - // Relies on AccelOptions to keep lengths correct. - for (int i = 0; i< optionsXY.Length; i++) - { - if (ShowOptionsXY[i]) - { - optionsXY[i].Show(); - } - else - { - optionsXY[i].Hide(); - } - } - button.Enabled = ButtonEnabled; } } -- cgit v1.2.3 From 26130b21dabaab7fc331844df11465623a811197 Mon Sep 17 00:00:00 2001 From: Jacob Palecki Date: Tue, 1 Sep 2020 22:42:07 -0700 Subject: Second half - the parts in place --- grapher/Layouts/ClassicLayout.cs | 4 ++-- grapher/Layouts/DefaultLayout.cs | 4 ++-- grapher/Layouts/LayoutBase.cs | 6 ++++-- grapher/Layouts/LinearLayout.cs | 4 ++-- grapher/Layouts/LogLayout.cs | 4 ++-- grapher/Layouts/NaturalGainLayout.cs | 4 ++-- grapher/Layouts/NaturalLayout.cs | 2 +- grapher/Layouts/OffLayout.cs | 5 ++--- grapher/Layouts/PowerLayout.cs | 4 ++-- grapher/Layouts/SigmoidGainLayout.cs | 4 ++-- grapher/Layouts/SigmoidLayout.cs | 4 ++-- 11 files changed, 23 insertions(+), 22 deletions(-) (limited to 'grapher/Layouts') diff --git a/grapher/Layouts/ClassicLayout.cs b/grapher/Layouts/ClassicLayout.cs index 05f6c82..f7766f0 100644 --- a/grapher/Layouts/ClassicLayout.cs +++ b/grapher/Layouts/ClassicLayout.cs @@ -14,8 +14,8 @@ namespace grapher.Layouts { Name = "Classic"; Index = (int)AccelMode.classic; - ShowOptions = new bool[] { true, true, true, false }; - OptionNames = new string[] { Offset, Acceleration, Exponent, string.Empty }; + ShowOptions = new bool[] { true, true, true, false, true, true }; + OptionNames = new string[] { Offset, Acceleration, Exponent, string.Empty, Cap, Weight }; } } } diff --git a/grapher/Layouts/DefaultLayout.cs b/grapher/Layouts/DefaultLayout.cs index 42841d5..cb1994f 100644 --- a/grapher/Layouts/DefaultLayout.cs +++ b/grapher/Layouts/DefaultLayout.cs @@ -16,8 +16,8 @@ namespace grapher.Layouts { Name = "Default"; Index = (int)AccelMode.noaccel; - ShowOptions = new bool[] { true, true, true, true }; - OptionNames = new string[] { Offset, Acceleration, $"{Limit}\\{Exponent}", Midpoint }; + ShowOptions = new bool[] { true, true, true, true, true }; + OptionNames = new string[] { Offset, Acceleration, $"{Limit}\\{Exponent}", Midpoint, Cap, Weight }; ButtonEnabled = false; } } diff --git a/grapher/Layouts/LayoutBase.cs b/grapher/Layouts/LayoutBase.cs index 0ad855a..daac6f1 100644 --- a/grapher/Layouts/LayoutBase.cs +++ b/grapher/Layouts/LayoutBase.cs @@ -15,12 +15,14 @@ namespace grapher.Layouts public const string Limit = "Limit"; public const string Midpoint = "Midpoint"; public const string Offset = "Offset"; + public const string Cap = "Cap"; + public const string Weight = "Weight"; public LayoutBase() { - ShowOptions = new bool[] { false, false, false, false }; + ShowOptions = new bool[] { false, false, false, false, true, true }; ShowOptionsXY = new bool[] { true, true }; - OptionNames = new string[] { string.Empty, string.Empty, string.Empty, string.Empty }; + OptionNames = new string[] { string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty }; ButtonEnabled = true; } diff --git a/grapher/Layouts/LinearLayout.cs b/grapher/Layouts/LinearLayout.cs index 0a79a64..8b1d444 100644 --- a/grapher/Layouts/LinearLayout.cs +++ b/grapher/Layouts/LinearLayout.cs @@ -14,8 +14,8 @@ namespace grapher.Layouts { Name = "Linear"; Index = (int)AccelMode.linear; - ShowOptions = new bool[] { true, true, false, false }; - OptionNames = new string[] { Offset, Acceleration, string.Empty, string.Empty }; + ShowOptions = new bool[] { true, true, false, false, true, true }; + OptionNames = new string[] { Offset, Acceleration, string.Empty, string.Empty, Cap, Weight }; } } } diff --git a/grapher/Layouts/LogLayout.cs b/grapher/Layouts/LogLayout.cs index 1206fb3..4b73683 100644 --- a/grapher/Layouts/LogLayout.cs +++ b/grapher/Layouts/LogLayout.cs @@ -14,8 +14,8 @@ namespace grapher.Layouts { Name = "Logarithmic"; Index = (int)AccelMode.logarithmic; - ShowOptions = new bool[] { true, true, false, false }; - OptionNames = new string[] { Offset, Acceleration, string.Empty, string.Empty }; + ShowOptions = new bool[] { true, true, false, false, true, true }; + OptionNames = new string[] { Offset, Acceleration, string.Empty, string.Empty, Cap, Weight }; } } } diff --git a/grapher/Layouts/NaturalGainLayout.cs b/grapher/Layouts/NaturalGainLayout.cs index 9bb1ec8..0f9caf0 100644 --- a/grapher/Layouts/NaturalGainLayout.cs +++ b/grapher/Layouts/NaturalGainLayout.cs @@ -14,8 +14,8 @@ namespace grapher.Layouts { Name = "NaturalGain"; Index = (int)AccelMode.naturalgain; - ShowOptions = new bool[] { true, true, true, false }; - OptionNames = new string[] { Offset, Acceleration, Limit, string.Empty }; + ShowOptions = new bool[] { true, true, true, false, false, true }; + OptionNames = new string[] { Offset, Acceleration, Limit, string.Empty, string.Empty, Weight}; } } } diff --git a/grapher/Layouts/NaturalLayout.cs b/grapher/Layouts/NaturalLayout.cs index 44c6c18..a6da67d 100644 --- a/grapher/Layouts/NaturalLayout.cs +++ b/grapher/Layouts/NaturalLayout.cs @@ -14,7 +14,7 @@ namespace grapher.Layouts { Name = "Natural"; Index = (int)AccelMode.natural; - ShowOptions = new bool[] { true, true, true, false }; + ShowOptions = new bool[] { true, true, true, false, false, true }; OptionNames = new string[] { Offset, Acceleration, Limit, string.Empty }; } } diff --git a/grapher/Layouts/OffLayout.cs b/grapher/Layouts/OffLayout.cs index ce7c149..1c37026 100644 --- a/grapher/Layouts/OffLayout.cs +++ b/grapher/Layouts/OffLayout.cs @@ -14,9 +14,8 @@ namespace grapher.Layouts { Name = "Off"; Index = (int)AccelMode.noaccel; - ShowOptions = new bool[] { false, false, false, false }; - OptionNames = new string[] { string.Empty, string.Empty, string.Empty, string.Empty }; - ShowOptionsXY = new bool[] { false, false }; + ShowOptions = new bool[] { false, false, false, false, false, false }; + OptionNames = new string[] { string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty }; ButtonEnabled = true; } } diff --git a/grapher/Layouts/PowerLayout.cs b/grapher/Layouts/PowerLayout.cs index c14083a..699536f 100644 --- a/grapher/Layouts/PowerLayout.cs +++ b/grapher/Layouts/PowerLayout.cs @@ -14,8 +14,8 @@ namespace grapher.Layouts { Name = "Power"; Index = (int)AccelMode.power; - ShowOptions = new bool[] { true, true, true, false }; - OptionNames = new string[] { Offset, Scale, Exponent, string.Empty }; + ShowOptions = new bool[] { true, true, true, false, true, true }; + OptionNames = new string[] { Offset, Scale, Exponent, string.Empty, Cap, Weight }; } } } diff --git a/grapher/Layouts/SigmoidGainLayout.cs b/grapher/Layouts/SigmoidGainLayout.cs index 93214ec..3897477 100644 --- a/grapher/Layouts/SigmoidGainLayout.cs +++ b/grapher/Layouts/SigmoidGainLayout.cs @@ -14,8 +14,8 @@ namespace grapher.Layouts { Name = "SigmoidGain"; Index = (int)AccelMode.sigmoidgain; - ShowOptions = new bool[] { true, true, true, true }; - OptionNames = new string[] { Offset, Acceleration, Limit, Midpoint }; + ShowOptions = new bool[] { true, true, true, true, false, true }; + OptionNames = new string[] { Offset, Acceleration, Limit, Midpoint, string.Empty, Weight }; } } } diff --git a/grapher/Layouts/SigmoidLayout.cs b/grapher/Layouts/SigmoidLayout.cs index 1c7f0b9..e5e35cd 100644 --- a/grapher/Layouts/SigmoidLayout.cs +++ b/grapher/Layouts/SigmoidLayout.cs @@ -14,8 +14,8 @@ namespace grapher.Layouts { Name = "Sigmoid"; Index = (int)AccelMode.sigmoid; - ShowOptions = new bool[] { true, true, true, true }; - OptionNames = new string[] { Offset, Acceleration, Limit, Midpoint }; + ShowOptions = new bool[] { true, true, true, true, false, true }; + OptionNames = new string[] { Offset, Acceleration, Limit, Midpoint, string.Empty, Weight }; } } } -- cgit v1.2.3 From bf747ca2439a371ef74e21a49c1e8bc880d4d3e2 Mon Sep 17 00:00:00 2001 From: Jacob Palecki Date: Tue, 1 Sep 2020 23:36:52 -0700 Subject: Small fixes, correctly align labels and boxes --- grapher/Layouts/NaturalLayout.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'grapher/Layouts') diff --git a/grapher/Layouts/NaturalLayout.cs b/grapher/Layouts/NaturalLayout.cs index a6da67d..caa77bd 100644 --- a/grapher/Layouts/NaturalLayout.cs +++ b/grapher/Layouts/NaturalLayout.cs @@ -15,7 +15,7 @@ namespace grapher.Layouts Name = "Natural"; Index = (int)AccelMode.natural; ShowOptions = new bool[] { true, true, true, false, false, true }; - OptionNames = new string[] { Offset, Acceleration, Limit, string.Empty }; + OptionNames = new string[] { Offset, Acceleration, Limit, string.Empty, string.Empty, Weight }; } } } -- cgit v1.2.3 From 6470bff9672c56024c542a74a00429273501879f Mon Sep 17 00:00:00 2001 From: Jacob Palecki Date: Fri, 4 Sep 2020 01:53:59 -0700 Subject: Remove log and sigmoid styles --- grapher/Layouts/LogLayout.cs | 21 --------------------- grapher/Layouts/SigmoidLayout.cs | 21 --------------------- 2 files changed, 42 deletions(-) delete mode 100644 grapher/Layouts/LogLayout.cs delete mode 100644 grapher/Layouts/SigmoidLayout.cs (limited to 'grapher/Layouts') diff --git a/grapher/Layouts/LogLayout.cs b/grapher/Layouts/LogLayout.cs deleted file mode 100644 index 4b73683..0000000 --- a/grapher/Layouts/LogLayout.cs +++ /dev/null @@ -1,21 +0,0 @@ -using grapher.Models.Serialized; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace grapher.Layouts -{ - public class LogLayout : LayoutBase - { - public LogLayout() - : base() - { - Name = "Logarithmic"; - Index = (int)AccelMode.logarithmic; - ShowOptions = new bool[] { true, true, false, false, true, true }; - OptionNames = new string[] { Offset, Acceleration, string.Empty, string.Empty, Cap, Weight }; - } - } -} diff --git a/grapher/Layouts/SigmoidLayout.cs b/grapher/Layouts/SigmoidLayout.cs deleted file mode 100644 index e5e35cd..0000000 --- a/grapher/Layouts/SigmoidLayout.cs +++ /dev/null @@ -1,21 +0,0 @@ -using grapher.Models.Serialized; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace grapher.Layouts -{ - public class SigmoidLayout : LayoutBase - { - public SigmoidLayout() - : base() - { - Name = "Sigmoid"; - Index = (int)AccelMode.sigmoid; - ShowOptions = new bool[] { true, true, true, true, false, true }; - OptionNames = new string[] { Offset, Acceleration, Limit, Midpoint, string.Empty, Weight }; - } - } -} -- cgit v1.2.3 From aff3a066575f4bfa429f67a5104a1fcffc5f326e Mon Sep 17 00:00:00 2001 From: Jacob Palecki Date: Mon, 7 Sep 2020 15:19:39 -0700 Subject: Refactor type options --- grapher/Layouts/ClassicLayout.cs | 9 +++- grapher/Layouts/DefaultLayout.cs | 9 +++- grapher/Layouts/LayoutBase.cs | 86 ++++++++++++++++++++++++++++-------- grapher/Layouts/LinearLayout.cs | 9 +++- grapher/Layouts/NaturalGainLayout.cs | 9 +++- grapher/Layouts/NaturalLayout.cs | 9 +++- grapher/Layouts/OffLayout.cs | 9 +++- grapher/Layouts/OptionLayout.cs | 41 +++++++++++++++++ grapher/Layouts/PowerLayout.cs | 9 +++- grapher/Layouts/SigmoidGainLayout.cs | 9 +++- 10 files changed, 165 insertions(+), 34 deletions(-) create mode 100644 grapher/Layouts/OptionLayout.cs (limited to 'grapher/Layouts') diff --git a/grapher/Layouts/ClassicLayout.cs b/grapher/Layouts/ClassicLayout.cs index f7766f0..d02e11c 100644 --- a/grapher/Layouts/ClassicLayout.cs +++ b/grapher/Layouts/ClassicLayout.cs @@ -14,8 +14,13 @@ namespace grapher.Layouts { Name = "Classic"; Index = (int)AccelMode.classic; - ShowOptions = new bool[] { true, true, true, false, true, true }; - OptionNames = new string[] { Offset, Acceleration, Exponent, string.Empty, Cap, Weight }; + + AccelLayout = new OptionLayout(true, Acceleration); + CapLayout = new OptionLayout(true, Cap); + WeightLayout = new OptionLayout(true, Weight); + OffsetLayout = new OptionLayout(true, Offset); + LimExpLayout = new OptionLayout(true, Exponent); + MidpointLayout = new OptionLayout(false, string.Empty); } } } diff --git a/grapher/Layouts/DefaultLayout.cs b/grapher/Layouts/DefaultLayout.cs index cb1994f..d9e1413 100644 --- a/grapher/Layouts/DefaultLayout.cs +++ b/grapher/Layouts/DefaultLayout.cs @@ -16,9 +16,14 @@ namespace grapher.Layouts { Name = "Default"; Index = (int)AccelMode.noaccel; - ShowOptions = new bool[] { true, true, true, true, true }; - OptionNames = new string[] { Offset, Acceleration, $"{Limit}\\{Exponent}", Midpoint, Cap, Weight }; ButtonEnabled = false; + + AccelLayout = new OptionLayout(true, Acceleration); + CapLayout = new OptionLayout(true, Cap); + WeightLayout = new OptionLayout(true, Weight); + OffsetLayout = new OptionLayout(true, Offset); + LimExpLayout = new OptionLayout(true, $"{Limit}\\{Exponent}"); + MidpointLayout = new OptionLayout(true, Midpoint); } } } diff --git a/grapher/Layouts/LayoutBase.cs b/grapher/Layouts/LayoutBase.cs index daac6f1..629b0a4 100644 --- a/grapher/Layouts/LayoutBase.cs +++ b/grapher/Layouts/LayoutBase.cs @@ -1,4 +1,5 @@ -using System; +using grapher.Models.Options; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -20,9 +21,13 @@ namespace grapher.Layouts public LayoutBase() { - ShowOptions = new bool[] { false, false, false, false, true, true }; - ShowOptionsXY = new bool[] { true, true }; - OptionNames = new string[] { string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty }; + AccelLayout = new OptionLayout(false, string.Empty); + CapLayout = new OptionLayout(false, string.Empty); + WeightLayout = new OptionLayout(false, string.Empty); + OffsetLayout = new OptionLayout(false, string.Empty); + LimExpLayout = new OptionLayout(false, string.Empty); + MidpointLayout = new OptionLayout(false, string.Empty); + ButtonEnabled = true; } @@ -34,30 +39,75 @@ namespace grapher.Layouts public string Name { get; internal set; } - internal bool[] ShowOptions { get; set; } + protected bool ButtonEnabled { get; set; } + + protected OptionLayout AccelLayout { get; set; } + + protected OptionLayout CapLayout { get; set; } + + protected OptionLayout WeightLayout { get; set; } - internal bool[] ShowOptionsXY { get; set; } + protected OptionLayout OffsetLayout { get; set; } - internal string[] OptionNames { get; set; } + protected OptionLayout LimExpLayout { get; set; } - internal bool ButtonEnabled { get; set; } + protected OptionLayout MidpointLayout { get; set; } - public void Layout(Option[] options, Button button) + public void Layout( + IOption accelOption, + IOption capOption, + IOption weightOption, + IOption offsetOption, + IOption limExpOption, + IOption midpointOption, + Button button, + int top) { - // Relies on AccelOptions to keep lengths correct. - for (int i = 0; i < options.Length; i++) + AccelLayout.Layout(accelOption); + CapLayout.Layout(capOption); + WeightLayout.Layout(weightOption); + OffsetLayout.Layout(offsetOption); + LimExpLayout.Layout(limExpOption); + MidpointLayout.Layout(midpointOption); + + button.Enabled = ButtonEnabled; + + IOption previous = null; + foreach (var option in new IOption[] { accelOption, capOption, weightOption, offsetOption, limExpOption, midpointOption}) { - if (ShowOptions[i]) + if (option.Visible) { - options[i].Show(OptionNames[i]); - } - else - { - options[i].Hide(); + if (previous != null) + { + option.SnapTo(previous); + } + else + { + option.Top = top; + } + + previous = option; } } + } - button.Enabled = ButtonEnabled; + public void Layout( + IOption accelOption, + IOption capOption, + IOption weightOption, + IOption offsetOption, + IOption limExpOption, + IOption midpointOption, + Button button) + { + Layout(accelOption, + capOption, + weightOption, + offsetOption, + limExpOption, + midpointOption, + button, + accelOption.Top); } } } diff --git a/grapher/Layouts/LinearLayout.cs b/grapher/Layouts/LinearLayout.cs index 8b1d444..b5c6434 100644 --- a/grapher/Layouts/LinearLayout.cs +++ b/grapher/Layouts/LinearLayout.cs @@ -14,8 +14,13 @@ namespace grapher.Layouts { Name = "Linear"; Index = (int)AccelMode.linear; - ShowOptions = new bool[] { true, true, false, false, true, true }; - OptionNames = new string[] { Offset, Acceleration, string.Empty, string.Empty, Cap, Weight }; + + AccelLayout = new OptionLayout(true, Acceleration); + CapLayout = new OptionLayout(true, Cap); + WeightLayout = new OptionLayout(false, string.Empty); + OffsetLayout = new OptionLayout(true, Offset); + LimExpLayout = new OptionLayout(false, string.Empty); + MidpointLayout = new OptionLayout(false, string.Empty); } } } diff --git a/grapher/Layouts/NaturalGainLayout.cs b/grapher/Layouts/NaturalGainLayout.cs index 0f9caf0..ae73c80 100644 --- a/grapher/Layouts/NaturalGainLayout.cs +++ b/grapher/Layouts/NaturalGainLayout.cs @@ -14,8 +14,13 @@ namespace grapher.Layouts { Name = "NaturalGain"; Index = (int)AccelMode.naturalgain; - ShowOptions = new bool[] { true, true, true, false, false, true }; - OptionNames = new string[] { Offset, Acceleration, Limit, string.Empty, string.Empty, Weight}; + + AccelLayout = new OptionLayout(true, Acceleration); + CapLayout = new OptionLayout(false, string.Empty); + WeightLayout = new OptionLayout(false, string.Empty); + OffsetLayout = new OptionLayout(true, Offset); + LimExpLayout = new OptionLayout(true, Limit); + MidpointLayout = new OptionLayout(false, string.Empty); } } } diff --git a/grapher/Layouts/NaturalLayout.cs b/grapher/Layouts/NaturalLayout.cs index caa77bd..0923e1d 100644 --- a/grapher/Layouts/NaturalLayout.cs +++ b/grapher/Layouts/NaturalLayout.cs @@ -14,8 +14,13 @@ namespace grapher.Layouts { Name = "Natural"; Index = (int)AccelMode.natural; - ShowOptions = new bool[] { true, true, true, false, false, true }; - OptionNames = new string[] { Offset, Acceleration, Limit, string.Empty, string.Empty, Weight }; + + AccelLayout = new OptionLayout(true, Acceleration); + CapLayout = new OptionLayout(false, string.Empty); + WeightLayout = new OptionLayout(false, string.Empty); + OffsetLayout = new OptionLayout(true, Offset); + LimExpLayout = new OptionLayout(true, Limit); + MidpointLayout = new OptionLayout(false, string.Empty); } } } diff --git a/grapher/Layouts/OffLayout.cs b/grapher/Layouts/OffLayout.cs index 1c37026..2a2f414 100644 --- a/grapher/Layouts/OffLayout.cs +++ b/grapher/Layouts/OffLayout.cs @@ -14,9 +14,14 @@ namespace grapher.Layouts { Name = "Off"; Index = (int)AccelMode.noaccel; - ShowOptions = new bool[] { false, false, false, false, false, false }; - OptionNames = new string[] { string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty }; ButtonEnabled = true; + + AccelLayout = new OptionLayout(false, string.Empty); + CapLayout = new OptionLayout(false, string.Empty); + WeightLayout = new OptionLayout(false, string.Empty); + OffsetLayout = new OptionLayout(false, string.Empty); + LimExpLayout = new OptionLayout(false, string.Empty); + MidpointLayout = new OptionLayout(false, string.Empty); } } } diff --git a/grapher/Layouts/OptionLayout.cs b/grapher/Layouts/OptionLayout.cs new file mode 100644 index 0000000..2f29706 --- /dev/null +++ b/grapher/Layouts/OptionLayout.cs @@ -0,0 +1,41 @@ +using grapher.Models.Options; + +namespace grapher.Layouts +{ + public class OptionLayout + { + #region Constructors + + public OptionLayout(bool show, string name) + { + Show = show; + Name = name; + } + + #endregion Constructors + + #region Properties + + private bool Show { get; } + + private string Name { get; } + + #endregion Properties + + #region Methods + + public void Layout(IOption option) + { + if (Show) + { + option.Show(Name); + } + else + { + option.Hide(); + } + } + + #endregion Methods + } +} diff --git a/grapher/Layouts/PowerLayout.cs b/grapher/Layouts/PowerLayout.cs index 699536f..4438c1a 100644 --- a/grapher/Layouts/PowerLayout.cs +++ b/grapher/Layouts/PowerLayout.cs @@ -14,8 +14,13 @@ namespace grapher.Layouts { Name = "Power"; Index = (int)AccelMode.power; - ShowOptions = new bool[] { true, true, true, false, true, true }; - OptionNames = new string[] { Offset, Scale, Exponent, string.Empty, Cap, Weight }; + + AccelLayout = new OptionLayout(true, Acceleration); + CapLayout = new OptionLayout(true, Cap); + WeightLayout = new OptionLayout(true, Weight); + OffsetLayout = new OptionLayout(true, Offset); + LimExpLayout = new OptionLayout(true, Limit); + MidpointLayout = new OptionLayout(false, string.Empty); } } } diff --git a/grapher/Layouts/SigmoidGainLayout.cs b/grapher/Layouts/SigmoidGainLayout.cs index 3897477..1704071 100644 --- a/grapher/Layouts/SigmoidGainLayout.cs +++ b/grapher/Layouts/SigmoidGainLayout.cs @@ -14,8 +14,13 @@ namespace grapher.Layouts { Name = "SigmoidGain"; Index = (int)AccelMode.sigmoidgain; - ShowOptions = new bool[] { true, true, true, true, false, true }; - OptionNames = new string[] { Offset, Acceleration, Limit, Midpoint, string.Empty, Weight }; + + AccelLayout = new OptionLayout(true, Acceleration); + CapLayout = new OptionLayout(false, string.Empty); + WeightLayout = new OptionLayout(false, string.Empty); + OffsetLayout = new OptionLayout(true, Offset); + LimExpLayout = new OptionLayout(true, Limit); + MidpointLayout = new OptionLayout(true, Midpoint); } } } -- cgit v1.2.3 From 9502dcf7608475857b1487375997d20a9d29622e Mon Sep 17 00:00:00 2001 From: Jacob Palecki Date: Tue, 8 Sep 2020 01:26:22 -0700 Subject: Remove and sort usings en masse --- grapher/Layouts/ClassicLayout.cs | 5 ----- grapher/Layouts/DefaultLayout.cs | 7 ------- grapher/Layouts/LayoutBase.cs | 5 ----- grapher/Layouts/LinearLayout.cs | 5 ----- grapher/Layouts/NaturalGainLayout.cs | 5 ----- grapher/Layouts/NaturalLayout.cs | 5 ----- grapher/Layouts/OffLayout.cs | 5 ----- grapher/Layouts/PowerLayout.cs | 5 ----- grapher/Layouts/SigmoidGainLayout.cs | 5 ----- 9 files changed, 47 deletions(-) (limited to 'grapher/Layouts') diff --git a/grapher/Layouts/ClassicLayout.cs b/grapher/Layouts/ClassicLayout.cs index d02e11c..572566f 100644 --- a/grapher/Layouts/ClassicLayout.cs +++ b/grapher/Layouts/ClassicLayout.cs @@ -1,9 +1,4 @@ using grapher.Models.Serialized; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace grapher.Layouts { diff --git a/grapher/Layouts/DefaultLayout.cs b/grapher/Layouts/DefaultLayout.cs index d9e1413..83535c2 100644 --- a/grapher/Layouts/DefaultLayout.cs +++ b/grapher/Layouts/DefaultLayout.cs @@ -1,11 +1,4 @@ using grapher.Models.Serialized; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; - namespace grapher.Layouts { diff --git a/grapher/Layouts/LayoutBase.cs b/grapher/Layouts/LayoutBase.cs index 629b0a4..6ed8fee 100644 --- a/grapher/Layouts/LayoutBase.cs +++ b/grapher/Layouts/LayoutBase.cs @@ -1,9 +1,4 @@ using grapher.Models.Options; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using System.Windows.Forms; namespace grapher.Layouts diff --git a/grapher/Layouts/LinearLayout.cs b/grapher/Layouts/LinearLayout.cs index b5c6434..fded8c7 100644 --- a/grapher/Layouts/LinearLayout.cs +++ b/grapher/Layouts/LinearLayout.cs @@ -1,9 +1,4 @@ using grapher.Models.Serialized; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace grapher.Layouts { diff --git a/grapher/Layouts/NaturalGainLayout.cs b/grapher/Layouts/NaturalGainLayout.cs index ae73c80..b982b91 100644 --- a/grapher/Layouts/NaturalGainLayout.cs +++ b/grapher/Layouts/NaturalGainLayout.cs @@ -1,9 +1,4 @@ using grapher.Models.Serialized; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace grapher.Layouts { diff --git a/grapher/Layouts/NaturalLayout.cs b/grapher/Layouts/NaturalLayout.cs index 0923e1d..aa5c22c 100644 --- a/grapher/Layouts/NaturalLayout.cs +++ b/grapher/Layouts/NaturalLayout.cs @@ -1,9 +1,4 @@ using grapher.Models.Serialized; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace grapher.Layouts { diff --git a/grapher/Layouts/OffLayout.cs b/grapher/Layouts/OffLayout.cs index 2a2f414..85c8d3f 100644 --- a/grapher/Layouts/OffLayout.cs +++ b/grapher/Layouts/OffLayout.cs @@ -1,9 +1,4 @@ using grapher.Models.Serialized; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace grapher.Layouts { diff --git a/grapher/Layouts/PowerLayout.cs b/grapher/Layouts/PowerLayout.cs index 4438c1a..e0dcaf8 100644 --- a/grapher/Layouts/PowerLayout.cs +++ b/grapher/Layouts/PowerLayout.cs @@ -1,9 +1,4 @@ using grapher.Models.Serialized; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace grapher.Layouts { diff --git a/grapher/Layouts/SigmoidGainLayout.cs b/grapher/Layouts/SigmoidGainLayout.cs index 1704071..183e31f 100644 --- a/grapher/Layouts/SigmoidGainLayout.cs +++ b/grapher/Layouts/SigmoidGainLayout.cs @@ -1,9 +1,4 @@ using grapher.Models.Serialized; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace grapher.Layouts { -- cgit v1.2.3