コード例 #1
0
ファイル: MprObjGrd.cs プロジェクト: jalil1408/BiomPSP
        public MprObjGrd(string id_rpt_obj, ObjectSection s)
        {
            ID = null;
            IDReport = id_rpt_obj;
            Name = "Grid" + DateTime.Now.ToLongTimeString();
            Category = ObjectCategory.Grid;
            Section = s;
            Index = 0;
            Printed = true;
            Type = ObjectType.Static;
            RotateAngle = 0;

            Rows = "";
            RowsSQL = "";
            Width = 1000;
            Location = new Point(0, 0);
            RowHeight = 70;
            ColumnHeaderHeight = 90;
            ColumnFooterHeight = 90;
            ColumnHeaderPrinted = true;
            ColumnFooterPrinted = true;
            Columns = new Collection<MprObjGrdCol>();
            TextStyle = new MprStlTxt();
            BoxStyle = new MprStlRect();
        }
コード例 #2
0
ファイル: MprRpt.cs プロジェクト: jalil1408/BiomPSP
        public MprRpt()
        {
            ID = null;
            Name = "Report" + DateTime.Now.ToLongTimeString();
            Description = "";
            Author = "Jalil";
            CreationDate = DateTime.Now;
            ShowPrintDialog = false;
            PaperVirtualBackgroundColor = Color.White;
            PrinterName = UtlGen.GetDefaultPrinterName();
            CopiesToPrint = 1;
            WithAdvOptions = false;
            MarginsType = MPR.Report.Viewer.MarginsType.Custom;
            LandscapePaper = false;
            Layout = ReportLayout.Default;
            RotateAngle = 0;
            TranslatePoint = new Point(0, 0);
            PaperSize = new Size(2100, 2970);
            PaperMargins = new Padding(100, 100, 100, 100);
            PageBoxStyle = new MprStlRect();
            PageHeaderHeight = 150;
            PageHeaderBoxStyle = new MprStlRect();
            PageHeaderFirstPage = false;
            ReportHeaderHeight = 300;
            ReportFooterHeight = 300;
            PageFooterHeight = 150;
            PageFooterBoxStyle = new MprStlRect();
            ReportFooterBoxStyle = new MprStlRect();
            ReportHeaderBoxStyle = new MprStlRect();

            PrintPageBackgroundImage = false;
            PrintVirtualBackgroundImages = false;
            PrintVirtualBoxes = false;
            PageBackgroundImage = null;
        }
コード例 #3
0
ファイル: MprObjRect.cs プロジェクト: jalil1408/BiomPSP
        public MprObjRect(string id_rpt_obj, ObjectSection s)
        {
            ID = null;
            IDReport = id_rpt_obj;
            Name = "Rectangle" + DateTime.Now.ToLongTimeString();
            Category = ObjectCategory.Rectangle;
            Section = s;
            Index = 0;
            Printed = true;
            Type = ObjectType.Static;
            RotateAngle = 0;

            Location = new Point(0, 0);
            Size = new System.Drawing.Size(500, 70);
            Style = new MprStlRect();
        }
コード例 #4
0
ファイル: MprObjImgFld.cs プロジェクト: jalil1408/BiomPSP
        public MprObjImgFld(string id_rpt_obj, ObjectSection s)
        {
            ID = null;
            IDReport = id_rpt_obj;
            Name = "ImageField" + DateTime.Now.ToLongTimeString();
            Category = ObjectCategory.ImageField;
            Section = s;
            Index = 0;
            Printed = true;
            SizeMode = ImageSizeMode.Stretch;
            Type = ObjectType.Static;
            RotateAngle = 0;

            Location = new Point(0, 0);
            Size = new System.Drawing.Size(250, 250);
            Image = null;
            ImageFile = "";
            ImageSQL = "";
            Style = new MprStlRect();
        }
コード例 #5
0
ファイル: MprObjTxtFld.cs プロジェクト: jalil1408/BiomPSP
        public MprObjTxtFld(string id_rpt_obj, ObjectSection s)
        {
            ID = null;
            IDReport = id_rpt_obj;
            Name = "TextField" + DateTime.Now.ToLongTimeString();
            Category = ObjectCategory.TextField;
            Section = s;
            Index = 0;
            Printed = true;
            Type = ObjectType.Static;
            RotateAngle = 0;

            Text = "TextField" + DateTime.Now.ToLongTimeString();
            TextSQL = "";
            Location = new Point(0, 0);
            Size = new System.Drawing.Size(500, 70);
            TextStyle = new MprStlTxt();
            Shape = ObjectShape.Rectangle;
            RectangleStyle = new MprStlRect();
            EllipseStyle = new MprStlEllp();
        }
