34 lines
721 B
C#
34 lines
721 B
C#
using LibW4M.Data;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace W4Gui.Components
|
|
{
|
|
public class YesNoComboBox : ComboBox
|
|
{
|
|
public YesNoComboBox()
|
|
{
|
|
this.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
|
this.FormattingEnabled = true;
|
|
this.Items.AddRange(new object[] {
|
|
"No",
|
|
"Yes"});
|
|
}
|
|
|
|
public YesNo Value
|
|
{
|
|
get
|
|
{
|
|
return (YesNo)this.SelectedIndex;
|
|
}
|
|
set
|
|
{
|
|
this.SelectedIndex = (int)value;
|
|
}
|
|
}
|
|
}
|
|
}
|