28 lines
675 B
C#
28 lines
675 B
C#
|
using RyzStudio.Windows.Forms;
|
|||
|
using System.Windows.Forms;
|
|||
|
|
|||
|
namespace RyzStudio.Windows.ThemedForms
|
|||
|
{
|
|||
|
public class TYesNoPickerBox : TPickerBox
|
|||
|
{
|
|||
|
|
|||
|
public TYesNoPickerBox() : base()
|
|||
|
{
|
|||
|
this.ComboBox.Items.Clear();
|
|||
|
|
|||
|
this.ComboBox.Items.AddRange(new string[] { "No", "Yes" });
|
|||
|
if (this.ComboBox.Items.Count > 0) this.ComboBox.SelectedIndex = 0;
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
public ComboBox InnerControl { get => this.ComboBox; }
|
|||
|
|
|||
|
public bool Value
|
|||
|
{
|
|||
|
get => (ThreadControl.GetValue(this.ComboBox) == 1);
|
|||
|
set => ThreadControl.SetValue(this.ComboBox, (value ? 1 : 0));
|
|||
|
}
|
|||
|
|
|||
|
}
|
|||
|
}
|