Пример #1
0
        public static void SetProperties(ref FormPrinting fp, PageSettings ps)
        {
            fp.TextBoxBoxed = false;
            fp.TabControlBoxed = false;
            fp.LabelInBold = true;
            fp.PrintPreview = true;
            fp.DisabledControlsInGray = true;
            fp.PageNumbering = true;
            fp.TopMargin = 50;

            if(ps==null)
            {
                fp.Orientation = FormPrinting.OrientationENum.Automatic;
                fp.Orientation = FormPrinting.OrientationENum.Portrait;
                fp.DelegatePrintingReportTitle = null;
                //fp.ps=null;
            }
            else
            {
                fp.TextBoxBoxed = false;
                fp.TabControlBoxed = false;
                fp.LabelInBold = true;
                fp.PrintPreview = true;
                fp.DisabledControlsInGray = true;
                fp.PageNumbering = true;

                if(ps.Landscape)
                {
                    fp.Orientation = FormPrinting.OrientationENum.Lanscape;
                }
                else
                {
                    fp.Orientation = FormPrinting.OrientationENum.Portrait;
                }

                //fp.ps = ps;
            }
        }
Пример #2
0
 private void CreateFormPrintingObject(System.Windows.Forms.Control c)
 {
     fp = new FormPrinting(c);
     xfp = new clsDevExpressFormPrinting(c,printingSystem1);
 }