diff options
| author | JacobPalecki <[email protected]> | 2020-09-08 16:00:05 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-09-08 16:00:05 -0700 |
| commit | e5461fa84e65d78823d0022339fa2d8864f7e63c (patch) | |
| tree | b486ef524c93bfeb29a86403114b6805bf9decf1 /grapher/Constants/Constants.cs | |
| parent | Merge pull request #19 from JacobPalecki/gainOffset (diff) | |
| parent | Save show last mouse value (diff) | |
| download | rawaccel-e5461fa84e65d78823d0022339fa2d8864f7e63c.tar.xz rawaccel-e5461fa84e65d78823d0022339fa2d8864f7e63c.zip | |
Merge pull request #20 from JacobPalecki/GUI
GUI: Add By Component & Anisotropy; Remove Logarithm and Sigmoid; Delete Console; Some Refactoring
Diffstat (limited to 'grapher/Constants/Constants.cs')
| -rw-r--r-- | grapher/Constants/Constants.cs | 104 |
1 files changed, 104 insertions, 0 deletions
diff --git a/grapher/Constants/Constants.cs b/grapher/Constants/Constants.cs new file mode 100644 index 0000000..aaf8bb9 --- /dev/null +++ b/grapher/Constants/Constants.cs @@ -0,0 +1,104 @@ +using System.Drawing; + +namespace grapher +{ + public static class Constants + { + #region Constants + + /// <summary> DPI by which charts are scaled if none is set by user. </summary> + public const int DefaultDPI = 1200; + + /// <summary> Poll rate by which charts are scaled if none is set by user. </summary> + public const int DefaultPollRate = 1000; + + /// <summary> Resolution of chart calulation. </summary> + public const int Resolution = 100; + + /// <summary> Multiplied by DPI over poll rate to find rough max expected velocity. </summary> + public const double MaxMultiplier = 85; + + /// <summary> Ratio of max (X, Y) used in "by component" calulations to those used in "whole vector" calculations. </summary> + public const double XYToCombinedRatio = 1.4; + + /// <summary> Possible options to display in a layout. </summary> + public const int PossibleOptionsCount = 6; + + /// <summary> Separation between X and Y active value labels, in pixels. </summary> + public const int ActiveLabelXYSeparation = 2; + + /// <summary> Vertical separation between charts, in pixels. </summary> + public const int ChartSeparationVertical = 10; + + /// <summary> Needed to show full contents in form. Unsure why. </summary> + public const int FormHeightPadding = 35; + + /// <summary> Horizontal separation between charts, in pixels. </summary> + public const int ChartSeparationHorizontal = 10; + + /// <summary> Default horizontal separation between x and y fields, in pixels. </summary> + public const int DefaultFieldSeparation = 4; + + /// <summary> Default horizontal separation between an option's label and box, in pixels. </summary> + public const int OptionLabelBoxSeperation = 10; + + /// <summary> Default horizontal separation between an option's label and box, in pixels. </summary> + public const int OptionVerticalSeperation = 4; + + /// <summary> Horizontal separation between left side of single dropdown and left side of labels beneath dropdown </summary> + public const int DropDownLeftSeparation = 10; + + /// <summary> Width of charts when widened </summary> + public const int WideChartWidth = 723; + + /// <summary> Left placement of charts when widened </summary> + public const int WideChartLeft = 333; + + /// <summary> Width of charts when narrowed </summary> + public const int NarrowChartWidth = 698; + + /// <summary> Left placement of charts when narrowed </summary> + public const int NarrowChartLeft = 482; + + public const int WriteButtonVerticalOffset = 50; + + /// <summary> Format string for shortened x and y textboxes. </summary> + public const string ShortenedFormatString = "0.###"; + + /// <summary> Format string for default active value labels. </summary> + public const string DefaultActiveValueFormatString = "0.######"; + + /// <summary> Format string for default textboxes. </summary> + public const string DefaultFieldFormatString = "0.#########"; + + /// <summary> Format string for shortened x and y fields. </summary> + public const string ShortenedFieldFormatString = "0.###"; + + /// <summary> Format string for gain cap active value label. </summary> + public const string GainCapFormatString = "0.##"; + + /// <summary> Format string for shortened x and y dropdowns. </summary> + public const string AccelDropDownDefaultFullText = "Acceleration Type"; + + /// <summary> Format string for default dropdowns. </summary> + public const string AccelDropDownDefaultShortText = "Accel Type"; + + /// <summary> Default text to be displayed on write button. </summary> + public const string WriteButtonDefaultText = "Write To Driver"; + + /// <summary> Default text to be displayed on write button. </summary> + public const string WriteButtonDelayText = "Delay"; + + /// <summary> Default name of settings file. </summary> + public const string DefaultSettingsFileName = @"settings.json"; + + #endregion Constants + + #region ReadOnly + + /// <summary> Color of font in active value labels. </summary> + public static readonly Color ActiveValueFontColor = Color.FromArgb(255, 65, 65, 65); + + #endregion ReadOnly + } +} |