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