public void LoadFile(string[] lines) { // Process first line var firstLine = ParseFirstLine(lines[0]); this.DNAReportOn = firstLine[0]; this.DNAReportIn = firstLine[1]; // Process second line var secondLine = ParseSecondLine(lines[1]); this.NumLOCI = int.Parse(secondLine[0]); this.NumDNAs = int.Parse(secondLine[1]); this.ProjectName = secondLine[2]; this.GenCallVersion = secondLine[3]; this.LowGenCallScoreCutoff = decimal.Parse(secondLine[4]); // Process third line ColumnHeading.Clear(); var items = lines[2].Split(",".ToCharArray()); this.ColumnHeading.AddRange(items); BSON_Heading.Clear(); for (int i = 0; i < ColumnHeading.Count; i++) { BSON_Heading.Add(ColumnHeading[i] .Replace("#", "Num") .Replace(" ", "_") .Replace("/", "_") .Replace("10%", "TenPct") .Replace("50%", "FiftyPct") .Replace("0_1", "ZeroOrOne")); } // Process data lines this.Rows = new List <clsDNAReportDataRow>(); for (int i = 3; i < lines.Count(); i++) { var newRow = new clsDNAReportDataRow(); newRow.Load(lines[i]); this.Rows.Add(newRow); } return; }
public PdfPage CreatePDFPage() { PdfPage p = new PdfPage(); p.Orientation = orientation; p.Size = sizeofpage; PageWidth = p.Height; PageHeight = p.Width; PageHeading.SetFontValue(PageFont.SetFont.MSSANS12B); ColumnHeading.SetFontValue(PageFont.SetFont.MSSANS10B); PageContent.SetFontValue(PageFont.SetFont.MSSANS10); XGraphics gfx = XGraphics.FromPdfPage(p); /** * TODO:: * create border box * add header * add col headers * add content * return **/ return(p); }