Beispiel #1
0
        private ChannelSwitcher()
        {
#if true
            _channels            = PlayoutRepository.GetChannelInfos();
            this._defaultChannel = _channels.SingleOrDefault(i => i.Special);

            this._switchers = PlayoutRepository.GetBMDSwitcherInfos();
            if (_switchers.Any())
            {
                _currentSwitcher = _switchers.Single(i => i.Id == SettingsManager.BMDSwitcherId);
                IEnumerable <BMDSwitcherInputInfo> inputs =
                    PlayoutRepository.GetSwitcherInputInfos(SettingsManager.BMDSwitcherId, false);

                foreach (var channel in _channels)
                {
                    _channelInputMap.Add(channel.Id, inputs.SingleOrDefault(i => i.ChannelId == channel.Id));
                }

                _switcherOperator = FCSPlayout.SwitcherManagement.SwitcherWrapper.Get(_currentSwitcher.Address);
                _switcherOperator.CurrentProgramChanged += _switcherOperator_CurrentProgramChanged;
            }
            else
            {
            }
#endif
        }
Beispiel #2
0
        public BMDSwitcherSettingsViewModel()
        {
            this.SwitcherInputInfos = new ObservableCollection <BMDSwitcherInputInfo>();
            this.SwitcherInfos      = new ObservableCollection <BMDSwitcherInfo>(PlayoutRepository.GetBMDSwitcherInfos());

            _removeCommand = new DelegateCommand(ExecuteRemove, CanExecuteRemove);
            _addCommand    = new DelegateCommand(ExecuteAdd);
            _useItCommand  = new DelegateCommand(ExecuteUseCurrent, CanExecuteUseCurrent);
            UpdateCurrentUse();
        }
Beispiel #3
0
 public SwitcherChannelSettingsWindow()
 {
     InitializeComponent();
     foreach (var info in PlayoutRepository.GetBMDSwitcherInfos())
     {
         TabItem tabItem = new TabItem();
         tabItem.Header = info.Name;
         var uc = new SwitcherChannelSettings(info.Id);
         tabItem.Content = uc;
         _controls.Add(uc);
         this.tabControl.Items.Add(tabItem);
     }
 }