public static Font GetFont(CPIEnum cpi) { System.Drawing.Font font = new Font(fontname, 12, FontStyle.Regular, GraphicsUnit.Point); switch (cpi) { case CPIEnum.Default: //float em = (1 / pageWidth) * previewWidth; //font = new Font("courier new", em, FontStyle.Regular, GraphicsUnit.Point); //break; case CPIEnum._10cpi: font = new Font(fontname, 12F, FontStyle.Regular, GraphicsUnit.Point); break; case CPIEnum._12cpi: font = new Font(fontname, 10F, FontStyle.Regular, GraphicsUnit.Point); break; case CPIEnum._15cpi: font = new Font(fontname, 8F, FontStyle.Regular, GraphicsUnit.Point); break; case CPIEnum._17cpi: font = new Font(fontname, 7F, FontStyle.Regular, GraphicsUnit.Point); break; case CPIEnum._20cpi: font = new Font(fontname, 6F, FontStyle.Regular, GraphicsUnit.Point); break; } return font; }
internal void Load(ReportReader reader) { Clear(); this.DocumentName = reader.GetName(); this.PageHeight = reader.GetHeight(); this.PageWidth = reader.GetWidth(); this.ShowSummary = reader.ShowSummary(); this.ShowFooter = reader.ShowFooter(); this.ShowHeader = reader.ShowHeader(); this.PaperHeight = reader.GetPaperHeight(); this.PaperWidth = reader.GetPaperWidth(); this._cpi = reader.GetCpi(); _groups.Load(reader.GetGroups()); _bands.Load(reader.GetBands()); foreach (Band band in _bands) { if (band.GroupId > 0) { band.Group = Groups[band.GroupId - 1]; } } foreach (BaseWidget widget in reader.GetWidgets()) { widget.Owner = this; _bands[widget.Row].Add(widget); } }
public static Font GetFont(CPIEnum cpi) { System.Drawing.Font font = new Font(fontname, 12, FontStyle.Regular, GraphicsUnit.Point); switch (cpi) { case CPIEnum.Default: //float em = (1 / pageWidth) * previewWidth; //font = new Font("courier new", em, FontStyle.Regular, GraphicsUnit.Point); //break; case CPIEnum._10cpi: font = new Font(fontname, 12F, FontStyle.Regular, GraphicsUnit.Point); break; case CPIEnum._12cpi: font = new Font(fontname, 10F, FontStyle.Regular, GraphicsUnit.Point); break; case CPIEnum._15cpi: font = new Font(fontname, 8F, FontStyle.Regular, GraphicsUnit.Point); break; case CPIEnum._17cpi: font = new Font(fontname, 7F, FontStyle.Regular, GraphicsUnit.Point); break; case CPIEnum._20cpi: font = new Font(fontname, 6F, FontStyle.Regular, GraphicsUnit.Point); break; } return(font); }
internal ClassicReportDocument(ReportModel model) { _width = model.PageWidth; _height = model.PageHeight; _name = model.DocumentName; _paperwidth = model.PaperWidth; _paperheight = model.PaperHeight; _cpi = model.Cpi; }
public void Clear() { _bands.Clear(); _groups.Clear(); _showsummary = false; _showheader = true; _showfooter = true; _width = 80; _height = 60; _paperwidth = 850; _paperheight = 1100; _cpi = CPIEnum._10cpi; _name = ""; }
Size GetFontSize(CPIEnum cpi) { switch (cpi) { case CPIEnum._10cpi: return(new Size(16, 15.2)); case CPIEnum._12cpi: return(new Size(13.5, 15.2)); case CPIEnum._15cpi: return(new Size(10.8, 15.2)); case CPIEnum._17cpi: return(new Size(9.55, 15.2)); case CPIEnum._20cpi: return(new Size(8.15, 15.2)); } return(new Size(16, 15.2)); }