Esempio n. 1
0
        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();
        }
Esempio n. 2
0
        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;
        }
Esempio n. 3
0
        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();
        }
Esempio n. 4
0
        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();
        }
Esempio n. 5
0
        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();
        }
Esempio n. 6
0
        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();
        }
Esempio n. 7
0
 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);
 }
Esempio n. 8
0
        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);
                }
            }
        }
Esempio n. 9
0
 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);
     }
 }
Esempio n. 10
0
 void SetPEN(MprStlRect s)
 {
     SetPEN(s.Pen);
 }
Esempio n. 11
0
 void SetBRUSH(MprStlRect s)
 {
     BRUSH.Color = s.BackGroundColor;
 }