コード例 #1
0
ファイル: Dispatcher.cs プロジェクト: azekeal/distributed
        private void StartNextJob()
        {
            using (Trace.Log())
            {
                if (ActiveJob != null)
                {
                    ActiveJob.Completed -= OnJobCompleted;
                }

                lock (jobQueue)
                {
                    if (jobQueue.Count == 0)
                    {
                        ActiveJob = null;
                    }

                    ActiveJob = jobQueue.Values[0];
                    jobQueue.RemoveAt(0);
                }

                if (ActiveJob != null)
                {
                    ActiveJob.Start();
                    ActiveJob.Completed += OnJobCompleted;
                }

                ActiveJobChanged?.Invoke(ActiveJob);
            }
        }
コード例 #2
0
 public bool Update()
 {
     if (ActiveJob != null)
     {
         ActiveJob.SetAllowedDispatch(buttonDeliveriesYes.IsSelected);
         ActiveJob.SetDescription(textBoxName.Text);
         ActiveJob.SetHasTips(buttonTipsYes.IsSelected);
         ActiveJob.SetIsEnabled(buttonIsEnabledYes.IsSelected);
         return(ActiveJob.Update());
     }
     IsNew     = false;
     ActiveJob = EmployeeJob.Add(
         textBoxName.Text,
         buttonTipsYes.IsSelected,
         buttonDeliveriesYes.IsSelected);
     if (buttonIsEnabledNo.IsSelected)
     {
         ActiveJob.SetIsEnabled(false);
         ActiveJob.Update();
     }
     return(true);
 }
コード例 #3
0
        internal virtual void SetPipelineTypeSpecificParameters(ActiveJob activeJob)
        {

        }
コード例 #4
0
 internal virtual void SetPipelineTypeSpecificParameters(ActiveJob activeJob)
 {
 }
 public ActiveJobCompletedEventArgs(ActiveJob job, EncodeCompletedEventArgs encodeCompletedEventArgs)
 {
     this.EncodeEventArgs = encodeCompletedEventArgs;
     this.Job             = job;
 }