Exemplo n.º 1
0
 protected virtual void StartSourceChangeProcess(SourceBase previousSource, SourceBase newSource)
 {
     _sourceChangeThread = new Thread(SourceLoadProcess, new[] { previousSource, newSource },
                                      Thread.eThreadStartOptions.CreateSuspended)
     {
         Name     = "Room SourceLoadProcess()",
         Priority = Thread.eThreadPriority.HighPriority
     };
     _sourceChangeThread.Start();
 }
Exemplo n.º 2
0
        private void OnSourceChange(RoomBase room, SourceBase previousSource, SourceBase newSource)
        {
            var handler = SourceChange;
            var args    = new RoomSourceChangeEventArgs(previousSource, newSource);

            CloudLog.Info("{0} has changed sources from {1} to {2}", room,
                          previousSource != null ? previousSource.ToString() : "Off",
                          newSource != null ? newSource.ToString() : "Off");

            StartSourceChangeProcess(previousSource, newSource);

            try
            {
                if (handler != null)
                {
                    handler(room, args);
                }
            }
            catch (Exception e)
            {
                CloudLog.Exception(e);
            }
        }
Exemplo n.º 3
0
 protected abstract void SourceLoadStarted(SourceBase newSource);
Exemplo n.º 4
0
 public RoomSourceChangeEventArgs(SourceBase previousSource, SourceBase newSource)
 {
     NewSource      = newSource;
     PreviousSource = previousSource;
 }
Exemplo n.º 5
0
 public bool Contains(SourceBase source)
 {
     return(_collection != null && _collection.Any(s => s == source && s.Group == this));
 }
Exemplo n.º 6
0
 public virtual DisplayDeviceInput GetDisplayInputOverrideForSource(DisplayBase display, SourceBase source)
 {
     return(DisplayDeviceInput.Unknown);
 }