From 85aefb4ba131521595e48fe1a25f4db9a69e71e6 Mon Sep 17 00:00:00 2001 From: a1xd <68629610+a1xd@users.noreply.github.com> Date: Sun, 27 Sep 2020 23:04:29 -0400 Subject: add arg checks in wrapper minor changes to settings shape, requires driver reinstall add error handling to writer grapher changes: add prettier serialization + comments add elements for scale and separated limit/exp reset irrelevant (invisible) arg input before checks/write --- grapher/Models/AccelGUIFactory.cs | 64 +++++++++++++++++++++++++++++++-------- 1 file changed, 52 insertions(+), 12 deletions(-) (limited to 'grapher/Models/AccelGUIFactory.cs') diff --git a/grapher/Models/AccelGUIFactory.cs b/grapher/Models/AccelGUIFactory.cs index 469fcf7..9f557f3 100644 --- a/grapher/Models/AccelGUIFactory.cs +++ b/grapher/Models/AccelGUIFactory.cs @@ -46,8 +46,12 @@ namespace grapher.Models TextBox offsetBoxY, TextBox accelerationBoxX, TextBox accelerationBoxY, + TextBox scaleBoxX, + TextBox scaleBoxY, TextBox limitBoxX, TextBox limitBoxY, + TextBox expBoxX, + TextBox expBoxY, TextBox midpointBoxX, TextBox midpointBoxY, CheckBox sensXYLock, @@ -63,8 +67,12 @@ namespace grapher.Models Label offsetLabelY, Label constantOneLabelX, Label constantOneLabelY, - Label constantTwoLabelX, - Label constantTwoLabelY, + Label scaleLabelX, + Label scaleLabelY, + Label limitLabelX, + Label limitLabelY, + Label expLabelX, + Label expLabelY, Label constantThreeLabelX, Label constantThreeLabelY, Label activeValueTitleX, @@ -80,8 +88,12 @@ namespace grapher.Models Label offsetActiveLabelY, Label accelerationActiveLabelX, Label accelerationActiveLabelY, - Label limitExpActiveLabelX, - Label limitExpActiveLabelY, + Label scaleActiveLabelX, + Label scaleActiveLabelY, + Label limitActiveLabelX, + Label limitActiveLabelY, + Label expActiveLabelX, + Label expActiveLabelY, Label midpointActiveLabelX, Label midpointActiveLabelY, Label accelTypeActiveLabelX, @@ -203,16 +215,40 @@ namespace grapher.Models new ActiveValueLabel(accelerationActiveLabelY, activeValueTitleY), optionSetYLeft); - var limitOrExponentX = new Option( + var scaleX = new Option( + new Field(scaleBoxX, form, 0), + scaleLabelX, + new ActiveValueLabel(scaleActiveLabelX, activeValueTitleX), + 0); + + var scaleY = new Option( + new Field(scaleBoxY, form, 0), + scaleLabelY, + new ActiveValueLabel(scaleActiveLabelY, activeValueTitleY), + optionSetYLeft); + + var limitX = new Option( new Field(limitBoxX, form, 2), - constantTwoLabelX, - new ActiveValueLabel(limitExpActiveLabelX, activeValueTitleX), + limitLabelX, + new ActiveValueLabel(limitActiveLabelX, activeValueTitleX), 0); - var limitOrExponentY = new Option( + var limitY = new Option( new Field(limitBoxY, form, 2), - constantTwoLabelY, - new ActiveValueLabel(limitExpActiveLabelY, activeValueTitleY), + limitLabelY, + new ActiveValueLabel(limitActiveLabelY, activeValueTitleY), + optionSetYLeft); + + var exponentX = new Option( + new Field(expBoxX, form, 2), + expLabelX, + new ActiveValueLabel(expActiveLabelX, activeValueTitleX), + 0); + + var exponentY = new Option( + new Field(expBoxY, form, 2), + expLabelY, + new ActiveValueLabel(expActiveLabelY, activeValueTitleY), optionSetYLeft); var midpointX = new Option( @@ -240,10 +276,12 @@ namespace grapher.Models var accelerationOptionsX = new AccelTypeOptions( accelTypeDropX, accelerationX, + scaleX, capOptionsX, weightX, offsetOptionsX, - limitOrExponentX, + limitX, + exponentX, midpointX, writeButton, new ActiveValueLabel(accelTypeActiveLabelX, activeValueTitleX)); @@ -251,10 +289,12 @@ namespace grapher.Models var accelerationOptionsY = new AccelTypeOptions( accelTypeDropY, accelerationY, + scaleY, capOptionsY, weightY, offsetOptionsY, - limitOrExponentY, + limitY, + exponentY, midpointY, writeButton, new ActiveValueLabel(accelTypeActiveLabelY, activeValueTitleY)); -- cgit v1.2.3