/// <summary>
		/// Override the OnFinished method to capture the date and time that the job finishes and to change it's state
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="e"></param>
		protected override void OnFinished(object sender, BackgroundThreadEventArgs e)
		{
			// mark the job as finished and the time that it finished at
			_job._dateTimeStopped = DateTime.Now;
			_job._finished = true;
			_job._state = BackgroundThreadPoolJobStates.Finished;

			base.OnFinished (sender, e);
		}
Beispiel #2
0
        /// <summary>
        /// Override the OnFinished method to capture the date and time that the job finishes and to change it's state
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected override void OnFinished(object sender, BackgroundThreadEventArgs e)
        {
            // mark the job as finished and the time that it finished at
            _job._dateTimeStopped = DateTime.Now;
            _job._finished        = true;
            _job._state           = BackgroundThreadPoolJobStates.Finished;

            base.OnFinished(sender, e);
        }
 /// <summary>
 /// Raises the Finished event
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected virtual void OnFinished(object sender, BackgroundThreadEventArgs e)
 {
     try
     {
         if (this.Finished != null)
         {
             this.Finished(sender, e);
         }
     }
     catch (Exception ex)
     {
         Trace.WriteLine(ex);
     }
 }
		/// <summary>
		/// Occurs when the thread is finished
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="e"></param>
		protected virtual void OnThreadFinished(object sender, BackgroundThreadEventArgs e)
		{
			// signal that the process has ended
			this.OnAutoUpdateProcessEnded(this, new AutoUpdateManagerEventArgs(this, null));
		}		
		/// <summary>
		/// Raises the Finished event
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="e"></param>
		protected virtual void OnFinished(object sender, BackgroundThreadEventArgs e)
		{
			try
			{
				if (this.Finished != null)
					this.Finished(sender, e);
			}
			catch(Exception ex)
			{
				Trace.WriteLine(ex);
			}
		}
Beispiel #6
0
		private void OnThreadFinished(object sender, BackgroundThreadEventArgs e)
		{
			this.OnPingFinished(this, EventArgs.Empty);
		}