1. processbar example
Public Partial Class Dlgprogressbar: devexpress. xtraeditors. xtraform
{
Public Dlgprogressbar ( Int Barmaxvalue, Int Barminvalue)
{
Initializecomponent ();
// Set a minimum value
Progressbarcontrol1.properties. Minimum = barmaxvalue;
// Set a maximum value
Progressbarcontrol1.properties. Maximum = barminvalue;
// Set the step size, that is, the number of increments each time.
Progressbarcontrol1.properties. Step = 1 ;
// Progressbarcontrol1.properties. progressviewstyle = devexpress. xtraeditors. Controls. progressviewstyle. Solid;
Progressbarcontrol1.position = 0 ;
}
Public Void Setbarvalue ( String Msgstring, Int Barvalue)
{
For ( Int I = 0 ; I <barvalue; I ++)
{
Application. doevents ();
Progressbarcontrol1.20.mstep ();
This . Lblmsg. Text = msgstring + " ... " ;
System. Threading. thread. Sleep ( 15 );
}< br> If (barvalue = 0 )
{
Application. doevents ();
This. Lblmsg. Text = msgstring +"...";
System. Threading. thread. Sleep (15);
}
}
}
2. repositoryitemprogressbar
Private Void Showmsg (devexpress. xtrabars. baredititem item, String Msgstring)
{
If ( This . Invokerequired = True )
{
This . Invoke (methodinvoker) Delegate {Item. editvalue = msgstring ;});
}
Else
{
Item. Caption = msgstring;
}
} Start to call int processcurrent = 0; processcurrent ++; showmsg (pssbstate, processcurrent. tostring ());