Exemplo n.º 1
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);
        }
Exemplo n.º 2
0
 /// <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 (ThreadAbortException)
     {
     }
     catch (Exception ex)
     {
         Log.WriteLine(ex);
     }
 }
		/// <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>
 /// 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));
 }		
Exemplo n.º 5
0
		private void OnThreadFinished(object sender, BackgroundThreadEventArgs e)
		{
			this.OnPingFinished(this, EventArgs.Empty);
		}
		/// <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 (ThreadAbortException)
            {

            }
            catch (Exception ex)
            {
                Log.WriteLine(ex);
            }
		}