Ejemplo n.º 1
0
        /// <summary>
        /// Saves or restores the cursor.
        /// </summary>
        /// <param name="cursorRow">When <paramref name="save"/> is true: the cursor row to save; else it is set to the restored cursor row.</param>
        /// <param name="cursorColumn">When <paramref name="save"/> is true: the cursor column to save; else it is set to the restored cursor row.</param>
        /// <param name="save">A value indicating whether to save the cursor (true), or restore it (false).</param>
        private void SaveOrRestoreCursor(ref int cursorRow, ref int cursorColumn, bool save)
        {
            if (save)
            {
                this.savedCursor = new SavedCursor(cursorRow, cursorColumn, this.currentFormat);
            }
            else
            {
                if (this.savedCursor == null)
                {
                    return;
                }

                cursorRow          = this.savedCursor.CursorRow;
                cursorColumn       = this.savedCursor.CursorColumn;
                this.currentFormat = this.savedCursor.Format.Clone();
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Saves or restores the cursor.
        /// </summary>
        /// <param name="cursorRow">When <paramref name="save"/> is true: the cursor row to save; else it is set to the restored cursor row.</param>
        /// <param name="cursorColumn">When <paramref name="save"/> is true: the cursor column to save; else it is set to the restored cursor row.</param>
        /// <param name="save">A value indicating whether to save the cursor (true), or restore it (false).</param>
        private void SaveOrRestoreCursor(ref int cursorRow, ref int cursorColumn, bool save)
        {
            if (save)
            {
                this.savedCursor = new SavedCursor(cursorRow, cursorColumn, this.currentFormat);
            }
            else
            {
                if (this.savedCursor == null)
                {
                    return;
                }

                cursorRow = this.savedCursor.CursorRow;
                cursorColumn = this.savedCursor.CursorColumn;
                this.currentFormat = this.savedCursor.Format.Clone();
            }
        }