public SidesEditorControl(IWindowsFormsEditorService iedSvc, DevExpress.XtraPrinting.BorderSide ivalue) { this._sides = ivalue; InitializeComponent(); this.edSvc = iedSvc; this.picpreview.Invalidate(); }
private void AlterSideStyle(BorderSide bSide) { if ((_sides & bSide) == bSide) { this._sides &= (~bSide); } else { this._sides |= bSide; } }
public override object EditValue(System.ComponentModel.ITypeDescriptorContext context, System.IServiceProvider provider, object value) { // if(value is Int32) // { // if ((int)value<=(1+2+4+8)&&(int)value>=0) // return (DevExpress.XtraPrinting.BorderSide)value; // } if (!(value is DevExpress.XtraPrinting.BorderSide)) { return(value); } edSvc = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService)); DevExpress.XtraPrinting.BorderSide ivalue = (DevExpress.XtraPrinting.BorderSide)value; SidesEditorControl sidescontrol = new SidesEditorControl(edSvc, ivalue); if (edSvc != null) { edSvc.DropDownControl(sidescontrol); edSvc.CloseDropDown(); return(sidescontrol._sides); } return(value); }
private void btnall_Click(object sender, System.EventArgs e) { this._sides = BorderSide.All;; this.picpreview.Invalidate(); }