private void UpdateProgress(string status, int currentItem, int maxItems, double currentItemPercentage)
        {
            // Make sure someone is listening to event
            if (OnUpdateProgress == null) 
                return;

            var args = new ProgressEventArgs(status, currentItem, maxItems, currentItemPercentage);
            OnUpdateProgress(this, args);
        }
Exemple #2
0
        private void UpdateProgress(object sender, ProgressEventArgs e)
        {
            var max = Convert.ToInt32(100*e.MaxItems);
            var currentOverallPercentage = Convert.ToInt32(e.CurrentItem*e.CurrentItemPercentage);

            pnlProgress.Visible = true;
            progressBarMain.Maximum = max;
            progressBarMain.Value = e.CurrentItem * 100;
            lblProgressStatus.Text = e.Status;
        }