private void OnProgressReported(double val) { TaskbarItemInfo.ProgressValue = val / 100; if (ProgressReported != null) { FinalDispatcher.Invoke(() => ProgressReported?.Invoke(this, ProgressReportedEventArgs.PROnlyPercent(val))); } }
/// <summary> /// Sets the install progress percentage. /// </summary> /// <param name="value">The installation percentage.</param> protected void SetProgress(int value) { if (value < 0 || value > 100) { throw new ArgumentOutOfRangeException("value", "A percentage is typically between 0 and 100.... derp..."); } ProgressReported?.Invoke(value); }
/// <summary> /// Start the installation. /// </summary> public void Install() { var t = new System.Threading.Thread(() => { ProgressReported?.Invoke(0); StatusReported?.Invoke(""); Run(); ProgressReported?.Invoke(100); StatusReported?.Invoke("Installation completed."); InstallCompleted?.Invoke(); }); t.IsBackground = true; t.Start(); }
public void Execute() { ProgressReported?.Invoke(this, new JobProgressArgs() { PercentComplete = 0, StatusMessage = "Sample Job Started for package at location: " + JobData }); System.Threading.Thread.Sleep(1000); ProgressReported?.Invoke(this, new JobProgressArgs() { PercentComplete = 50, StatusMessage = "Sample Job Processing for package at location: " + JobData }); System.Threading.Thread.Sleep(1000); ProgressReported?.Invoke(this, new JobProgressArgs() { PercentComplete = 100, StatusMessage = "Sample Job Completed for package at location: " + JobData }); }
public void ReportProgress(string message) { ProgressReported?.Invoke(this, new ProgressEventArgs(message)); }
public void ReportProgress(int totalPer, int detailPer, string desc, string detail) { ProgressReported?.Invoke(this, (totalPer, detailPer, desc, detail)); }
public void ReportProgress(int percentProgress, string text, string descrip) { ProgressReported?.Invoke(this, (percentProgress, 0, text, descrip)); }
private static void _bgw_ProgressChanged(object sender, ProgressChangedEventArgs e) { ProgressReported?.Invoke(null, e); }
private static void OnProgressReported(object sender, ProgressReportedEventArgs e) { ProgressReported?.Invoke(sender, e); }
/// <inheritdoc /> public void Progress(double progressValue, double progressMin, double progressMax) { ProgressReported?.Invoke(this, new CardMimicProgressEventArgs(progressValue, progressMin, progressMax)); }
private void OnProgressChanged(ProgressReportedEventArgs e) { ProgressReported?.Invoke(this, e); }