protected virtual void Control_Paint(object sender, PaintEventArgs e) { //System.Console.WriteLine("sender:" + sender.GetType().ToString()); if (sender.GetType().Equals(typeof(DevExpress.XtraEditors.TextEdit))) { BorderManage.DrawBorder(e.Graphics, e.ClipRectangle, BORDER_TYPE.TEXTEDIT_BORDER); } }
protected virtual void Control_Paint(object sender, PaintEventArgs e) { //System.Console.WriteLine("sender:" + sender.GetType().ToString()); Graphics gr = e.Graphics; //这是输入框 if (sender.GetType().Equals(typeof(TextEdit))) { BorderManage.DrawBorder(e.Graphics, e.ClipRectangle, BORDER_TYPE.TEXTEDIT_BORDER); } //这是下拉菜单 else if (sender.GetType().Equals(typeof(ComboBoxEdit))) { Rectangle rect = (sender as ComboBoxEdit).ClientRectangle; ControlPaint.DrawBorder(e.Graphics, rect, ControlColor.EDITBOX_BORDCOLOR, ButtonBorderStyle.Solid); } //这是搜索框 else if (sender.GetType().Equals(typeof(ButtonEdit)) && !sender.GetType().Equals(typeof(SimpleButton))) { Rectangle rect = (sender as ButtonEdit).ClientRectangle; ControlPaint.DrawBorder(e.Graphics, rect, ControlColor.EDITBOX_BORDCOLOR, ButtonBorderStyle.Solid); } }
private void ControlPaint(object sender, PaintEventArgs e) { BorderManage.DrawBorder(e.Graphics, this.simpleButton1.ClientRectangle, BORDER_TYPE.BUTTON_BORDER); }