Exemplo n.º 1
0
 public ComboBoxHandler(System.Windows.Forms.ComboBox comboBox, DrawMode drawMode = 0)
 {
     Validate.IsNotNull <System.Windows.Forms.ComboBox>(comboBox, "comboBox");
     comboBox.VerifyThreadAccess();
     this.comboBox                       = comboBox;
     this.comboBox.DrawMode              = drawMode;
     this.comboBox.DrawItem             += new DrawItemEventHandler(this.OnComboBoxDrawItem);
     this.comboBox.HandleCreated        += new EventHandler(this.OnComboBoxHandleCreated);
     this.comboBox.MeasureItem          += new MeasureItemEventHandler(this.OnComboBoxMeasureItem);
     this.comboBox.DropDown             += new EventHandler(this.OnComboBoxDropDown);
     this.comboBox.DropDownClosed       += new EventHandler(this.OnComboBoxDropDownClosed);
     this.comboBox.GotFocus             += new EventHandler(this.OnComboBoxGotFocus);
     this.comboBox.SelectedIndexChanged += new EventHandler(this.OnComboBoxSelectedIndexChanged);
 }