diff options
| author | Jacob Palecki <[email protected]> | 2020-07-31 10:46:23 -0700 |
|---|---|---|
| committer | Jacob Palecki <[email protected]> | 2020-07-31 10:46:23 -0700 |
| commit | 498e5c1a2fabed3ba5f1c00768d7050c5738e76e (patch) | |
| tree | b1a2aedce76abedf7585689cbf636f8e92d0583d /grapher/OptionXY.cs | |
| parent | Use options instead of fields (diff) | |
| download | rawaccel-498e5c1a2fabed3ba5f1c00768d7050c5738e76e.tar.xz rawaccel-498e5c1a2fabed3ba5f1c00768d7050c5738e76e.zip | |
Small refactoring, use new struct to store magnitudes
Diffstat (limited to 'grapher/OptionXY.cs')
| -rw-r--r-- | grapher/OptionXY.cs | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/grapher/OptionXY.cs b/grapher/OptionXY.cs index c65d1cf..de7fad9 100644 --- a/grapher/OptionXY.cs +++ b/grapher/OptionXY.cs @@ -8,12 +8,43 @@ using System.Windows.Forms; namespace grapher { public class OptionXY - { public OptionXY(FieldXY fields, Label label) + { + public OptionXY(FieldXY fields, Label label) { Fields = fields; Label = label; } + public OptionXY( + TextBox xBox, + TextBox yBox, + CheckBox lockCheckBox, + Form containingForm, + double defaultData, + Label label) + : this(new FieldXY(xBox, yBox, lockCheckBox, containingForm, defaultData), label) + { + } + + public OptionXY( + TextBox xBox, + TextBox yBox, + CheckBox lockCheckBox, + Form containingForm, + double defaultData, + Label label, + string startingName): + this( + xBox, + yBox, + lockCheckBox, + containingForm, + defaultData, + label) + { + SetName(startingName); + } + public FieldXY Fields { get; } public Label Label { get; } |