Esempio n. 1
0
		private void RemoveFromWTS(bool force)
		{
			using (ScheduledJobWTS scheduledJobWT = new ScheduledJobWTS())
			{
				scheduledJobWT.RemoveTask(this, force);
			}
		}
 /// <summary>
 /// Removes this scheduled job definition from the Task Scheduler.
 /// This operation will fail if a current instance of this job definition
 /// is running.
 /// If force == true then all current instances will be stopped.
 /// </summary>
 /// <param name="force">Force removal and stop all running instances.</param>
 private void RemoveFromWTS(bool force)
 {
     using (ScheduledJobWTS taskScheduler = new ScheduledJobWTS())
     {
         taskScheduler.RemoveTask(this, force);
     }
 }