Esempio n. 1
0
 void context_ProgramEnded(object sender, ProgramEventArgs e)
 {
     ProgramContext context = sender as ProgramContext;
     context.ProgramEnded -= context_ProgramEnded;
     VixenSystem.Contexts.ReleaseContext(context);
     ScheduleItem item;
     if(_contexts.TryGetValue(context, out item)) {
         item.IsExecuting = false;
         _contexts.Remove(context);
     }
 }
Esempio n. 2
0
 private void _ProgramExecutorProgramStarted(object sender, ProgramEventArgs e)
 {
     OnContextStarted(EventArgs.Empty);
     OnProgramStarted(e);
 }
Esempio n. 3
0
 protected virtual void OnProgramStarted(ProgramEventArgs e)
 {
     if (ProgramStarted != null) {
         ProgramStarted(this, e);
     }
 }
 private void ProgramContextProgramStarted(object sender, ProgramEventArgs e)
 {
     Start();
 }
 private void ProgramContextProgramEnded(object sender, ProgramEventArgs e)
 {
     Stop();
 }
Esempio n. 6
0
 void context_ProgramEnded(object sender, ProgramEventArgs e)
 {
     ProgramContext context = sender as ProgramContext;
     context.ProgramEnded -= context_ProgramEnded;
     if (!_cachedPrograms.ContainsValue(context)) {
         VixenSystem.Logging.Schedule("Context wasn't cached, so releasing and cleaning up context.");
         VixenSystem.Contexts.ReleaseContext(context);
     } else {
         VixenSystem.Logging.Schedule("Context is cached, so not cleaning up; will potentially reuse.");
     }
     ScheduleItem item;
     if (_currentContexts.TryGetValue(context, out item)) {
         item.IsExecuting = false;
         _currentContexts.Remove(context);
     }
 }
Esempio n. 7
0
 void _programExecutor_ProgramStarted(object sender, ProgramEventArgs e)
 {
     OnContextStarted(EventArgs.Empty);
     if(ProgramStarted != null) {
         ProgramStarted(this, e);
     }
 }
Esempio n. 8
0
 void _programExecutor_ProgramEnded(object sender, ProgramEventArgs e)
 {
     if(ProgramEnded != null) {
         ProgramEnded(this, e);
     }
     OnContextEnded(EventArgs.Empty);
 }
 private void ProgramContextProgramStarted(object sender, ProgramEventArgs e)
 {
     ResetColors(true);
     Start();
 }
 private void ProgramContextProgramEnded(object sender, ProgramEventArgs e)
 {
     ResetColors(false);
     Stop();
 }