SetProgressValue() public méthode

/// Applies an overlay to a taskbar button of the given WPF window to indicate application status or a notification to the user. /// Displays or updates a progress bar hosted in a taskbar button of the main application window to show the specific percentage completed of the full operation.
public SetProgressValue ( int currentValue, int maximumValue ) : void
currentValue int An application-defined value that indicates the proportion of the operation that has been completed at the time the method is called.
maximumValue int An application-defined value that specifies the value currentValue will have when the operation is complete.
Résultat void
Exemple #1
0
        void BtnZipUp_Click(object sender, EventArgs e)
        {
            Taskbar.SetProgressState(TaskbarProgressBarState.Normal);
            if (MahEncType != EncryptionAlgorithm.None)
            {
                GetEncryptionCodeForm R = new GetEncryptionCodeForm("iTunes album zips");
                R.ShowDialog();
                Password = R.Password;
            }

            Taskbar.SetProgressValue(0, 1);
            bgw.DoWork += delegate(object sender2, DoWorkEventArgs e2) {
                try
                {
                    this.KickoffZipup(outputDirTextBox.Text);
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.ToString());
                }
            };
            bgw.RunWorkerAsync();
        }
 public void SetProgressValue(int current, int max, Window window)
 {
     _manager.SetProgressValue(current, max, window);
 }