diff options
| author | Jacob Palecki <[email protected]> | 2020-08-20 12:51:33 -0700 |
|---|---|---|
| committer | Jacob Palecki <[email protected]> | 2020-08-20 12:51:33 -0700 |
| commit | fe17d04e571d180e663c7014e803ce790693f4b1 (patch) | |
| tree | c2e026ab79b73d3e48cc71aebde90b095771587c /grapher/Form1.cs | |
| parent | Add empty active labels for all options (diff) | |
| download | rawaccel-fe17d04e571d180e663c7014e803ce790693f4b1.tar.xz rawaccel-fe17d04e571d180e663c7014e803ce790693f4b1.zip | |
Display active values
Diffstat (limited to 'grapher/Form1.cs')
| -rw-r--r-- | grapher/Form1.cs | 79 |
1 files changed, 70 insertions, 9 deletions
diff --git a/grapher/Form1.cs b/grapher/Form1.cs index 6e08683..01e7b20 100644 --- a/grapher/Form1.cs +++ b/grapher/Form1.cs @@ -10,12 +10,13 @@ using System.Threading.Tasks; using System.Windows.Forms; using System.Runtime.InteropServices; using grapher.Models.Calculations; +using grapher.Models.Options; namespace grapher { public enum accel_mode { - linear=1, classic, natural, logarithmic, sigmoid, power, noaccel + linear=1, classic, natural, logarithmic, sigmoid, power, naturalgain, sigmoidgain, noaccel } [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)] @@ -99,16 +100,76 @@ namespace grapher new CheckBox[] { sensXYLock, weightXYLock, capXYLock }); - var sensitivity = new OptionXY(sensitivityBoxX, sensitivityBoxY, sensXYLock, this, 1, sensitivityLabel, "Sensitivity", accelCharts); - var rotation = new Option(rotationBox, this, 0, rotationLabel, "Rotation"); - var weight = new OptionXY(weightBoxFirst, weightBoxSecond, weightXYLock, this, 1, weightLabel, "Weight", accelCharts); - var cap = new OptionXY(capBoxX, capBoxY, capXYLock, this, 0, capLabel, "Cap", accelCharts); - var offset = new Option(offsetBox, this, 0, offsetLabel, "Offset"); + var sensitivity = new OptionXY( + sensitivityBoxX, + sensitivityBoxY, + sensXYLock, + this, + 1, + sensitivityLabel, + new ActiveValueLabelXY( + new ActiveValueLabel(SensitivityActiveXLabel, ActiveValueTitle), + new ActiveValueLabel(SensitivityActiveYLabel, ActiveValueTitle)), + "Sensitivity", + accelCharts); + + var rotation = new Option( + rotationBox, + this, + 0, + rotationLabel, + new ActiveValueLabel(RotationActiveLabel, ActiveValueTitle), + "Rotation"); + + var weight = new OptionXY( + weightBoxFirst, + weightBoxSecond, + weightXYLock, + this, + 1, + weightLabel, + new ActiveValueLabelXY( + new ActiveValueLabel(WeightActiveXLabel, ActiveValueTitle), + new ActiveValueLabel(WeightActiveYLabel, ActiveValueTitle)), + "Weight", + accelCharts); + + var cap = new OptionXY( + capBoxX, + capBoxY, + capXYLock, + this, + 0, + capLabel, + new ActiveValueLabelXY( + new ActiveValueLabel(CapActiveXLabel, ActiveValueTitle), + new ActiveValueLabel(CapActiveYLabel, ActiveValueTitle)), + "Cap", + accelCharts); + + var offset = new Option( + offsetBox, + this, + 0, + offsetLabel, + new ActiveValueLabel(OffsetActiveLabel, ActiveValueTitle), + "Offset"); // The name and layout of these options is handled by AccelerationOptions object. - var acceleration = new Option(new Field(accelerationBox, this, 0), constantOneLabel); - var limitOrExponent = new Option(new Field(limitBox, this, 2), constantTwoLabel); - var midpoint = new Option(new Field(midpointBox, this, 0), constantThreeLabel); + var acceleration = new Option( + new Field(accelerationBox, this, 0), + constantOneLabel, + new ActiveValueLabel(AccelerationActiveLabel, ActiveValueTitle)); + + var limitOrExponent = new Option( + new Field(limitBox, this, 2), + constantTwoLabel, + new ActiveValueLabel(LimitExpActiveLabel, ActiveValueTitle)); + + var midpoint = new Option( + new Field(midpointBox, this, 0), + constantThreeLabel, + new ActiveValueLabel(MidpointActiveLabel, ActiveValueTitle)); var accelerationOptions = new AccelOptions( accelTypeDrop, |