Ejemplo n.º 1
0
        /// <summary>
        ///
        /// Clean this item.
        ///
        /// </summary>
        public void Dispose()
        {
            if (CleanAll)
            {
                m_StartPosition.Move();
                WordProcessor.ClearAfterCursor();

                Console.CursorVisible = true;
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        ///
        /// This function invoked when `sender` resizes.
        ///
        /// </summary>
        private void OnReceiveResizeEvent(ConsoleUI sender)
        {
            var change     = false;
            var currentPos = new ConsoleVec2(0, 0);

            foreach (var ui in m_UIs)
            {
                if (ui == sender)
                {
                    change     = true;
                    currentPos = m_UIPos[ui];
                    EraseAfter(currentPos);
                }

                if (change)
                {
                    currentPos.Move();
                    m_UIPos[ui] = currentPos;
                    ui.Display();
                    currentPos.Y += ui.Size.Height;
                }
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        ///
        /// Erase all after the cursor position.
        ///
        /// </summary>
        private void EraseAfter(ConsoleVec2 vec2)
        {
            vec2.Move();

            WordProcessor.ClearAfterCursor();
        }