Пример #1
0
        protected override void FillWith(IEnumerable <TPropertyType> listOfValues, IEnumerable <string> listOfDisplayValues)
        {
            unhookEvents();

            _comboBox.SuspendLayout();

            clearComboBox();

            var valueAndDisplays = listOfValues.Select((value, index) => new { Value = value, Display = listOfDisplayValues.ElementAt(index) });

            valueAndDisplays.Each(x => AddItem(x.Value, x.Display));

            _comboBox.ResumeLayout();

            hookEvents();
        }