This repository has been archived on 2024-08-06. You can view files and clone it, but cannot push or open issues or pull requests.
linear-app-launcher/RyzStudio/Windows/ThemedForms/PickerBox/TYesNoPickerBox.cs
2021-07-23 00:45:30 +01:00

18 lines
490 B
C#

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 bool Value { get => (this.ComboBox.SelectedIndex == 1); set =>this.ComboBox.SelectedIndex = (value ? 1 : 0); }
}
}