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("$> "); }
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; }
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; } }
private static void DownloadFileCallback(object sender, AsyncCompletedEventArgs e) { ColorLine.WriteC(" DONE", Green); Console.WriteLine("!"); }