Exemple #1
0
 public ConsoleWiper(ConsoleSnapshot snapshot)
 {
     this.Console = snapshot.Console;
     this.Top = snapshot.Top;
     this.Left = snapshot.Left;
 }
Exemple #2
0
 public ConsoleWiper(ConsoleSnapshot snapshot)
 {
     this.Console = snapshot.Console;
     this.Top     = snapshot.Top;
     this.Left    = snapshot.Left;
 }
Exemple #3
0
        /// <summary>
        /// Creates and returns a new snapshot that is offset from the current
        /// snapshot
        /// </summary>
        /// <param name="xOffset">the delta from this snapshot's Left value</param>
        /// <param name="yOffset">the delta from this snapshot's Top value</param>
        /// <returns> a new snapshot that is offset from the current snapshot</returns>
        public ConsoleSnapshot CreateOffsetSnapshot(int xOffset, int yOffset)
        {
            var ret = new ConsoleSnapshot(Left + xOffset, Top + yOffset, this.Console);

            return(ret);
        }
        /// <summary>
        /// Renders the entire progress bar
        /// </summary>
        public void Render()
        {
            if(Console.CursorLeft > 0)
            {
                Console.WriteLine();
            }

            topLeft = Console.TakeSnapshot();
            messageStart = topLeft.CreateOffsetSnapshot(2, 1);
            wiper = new ConsoleWiper(topLeft);
            wiper.Bottom = wiper.Top + 2;
            wiper.Wipe();
            DrawBorder();
            Update();
        }
 /// <summary>
 /// Creates and returns a new snapshot that is offset from the current 
 /// snapshot
 /// </summary>
 /// <param name="xOffset">the delta from this snapshot's Left value</param>
 /// <param name="yOffset">the delta from this snapshot's Top value</param>
 /// <returns> a new snapshot that is offset from the current snapshot</returns>
 public ConsoleSnapshot CreateOffsetSnapshot(int xOffset, int yOffset)
 {
     var ret = new ConsoleSnapshot(Left + xOffset, Top + yOffset, this.Console);
     return ret;
 }