using System; using System.Windows.Forms; namespace PaintDotNet { public sealed class UnitsComboBoxStrip : ToolStripComboBox, IUnitsComboBox { private UnitsComboBoxHandler comboBoxHandler; public UnitsComboBoxStrip() { this.comboBoxHandler = new UnitsComboBoxHandler(this.ComboBox); } public UnitsDisplayType UnitsDisplayType { get { return this.comboBoxHandler.UnitsDisplayType; } set { this.comboBoxHandler.UnitsDisplayType = value; } } public bool LowercaseStrings { get { return this.comboBoxHandler.LowercaseStrings; } set { this.comboBoxHandler.LowercaseStrings = value; } } public MeasurementUnit Units { get { return this.comboBoxHandler.Units; } set { this.comboBoxHandler.Units = value; } } public string UnitsText { get { return this.comboBoxHandler.UnitsText; } } public bool PixelsAvailable { get { return this.comboBoxHandler.PixelsAvailable; } set { this.comboBoxHandler.PixelsAvailable = value; } } public bool InchesAvailable { get { return this.comboBoxHandler.InchesAvailable; } } public bool MilsAvailable { get { return this.comboBoxHandler.MilsAvailable; } } public bool CentimetersAvailable { get { return this.comboBoxHandler.CentimetersAvailable; } } public void RemoveUnit(MeasurementUnit removeMe) { this.comboBoxHandler.AddUnit(removeMe); } public void AddUnit(MeasurementUnit addMe) { this.comboBoxHandler.AddUnit(addMe); } public event EventHandler UnitsChanged { add { this.comboBoxHandler.UnitsChanged += value; } remove { this.comboBoxHandler.UnitsChanged -= value; } } } }