コード例 #6
0
ファイル: MprObjGrdCol.cs プロジェクト: jalil1408/BiomPSP
        public MprObjGrdCol()
        {
            Category = ColumnCategory.Text;
            RowCellStyle = GridCellStyle.GridStyle;
            WidthType = ColumnWidthType.Constant;
            WidthConstant = 300;
            WidthPercent = 25;

            HeaderCellStyle = GridCellStyle.HeaderStyle;
            HeaderType = ObjectType.Static;
            HeaderText = "Column" + DateTime.Now.ToLongTimeString();
            HeaderTextSQL = "";
            HeaderTextStyle = new MprStlTxt();
            HeaderBoxStyle = new MprStlRect();

            FooterCellStyle = GridCellStyle.FooterStyle;
            FooterType = ObjectType.Static;
            FooterText = "Column" + DateTime.Now.ToLongTimeString();
            FooterTextSQL = "";
            FooterTextStyle = new MprStlTxt();
            FooterBoxStyle = new MprStlRect();
        }
コード例 #7
0
ファイル: Viewer.cs プロジェクト: jalil1408/BiomPSP
 void DrawTxtFld(string txt, int x, int y, int width, int height, MprStlTxt stlTxt, ObjectShape shape, MprStlRect stlRect, MprStlEllp stlEllp)
 {
     if (shape == ObjectShape.Rectangle)
     {
         DrawRect(x, y, width, height, stlRect);
     }
     else
     {
         DrawEllp(x, y, width, height, stlEllp);
     }
     DrawTxt(txt, x, y, width, height, stlTxt);
 }
コード例 #8
0
ファイル: Viewer.cs プロジェクト: jalil1408/BiomPSP
        void DrawRect(int x, int y, int width, int height, MprStlRect style)
        {
            if (style.Printed || (Rpt.PrintVirtualBoxes && printDocument.PrintController.IsPreview))
            {
                SetPEN(style);
                SetBRUSH(style);

                G.FillRectangle(BRUSH, x, y, width, height);

                if ((style.Border & AnchorStyles.Left) > 0)
                {
                    G.DrawLine(PEN, x, y, x, y + height);
                }

                if ((style.Border & AnchorStyles.Right) > 0)
                {
                    G.DrawLine(PEN, x + width, y, x + width, y + height);
                }

                if ((style.Border & AnchorStyles.Top) > 0)
                {
                    G.DrawLine(PEN, x, y, x + width, y);
                }

                if ((style.Border & AnchorStyles.Bottom) > 0)
                {
                    G.DrawLine(PEN, x, y + height, x + width, y + height);
                }
            }
        }
コード例 #9
0
ファイル: Viewer.cs プロジェクト: jalil1408/BiomPSP
 void DrawImgFld(Image img, int x, int y, ImageSizeMode sizeMode, int width, int height, MprStlRect stlBox)
 {
     int tX = x, tY = y, tWidth = width, tHeight = height;
     if (img != null)
     {
         switch (sizeMode)
         {
             case ImageSizeMode.RealSize:
                 tWidth = img.Width;
                 tHeight = img.Height;
                 break;
             case ImageSizeMode.Zoom:
                 float aR = (float)img.Width / (float)img.Height;
                 tWidth = width;
                 tHeight = (int)(tWidth / aR);
                 if (tHeight <= height)
                 {
                     tY += (height - tHeight) / 2;
                 }
                 else
                 {
                     tHeight = height;
                     tWidth = (int)(tHeight * aR);
                     tX += (width - tWidth) / 2;
                 }
                 break;
             default:
                 break;
         }
         DrawImg(img, tX, tY, tWidth, tHeight);
         DrawRect(x, y, width, height, stlBox);
     }
 }
コード例 #10
0
ファイル: Viewer.cs プロジェクト: jalil1408/BiomPSP
 void SetPEN(MprStlRect s)
 {
     SetPEN(s.Pen);
 }
コード例 #11
0
ファイル: Viewer.cs プロジェクト: jalil1408/BiomPSP
 void SetBRUSH(MprStlRect s)
 {
     BRUSH.Color = s.BackGroundColor;
 }