コード例 #1
0
        public SidesEditorControl(IWindowsFormsEditorService iedSvc, DevExpress.XtraPrinting.BorderSide ivalue)
        {
            this._sides = ivalue;
            InitializeComponent();
            this.edSvc = iedSvc;

            this.picpreview.Invalidate();
        }
コード例 #2
0
 private void AlterSideStyle(BorderSide bSide)
 {
     if ((_sides & bSide) == bSide)
     {
         this._sides &= (~bSide);
     }
     else
     {
         this._sides |= bSide;
     }
 }
コード例 #3
0
        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);
        }
コード例 #4
0
 private void btnall_Click(object sender, System.EventArgs e)
 {
     this._sides = BorderSide.All;;
     this.picpreview.Invalidate();
 }