コード例 #1
0
        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);
                    }
                }
            }
        }
コード例 #2
0
        private IList <FlowRow> GetRows()
        {
            FlowRowElement fakeElement = new FlowRowElement(null);

            getRows(ref fakeElement, (IHaveChild)this.printableDocument);

            return(fakeElement.ChildsRows);
        }
コード例 #3
0
        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);
                    }
                }
            }
        }
コード例 #4
0
        private IList<FlowRow> GetRows()
        {
            FlowRowElement fakeElement = new FlowRowElement(null);

            getRows(ref fakeElement, (IHaveChild)this.printableDocument);

            return fakeElement.ChildsRows;
        }