packages/Windows API Code Pack 1.1/source/Samples/Shell/StarBackupUsingLibraries/CS/BackupProcessPage.xaml.cs
/// <summary>
/// When each folder is backed up, some progress is reported. This method will get called each time.
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
When each folder is backed up, some progress is reported. This method will get called each time.
When each folder is backed up some progress is reported . This method will get called each time .
void bw_ProgressChanged(object sender, ProgressChangedEventArgs e)
        {
            ListBoxItem lbi = e.UserState as ListBoxItem;
            if (lbi != null)
            {
                StackPanel sp = lbi.Content as StackPanel;
                if (sp != null)
                {
                    Image img = sp.Children[0] as Image;
                    if (img != null)
                        img.Source = StarBackupHelper.ConvertGDI_To_WPF(Properties.Resources.Check);
                }
                listBox1.SelectedItem = lbi;
                listBox1.ScrollIntoView(lbi);
            }
        }
void bw_ProgressChanged ( object sender , ProgressChangedEventArgs e ) { ListBoxItem lbi = e . UserState as ListBoxItem ; if ( lbi != null ) { StackPanel sp = lbi . Content as StackPanel ; if ( sp != null ) { Image img = sp . Children [ 0 ] as Image ; if ( img != null ) img . Source = StarBackupHelper . ConvertGDI_To_WPF ( Properties . Resources . Check ) ; } listBox1 . SelectedItem = lbi ; listBox1 . ScrollIntoView ( lbi ) ; } }
When each folder is backed up, some progress is reported.
When each folder is backed up some progress is reported .
// The item we get passed in is the actual ListBoxItem  // (contains the StackPanel and label for the folder name) // Get the stack panel so we can get to it's contents // Get the image control and set our checked state. // Select the item and make sure its in view. This will give good feedback to the user // as we are going down the list and performing some operation on the items.
sender
object
None
e
ProgressChangedEventArgs
None