void TriggerUpdateStatusEvent(string fileName) { CurrentStep++; if (TotalStep == 0) { return; } int percent = (CurrentStep * 100) / TotalStep; BackUpProcessEventArgs eventData = new BackUpProcessEventArgs { IsFinish = false, Message = $"Copy file {fileName}", Percent = percent }; BackUpProcessUpdate.Invoke(this, eventData); }
void BackUpProcessUpdateHandler(object sender, BackUpProcessEventArgs e) { backupProcessingUserControl.backup_ProgressPanel.Text = e.Message; backupProcessingUserControl.lbl_backupProcessing_status.Text = e.Message; backupProcessingUserControl.backup_ProgressBar.Position = e.Percent; }