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(); }
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); } }
protected abstract void SourceLoadStarted(SourceBase newSource);
public RoomSourceChangeEventArgs(SourceBase previousSource, SourceBase newSource) { NewSource = newSource; PreviousSource = previousSource; }
public bool Contains(SourceBase source) { return(_collection != null && _collection.Any(s => s == source && s.Group == this)); }
public virtual DisplayDeviceInput GetDisplayInputOverrideForSource(DisplayBase display, SourceBase source) { return(DisplayDeviceInput.Unknown); }