コード例 #1
0
ファイル: ConsoleWiper.cs プロジェクト: abbottdev/PowerArgs
 public ConsoleWiper(ConsoleSnapshot snapshot)
 {
     this.Console = snapshot.Console;
     this.Top = snapshot.Top;
     this.Left = snapshot.Left;
 }
コード例 #2
0
 public ConsoleWiper(ConsoleSnapshot snapshot)
 {
     this.Console = snapshot.Console;
     this.Top     = snapshot.Top;
     this.Left    = snapshot.Left;
 }
コード例 #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);
        }
コード例 #4
0
ファイル: CliProgressBar.cs プロジェクト: abbottdev/PowerArgs
        /// <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();
        }
コード例 #5
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;
 }