From 498e5c1a2fabed3ba5f1c00768d7050c5738e76e Mon Sep 17 00:00:00 2001 From: Jacob Palecki Date: Fri, 31 Jul 2020 10:46:23 -0700 Subject: Small refactoring, use new struct to store magnitudes --- grapher/OptionXY.cs | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) (limited to 'grapher/OptionXY.cs') 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; } -- cgit v1.2.3