//Packet has clone ///// <summary> ///// Clones this GoodbyeReport instance. ///// If reference is true changes in either instance will be reflected in both. ///// </summary> ///// <param name="reference">Indicates if the new instance should reference this instance.</param> ///// <returns>The newly created instance.</returns> //public GoodbyeReport Clone(bool reference) //{ // //Todo, update to includeSourceList etc. // if (reference) return new GoodbyeReport(Header, Payload); // return new GoodbyeReport(Header.Clone(), Prepare().ToArray()); //} #endregion public override void Add(IReportBlock reportBlock) { //Will throw an InvalidCastException is the given reportBlock is not a RFC3550.SourceList if (reportBlock is RFC3550.SourceList) { Add(reportBlock as RFC3550.SourceList); } else { base.Add(reportBlock); } }
public DataGridPrinter(int blockid, IReportBlock reportblock, PrintDocument aPrintDocument, DataTable aTable) { // // TODO: Add constructor logic here // ReportBlock = reportblock; ThePrintDocument = aPrintDocument; TheTable = aTable; BlockID = blockid; PageWidth = ThePrintDocument.DefaultPageSettings.PaperSize.Width; PageHeight = ThePrintDocument.DefaultPageSettings.PaperSize.Height; TopMargin = ThePrintDocument.DefaultPageSettings.Margins.Top; BottomMargin = ThePrintDocument.DefaultPageSettings.Margins.Bottom; }