Example #1
0
        public C1.C1Preview.C1PrintDocument MakeDoc(C1.Win.C1FlexGrid.C1FlexGridPrintInfo printInfo, C1.C1Preview.LongOperationEventHandler longOperation)
        {
            C1.C1Preview.C1PrintDocument doc = new C1.C1Preview.C1PrintDocument();

            C1.C1Preview.RenderText hdrFlex = new C1.C1Preview.RenderText("Header for Flex");
            hdrFlex.Style.FontSize       = 12;
            hdrFlex.Style.FontBold       = true;
            hdrFlex.Style.Spacing.Bottom = "2mm";
            doc.Body.Children.Add(hdrFlex);

            C1.Win.C1FlexGrid.C1FlexGridPrinter pFlex = new C1.Win.C1FlexGrid.C1FlexGridPrinter(_flex);
            pFlex.LongOperation += longOperation;
            pFlex.PrintInfo      = printInfo;
            doc.Body.Children.Add(pFlex.MakeGridTable(doc));

            C1.C1Preview.RenderText hdrFlexTab = new C1.C1Preview.RenderText("Header for FlexTab");
            hdrFlexTab.Style.FontSize       = 12;
            hdrFlexTab.Style.FontBold       = true;
            hdrFlexTab.Style.Spacing.Bottom = "2mm";
            hdrFlexTab.BreakBefore          = C1.C1Preview.BreakEnum.Page;
            doc.Body.Children.Add(hdrFlexTab);

            C1.Win.C1FlexGrid.C1FlexGridPrinter pFlexTab = new C1.Win.C1FlexGrid.C1FlexGridPrinter(_flexXTab);
            pFlexTab.LongOperation += longOperation;
            pFlexTab.PrintInfo      = printInfo;
            doc.Body.Children.Add(pFlexTab.MakeGridTable(doc));

            return(doc);
        }
Example #2
0
        public C1.C1Preview.C1PrintDocument MakeDoc(C1.Win.C1FlexGrid.C1FlexGridPrintInfo printInfo, C1.C1Preview.LongOperationEventHandler longOperation)
        {
            IFlexSample fs = _form as IFlexSample;

            if (fs != null)
            {
                return(fs.MakeDoc(printInfo, longOperation));
            }
            else
            {
                return(null);
            }
        }