From a3fc2c45ec2a62684e128ffd7cab88bd101ad917 Mon Sep 17 00:00:00 2001 From: MichaelTheShifter Date: Tue, 17 May 2016 15:37:02 -0400 Subject: Committing all I've got Committing everything I've got - so that I can take a break for a few months and work on other things. --- .../FinalMission/ChoiceControl.cs | 50 ++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 source/WindowsFormsApplication1/FinalMission/ChoiceControl.cs (limited to 'source/WindowsFormsApplication1/FinalMission/ChoiceControl.cs') diff --git a/source/WindowsFormsApplication1/FinalMission/ChoiceControl.cs b/source/WindowsFormsApplication1/FinalMission/ChoiceControl.cs new file mode 100644 index 0000000..1230d6b --- /dev/null +++ b/source/WindowsFormsApplication1/FinalMission/ChoiceControl.cs @@ -0,0 +1,50 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Data; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace ShiftOS.FinalMission +{ + [DefaultEvent("Selected")] + public partial class ChoiceControl : UserControl + { + public ChoiceControl() + { + InitializeComponent(); + } + + public int Number + { + get { return Convert.ToInt32(lbnumber.Text); } + set { lbnumber.Text = value.ToString(); } + } + + public string ChoiceName + { + get + { + return lbdescription.Text; + } + set + { + lbdescription.Text = value; + } + } + + public event EventHandler Selected; + + private void lbdescription_Click(object sender, EventArgs e) + { + var h = this.Selected; + if(h != null) + { + h(this, e); + } + } + } +} -- cgit v1.2.3