Пример #1
0
        private static void JobStateCallback(object sender, IJobStateEventArg args)
        {
            Console.WriteLine("Job state: {0}\n", args.NewState);

            if (JobState.Canceled == args.NewState ||
                JobState.Failed == args.NewState ||
                JobState.Finished == args.NewState)
            {
                manualEvent.Set();
            }
        }
Пример #2
0
 private void JobStateCallback(object sender, IJobStateEventArg args)
 {
     this.State = args.NewState.ToString();
     CancelJobCommand.RaiseCanExecuteChanged();
     RequeueJobCommand.RaiseCanExecuteChanged();
 }