public MprObjEllp(string id_rpt_obj, ObjectSection s) { ID = null; IDReport = id_rpt_obj; Name = "Ellipse" + DateTime.Now.ToLongTimeString(); Category = ObjectCategory.Ellipse; 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 MprStlEllp(); }
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(); }
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); }
void DrawEllp(int x, int y, int width, int height, MprStlEllp style) { if (style.Printed || (Rpt.PrintVirtualBoxes && printDocument.PrintController.IsPreview)) { SetPEN(style); SetBRUSH(style); G.FillEllipse(BRUSH, x, y, width, height); if (style.HasBorder) { G.DrawEllipse(PEN, x, y, width, height); } } }
void SetPEN(MprStlEllp s) { SetPEN(s.Pen); }
void SetBRUSH(MprStlEllp s) { BRUSH.Color = s.BackGroundColor; }