Esempio n. 1
0
        /// <summary>
        ///
        /// Tallies up the number of BufferCells vertically that will be required to show all the ProgressNodes in the given
        /// list, and all of their children.
        ///
        /// </summary>
        /// <param name="maxHeight">
        ///
        /// The maximum height (in BufferCells) that the rendering may consume.
        ///
        /// </param>
        /// <param name="rawUi">
        ///
        /// The PSHostRawUserInterface used to gauge string widths in the rendering.
        ///
        /// </param>
        /// <returns>
        ///
        /// The vertical height (in BufferCells) that will be required to show all of the nodes in the given list.
        ///
        /// </returns>
        /// <param name="maxWidth">
        ///
        ///
        ///
        /// </param>

        private int TallyHeight(PSHostRawUserInterface rawUi, int maxHeight, int maxWidth)
        {
            HeightTallyer ht = new HeightTallyer(rawUi, maxHeight, maxWidth);

            NodeVisitor.VisitNodes(_topLevelNodes, ht);
            return(ht.Tally);
        }
Esempio n. 2
0
        /// <summary>
        /// 
        /// Tallies up the number of BufferCells vertically that will be required to show all the ProgressNodes in the given 
        /// list, and all of their children.
        /// 
        /// </summary>
        /// <param name="maxHeight">
        /// 
        /// The maximum height (in BufferCells) that the rendering may consume.
        /// 
        /// </param>
        /// <param name="rawUi">
        /// 
        /// The PSHostRawUserInterface used to gauge string widths in the rendering.
        /// 
        /// </param>
        /// <returns>
        /// 
        /// The vertical height (in BufferCells) that will be required to show all of the nodes in the given list.
        /// 
        /// </returns>
        /// <param name="maxWidth">
        /// 
        /// 
        /// 
        /// </param>

        private int TallyHeight(PSHostRawUserInterface rawUi, int maxHeight, int maxWidth)
        {
            HeightTallyer ht = new HeightTallyer(rawUi, maxHeight, maxWidth);
            NodeVisitor.VisitNodes(_topLevelNodes, ht);
            return ht.Tally;
        }