Beispiel #1
0
 /// <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);
 }
Beispiel #2
0
 private void OnProgressReported(double val)
 {
     TaskbarItemInfo.ProgressValue = val / 100;
     if (ProgressReported != null)
     {
         FinalDispatcher.Invoke(() => ProgressReported?.Invoke(this, ProgressReportedEventArgs.PROnlyPercent(val)));
     }
 }
Beispiel #3
0
        /// <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
     });
 }
Beispiel #5
0
 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));
 }
Beispiel #8
0
 private static void _bgw_ProgressChanged(object sender, ProgressChangedEventArgs e)
 {
     ProgressReported?.Invoke(null, e);
 }
Beispiel #9
0
 private static void OnProgressReported(object sender, ProgressReportedEventArgs e)
 {
     ProgressReported?.Invoke(sender, e);
 }
Beispiel #10
0
 /// <inheritdoc />
 public void Progress(double progressValue, double progressMin, double progressMax)
 {
     ProgressReported?.Invoke(this, new CardMimicProgressEventArgs(progressValue, progressMin, progressMax));
 }
Beispiel #11
0
 private void OnProgressChanged(ProgressReportedEventArgs e)
 {
     ProgressReported?.Invoke(this, e);
 }
Beispiel #12
0
 public void ReportProgress(int progressPercentage)
 {
     ProgressReported.Add(progressPercentage);
 }