'c# Console application blinking text message untill specific process complete
I have following c# .net 2.0 code i want to show a big ASCII text Installing... Want to show in Red And Green colors using 5 seconds delay. Just want to stop message after P1 process exited how to do this?
public static void Main(string[] args)
{
Process p1 = new Process();
p1.StartInfo.UseShellExecute = true;
p1.StartInfo.FileName = fullName;
p1.Start();
{
string textToEnter = @" Installing... ";
using (StringReader reader = new StringReader(textToEnter))
{
foreach (ConsoleColor c in Enum.GetValues(typeof(ConsoleColor)))
{
Console.ForegroundColor = c;
Console.WriteLine(textToEnter2);
Thread.Sleep(1000); // 1 sec. deley
Console.Clear();
}
}
}
p1.WaitForExit();
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
