diff options
Diffstat (limited to 'grapher/OptionXY.cs')
| -rw-r--r-- | grapher/OptionXY.cs | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/grapher/OptionXY.cs b/grapher/OptionXY.cs new file mode 100644 index 0000000..c65d1cf --- /dev/null +++ b/grapher/OptionXY.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace grapher +{ + public class OptionXY + { public OptionXY(FieldXY fields, Label label) + { + Fields = fields; + Label = label; + } + + public FieldXY Fields { get; } + + public Label Label { get; } + + public void SetName(string name) + { + Label.Text = name; + Label.Left = Convert.ToInt32((Fields.XField.Box.Left / 2.0) - (Label.Width / 2.0)); + } + + public void Hide() + { + Fields.XField.Box.Hide(); + Fields.YField.Box.Hide(); + Label.Hide(); + } + + public void Show() + { + Fields.XField.Box.Show(); + Fields.YField.Box.Show(); + Label.Show(); + } + + public void Show(string name) + { + SetName(name); + + Fields.XField.Box.Show(); + Fields.YField.Box.Show(); + Label.Show(); + } + + } +} |