2021-09-30 21:26:17 +00:00
|
|
|
|
using RyzStudio.Windows.Forms;
|
|
|
|
|
using System.Windows.Forms;
|
|
|
|
|
|
|
|
|
|
namespace RyzStudio.Windows.ThemedForms
|
2021-09-07 11:32:24 +00:00
|
|
|
|
{
|
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|
|
2021-09-30 21:26:17 +00:00
|
|
|
|
|
|
|
|
|
public ComboBox InnerControl { get => this.ComboBox; }
|
|
|
|
|
|
|
|
|
|
public bool Value
|
|
|
|
|
{
|
|
|
|
|
get => (ThreadControl.GetValue(this.ComboBox) == 1);
|
|
|
|
|
set => ThreadControl.SetValue(this.ComboBox, (value ? 1 : 0));
|
|
|
|
|
}
|
2021-09-07 11:32:24 +00:00
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|