How to update a Progress bar from different class 
Author Message
 How to update a Progress bar from different class

hai all,
    I have to do a small progress bar display. The
progress bar will be updated from many classes based on
some conditions. I am very new to delegates and when i
went through some discussions, i am really confused. Can
any one please provide me some sample code so that it will
be helpful for me.
Bye
Thank you
S.MadhanMohan


Sun, 22 May 2005 15:14:33 GMT  
 How to update a Progress bar from different class
Hi,

    You don't need to involve delegates. The easisest way is for you is to
add a static class to your solution. If you have only one project, add it
there. If you have multiple projects that might want to use the progress
bar, create a new class library where you put the static class, and have
everyone reference that library. The class could look like:

class Container {

    private static ProgressBar pBar;

    public Container() {
    }

    public ProgressBar ProgBar {
         get { return this.pBar; }
         set { this.pBar = value; }
    }

Quote:
}

class Client {

    public Stuff() {
        Container c = new Container();

        c.ProgBar = this.MyProgressBar;
    }

Quote:
}

class Client2 {

    public Stuff() {
        Container c = new Container();

        c.ProgBar.PerformStep();
        c.ProgBar.PerformStep();
        c.ProgBar.PerformStep();
    }

Quote:
}



Quote:
> hai all,
>     I have to do a small progress bar display. The
> progress bar will be updated from many classes based on
> some conditions. I am very new to delegates and when i
> went through some discussions, i am really confused. Can
> any one please provide me some sample code so that it will
> be helpful for me.
> Bye
> Thank you
> S.MadhanMohan



Sun, 22 May 2005 17:25:00 GMT  
 How to update a Progress bar from different class
hai Tom,
   Ok. I got it. Now i want to do like this. I have a main
task for which i need to run a progressbar when the
program is running.The main task is divided into
subtasks.each subtask should be have a progress bar for
itself. So now i have to run three tasks at a given time.
1)BAckground process ->which will update main and sub
progress bars
2)Main Progress Bar->Main Task(Total Tasks)
3)Sub Progress Bar-> For single task
I am new to .NET programming and can you suggest me how to
do this.
thank you
bye
S.MadhanMohan

Quote:
>-----Original Message-----
>Hi,

>    You don't need to involve delegates. The easisest way
is for you is to
>add a static class to your solution. If you have only one
project, add it
>there. If you have multiple projects that might want to
use the progress
>bar, create a new class library where you put the static
class, and have
>everyone reference that library. The class could look
like:

>class Container {

>    private static ProgressBar pBar;

>    public Container() {
>    }

>    public ProgressBar ProgBar {
>         get { return this.pBar; }
>         set { this.pBar = value; }
>    }
>}

>class Client {

>    public Stuff() {
>        Container c = new Container();

>        c.ProgBar = this.MyProgressBar;
>    }

>}

>class Client2 {

>    public Stuff() {
>        Container c = new Container();

>        c.ProgBar.PerformStep();
>        c.ProgBar.PerformStep();
>        c.ProgBar.PerformStep();
>    }

>}



>> hai all,
>>     I have to do a small progress bar display. The
>> progress bar will be updated from many classes based on
>> some conditions. I am very new to delegates and when i
>> went through some discussions, i am really confused. Can
>> any one please provide me some sample code so that it
will
>> be helpful for me.
>> Bye
>> Thank you
>> S.MadhanMohan

>.



Sun, 22 May 2005 19:00:37 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. update progress bar in a popup dialog

2. update progress bar

3. Help: Update the Progress Bar

4. Help: Updating a Progress Bar

5. Updating modal progress bar

6. Progress bar not showing visual progress

7. Showing file loading/saving progress in progress bar?

8. progress bar on a status bar

9. progress bar on a status bar

10. Progress bar is not showing on status bar

11. Progress Bar in Status Bar Pane

12. Progress bar in status bar

 

 
Powered by phpBB® Forum Software