void getRows(ref FlowRowElement parentElement, IHaveChild block) { FlowRow currentRow = new FlowRow(); foreach (PrintElementBase current in block.Childs) { FlowRowElement currentRowElement = new FlowRowElement(current); if (current is LineBreak) { parentElement.ChildsRows.Add(currentRow); currentRow = new FlowRow(); currentRow.Elements.Add(currentRowElement); parentElement.ChildsRows.Add(currentRow); currentRow = new FlowRow(); } else { currentRow.Elements.Add(currentRowElement); if (current is IHaveChild) { getRows(ref currentRowElement, (IHaveChild)current); } } } }
private IList <FlowRow> GetRows() { FlowRowElement fakeElement = new FlowRowElement(null); getRows(ref fakeElement, (IHaveChild)this.printableDocument); return(fakeElement.ChildsRows); }
void getRows(ref FlowRowElement parentElement, IHaveChild block) { FlowRow currentRow = new FlowRow(); foreach (PrintElementBase current in block.Childs) { FlowRowElement currentRowElement = new FlowRowElement(current); if (current is LineBreak) { parentElement.ChildsRows.Add(currentRow); currentRow = new FlowRow(); currentRow.Elements.Add(currentRowElement); parentElement.ChildsRows.Add(currentRow); currentRow = new FlowRow(); } else { currentRow.Elements.Add(currentRowElement); if (current is IHaveChild) { getRows(ref currentRowElement, (IHaveChild)current); } } } }
private IList<FlowRow> GetRows() { FlowRowElement fakeElement = new FlowRowElement(null); getRows(ref fakeElement, (IHaveChild)this.printableDocument); return fakeElement.ChildsRows; }