Text only progress bar

  • Thread starter Thread starter Tamir Khason
  • Start date Start date
T

Tamir Khason

Someone ever did textmode progress bar (as like as it in Unix enviroment,
e.g. WGet ?)
Please advice if it possible at all to build it. Is it possible to clear
previouse string that sent to output command window? Etc.
TNX
 
Hi,


What is wrong with Console.Write ?

It's a while since I used Unix the last time, but IIRC it was just a set of
characters being written and only when the file was downloaded it change to
another line and start downloading the next.

You could create a similar control very easily, just use a timer or an
event.

What is what you want to do exactly?

cheers,
 
You are right, but I do not want to make a lot of string. I want to be able
to "override" string
Eg instead of:
[* ]
[** ]
[*** ]

I want only one line with * fillin with time
 
Tamir Khason said:
You are right, but I do not want to make a lot of string. I want to be able
to "override" string
Eg instead of:
[* ]
[** ]
[*** ]

I want only one line with * fillin with time

Use Write() instead of WriteLine().

static void Main(string[] args)
{
for(int i=0; i<5; i++)
{
Console.Write("*");
Thread.Sleep(2000);
}
}
 
Tnx, good idea, unfourchantly /b does not work for some reason...


Steve Walker said:
Tamir Khason said:
You are right, but I do not want to make a lot of string. I want to be
able
to "override" string
Eg instead of:
[* ]
[** ]
[*** ]

I want only one line with * fillin with time

Use Write() instead of WriteLine().

static void Main(string[] args)
{
for(int i=0; i<5; i++)
{
Console.Write("*");
Thread.Sleep(2000);
}
}
 
Hi,

Use Write , now the thing is to know when the file is downloaded, you
cannot use something as provided by Steve cause it does not allow to do the
real thing.

you will need to use a working thread to do the download while in the other
thread you are displaying the chars , you can use a timer for this.
when the file download complete then you stop the timer, update the UI and
restart the timer.

cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

Steve Walker said:
Tamir Khason said:
You are right, but I do not want to make a lot of string. I want to be
able
to "override" string
Eg instead of:
[* ]
[** ]
[*** ]

I want only one line with * fillin with time

Use Write() instead of WriteLine().

static void Main(string[] args)
{
for(int i=0; i<5; i++)
{
Console.Write("*");
Thread.Sleep(2000);
}
}
 
Back
Top