2016-05-17 15:37:02 -04:00
|
|
|
|
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;
|
2016-07-19 21:53:26 -04:00
|
|
|
|
using ShiftUI;
|
2016-05-17 15:37:02 -04:00
|
|
|
|
|
|
|
|
|
namespace ShiftOS.FinalMission
|
|
|
|
|
{
|
|
|
|
|
[DefaultEvent("Selected")]
|
2016-07-19 21:53:26 -04:00
|
|
|
|
public partial class ChoiceWidget : UserWidget
|
2016-05-17 15:37:02 -04:00
|
|
|
|
{
|
2016-07-19 21:53:26 -04:00
|
|
|
|
public ChoiceWidget()
|
2016-05-17 15:37:02 -04:00
|
|
|
|
{
|
|
|
|
|
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);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|