Example #1
0
 public void OnShutdownActionComplete(object sender, EventArgs e)
 {
     Shows.Action action = (sender as Shows.Action);
     action.ActionComplete -= OnShutdownActionComplete;
     RunningActions.Remove(action);
     ScheduleExecutor.AddSchedulerLogEntry(Show.Name, "Shutdown action complete: " + action.ShowItem.Name);
     ExecuteNextShutdownItem();
 }
Example #2
0
 public void OnSequentialActionComplete(object sender, EventArgs e)
 {
     Shows.Action action = (sender as Shows.Action);
     action.ActionComplete -= OnSequentialActionComplete;
     RunningActions.Remove(action);
     ScheduleExecutor.AddSchedulerLogEntry(Show.Name, "Sequential action complete: " + action.ShowItem.Name);
     if (!StartShutdownIfRequested())
     {
         LogScheduleInfoEntry("OnSequentialActionComplete: Shutdown was NOT requested");
         ExecuteNextSequentialItem();
     }
 }
Example #3
0
        public void OnBackgroundActionComplete(object sender, EventArgs e)
        {
            Shows.Action action = (sender as Shows.Action);
            action.ActionComplete -= OnBackgroundActionComplete;
            RunningActions.Remove(action);
            ScheduleExecutor.AddSchedulerLogEntry(Show.Name, "Background action complete: " + action.ShowItem.Name);

            // Run it again and again and again and again and again and again and again and...
            if (!CheckForShutdown())
            {
                ExecuteBackgroundAction(action);
            }
        }
Example #4
0
        public void OnStartupActionComplete(object sender, EventArgs e)
        {
            var action = (sender as Shows.Action);

            if (action != null)
            {
                action.ActionComplete -= OnStartupActionComplete;
                RunningActions.Remove(action);

                ScheduleExecutor.AddSchedulerLogEntry(Show.Name, "Startup action complete: " + action.ShowItem.Name);
                action.Dispose();
            }
            ExecuteNextStartupItem();
        }
Example #5
0
        private void ProcessCompleted(ActionBase action)
        {
            if (action.Token.IsStateFinished)
            {
                if (RunningActions.Remove(action))
                {
                    action.Token.Name = action.Name + ": " + action.AboutMeSafe();
                    if (_actionChangeCallback != null)
                    {
                        _actionChangeCallback(action.Token);
                    }

                    action.Token.SetCompletedSignal();
                    if (!SuppressDebugOutput)
                    {
                        "{0:X2} {1}"._DLOG(SessionId, action.GetName() + action.AboutMeSafe());
                    }
                    CallbackBufferBlock.Add(action);
                    ActionCaseConsumer.Add(action);
                }
            }
        }