Пример #1
0
        protected override void SwitcherOnInputStatusChanged(ISwitcher switcher, SwitcherInputStatusChangeEventArgs args)
        {
            var source = GetSourceWithInputNumber(args.Number);

#if DEBUG
            Debug.WriteInfo("Switcher Input Status", "Input {0}, HasVideo = {1}", args.Number, args.HasVideo);
#endif
            if (source == null || !AutoSourceSelectionEnabled)
            {
                return;
            }

            if (Source == source && !args.HasVideo && source.Type == SourceType.Laptop &&
                Sources.OfSourceType(SourceType.AirMedia).Any())
            {
#if DEBUG
                Debug.WriteWarn("Current source is laptop... switching back to AirMedia");
#endif
                Source = Sources[SourceType.AirMedia];
            }

            else if (Source == null && args.HasVideo && source.Type == SourceType.Laptop)
            {
#if DEBUG
                Debug.WriteSuccess("System is off, switching to laptop");
#endif
                Source = source;
            }
        }
Пример #2
0
 private void LocalSwitcherOnInputStatusChanged(ISwitcher switcher, SwitcherInputStatusChangeEventArgs args)
 {
     foreach (var source in Sources.Cast <ASource>())
     {
         source.UpdateFromSwitcherVideoStatus(args.Number, args.HasVideo);
     }
 }
Пример #3
0
 protected override void SwitcherOnInputStatusChanged(ISwitcher switcher, SwitcherInputStatusChangeEventArgs args)
 {
 }
Пример #4
0
 protected abstract void SwitcherOnInputStatusChanged(ISwitcher switcher, SwitcherInputStatusChangeEventArgs args);