示例#1
0
 internal void ReadyString()
 {
     ColorLine.WriteC(Environment.UserName, Green);
     ColorLine.WriteC("@", Magenta);
     //Console.Write("M:");
     ColorLine.WriteC(Environment.MachineName, Cyan);
     Console.Write(" Dir: ");
     ColorLine.WriteLineC(CurrentDirectory.FullName, Yellow);
     Console.Write("$> ");
 }
示例#2
0
 public void SincePrintProgress()
 {
     Console.CursorVisible = false;
     Console.Write(" =====> ");
     while (Percent <= stepProgress)
     {
         if (stepProgress == Percent)
         {
             stepProgress = 99;
         }
         // Generate new state
         int width = (int)(Percent / 100 * barLength);
         int fill  = barLength - width;
         //Delete Last String
         string clear = string.Empty.PadRight(LastOutputLength, '\b');
         Console.Write(clear);
         Console.Write((Percent < 10 ? "  " : (Percent >= 10 && Percent < 100) ? " " : "") + "{0:0.0}% [ ", Percent); ColorLine.WriteC(string.Empty.PadLeft(width, '█'), Green); Console.Write("{0} ] - ", string.Empty.PadLeft(fill, ' '));
         LastOutputLength = 5 + "% [ ".Length + barLength + " ] - ".Length;
     }
     ColorLine.WriteC(" DONE", Green); Console.WriteLine('!');
     Console.CursorVisible = true;
 }
示例#3
0
        public void UpdatePrintProgress(double PercentUp)
        {
            Console.CursorVisible = false;
            // Generate new state
            int width = (int)(PercentUp / 100 * barLength);
            int fill  = barLength - width;
            //Delete Last String
            string clear = string.Empty.PadRight(LastOutputLength, '\b');

            Console.Write(clear);
            if (true)
            {
                Console.Write((Percent < 10 ? "  " : (PercentUp >= 10 && PercentUp < 100) ? " " : "") + "{0:0}% [ ", PercentUp); ColorLine.WriteC(string.Empty.PadLeft(width, '█'), Green); Console.Write("{0} ] - ", string.Empty.PadLeft(fill, ' '));
                LastOutputLength = 3 + "% [ ".Length + barLength + " ] - ".Length;
            }
        }
示例#4
0
 private static void DownloadFileCallback(object sender, AsyncCompletedEventArgs e)
 {
     ColorLine.WriteC(" DONE", Green); Console.WriteLine("!");
 }