public SBGE(GrapherParams cgp, float dxOffset, float dyOffset, bool fWgtAvg) { m_cgp = cgp; m_fWgtAvg = fWgtAvg; Font font = new Font("Tahoma", 8); m_dxOffset = dxOffset; m_dyOffset = dyOffset; }
public SBGE(GrapherParams cgp, Graphics gr, bool fWgtAvg) { m_cgp = cgp; m_fWgtAvg = fWgtAvg; Font font = new Font("Tahoma", 8); m_dxOffset = gr.MeasureString("0000", font).Width; m_dyOffset = gr.MeasureString("0\n0\n0\n0\n", font).Height; }
/* P R I N T G R A P H */ /*---------------------------------------------------------------------------- * %%Function: PrintGraph * %%Qualified: bg.BgGraph.PrintGraph * %%Contact: rlittle * * ----------------------------------------------------------------------------*/ private void PrintGraph(object sender, System.EventArgs e) { PrintDocument ppd = new PrintDocument(); PrintDialog dlgPrint = new PrintDialog(); if (m_pgSettings != null) { ppd.DefaultPageSettings = m_pgSettings; } else { ppd.DefaultPageSettings.Landscape = m_gp.fLandscape; ppd.DefaultPageSettings.Margins = new Margins(25, 25, 25, 25); } if (m_prtSettings != null) { ppd.PrinterSettings = m_prtSettings; } ppd.PrintPage += new PrintPageEventHandler(PrintPageHandler); dlgPrint.Document = ppd; dlgPrint.ShowDialog(); m_prtSettings = ppd.PrinterSettings; m_pgSettings = ppd.DefaultPageSettings; dttmCurPage = ((GraphicBox)m_picbUpper.Tag).GetFirstDateTime(); gpPrint = m_gp; #if DEBUG DateTime dttmOld = dttmCurPage; ((GraphicBox)m_picbUpper.Tag).SetFirstDateTime(dttmCurPage); dttmCurPage = ((GraphicBox)m_picbUpper.Tag).GetFirstDateTime(); if (DateTime.Compare(dttmOld, dttmCurPage) != 0) { throw new Exception("SetFirstDateTime identity failed!"); } #endif if (m_bvLower == BoxView.Log) { dttmCurPage = ((GraphicBox)m_picbLower.Tag).GetFirstDateTime(); } ppd.Print(); }
/* S E T P R O P S */ /*---------------------------------------------------------------------------- * %%Function: SetProps * %%Qualified: bg.Reporter.SetProps * %%Contact: rlittle * * ----------------------------------------------------------------------------*/ public void SetProps(GrapherParams cgp) { m_cgp = cgp; }
public void AutosizeGraph(BoxView bvUpper, BoxView bvLower, GraphicBox gbUpper, GraphicBox gbLower, ref GrapherParams gp) { int nDays; if (bvUpper == BoxView.Log) { // get the number of lines expected in this item nDays = gbUpper.GetDaysPerPage(); if (bvLower == BoxView.Graph) { gbLower.SetDaysPerPage(nDays); gp.nHalfDays = nDays * 2; } } else if (bvLower == BoxView.Log) { // get the number of lines expected in this item nDays = gbLower.GetDaysPerPage(); if (bvUpper == BoxView.Graph) { gbUpper.SetDaysPerPage(nDays); gp.nHalfDays = nDays * 2; } } }
public void SetProps(GrapherParams gp) { m_gp = gp; }
/* S E T P R O P S */ /*---------------------------------------------------------------------------- * %%Function: SetProps * %%Qualified: bg.Grapher.SetProps * %%Contact: rlittle * * GraphicBox interface * ----------------------------------------------------------------------------*/ public void SetProps(GrapherParams cgp) { m_cgp = cgp; m_sbge.SetProps(cgp); m_sbgeAvg.SetProps(cgp); }