Exemple #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
        }
Exemple #2
0
        private Guid _switcherId = Guid.Empty; // int.MinValue;

        public SwitcherChannelSettingsViewModel()
        {
            this.ChannelInfos       = new ObservableCollection <ChannelInfo>(PlayoutRepository.GetChannelInfos());
            this.SwitcherInputInfos = new ObservableCollection <BMDSwitcherInputInfo>();
            _nullInfo = new ChannelInfo {
                Title = "未设置"
            };
            this.ChannelInfos.Add(_nullInfo);
        }
        public ChannelItemListViewModel(IRegionManager regionManager)
        {
            this.Channels = new List <ChannelMediaSource>(PlayoutRepository.GetChannelInfos(true).Select(i => new ChannelMediaSource(i)));

            // TODO: 从配置中获取默认时长。
            _playRange = new PlayRange(TimeSpan.FromMinutes(30));

            _regionManager = regionManager;
        }
Exemple #4
0
 public ChannelSelectionViewModel()
 {
     this.ChannelInfos = new ObservableCollection <ChannelInfo>(PlayoutRepository.GetChannelInfos());
 }
Exemple #5
0
 public AddChannelMediaItemsConfirmation()
 {
     this.Channels = new List <ChannelInfo>(PlayoutRepository.GetChannelInfos(true));
 }
 public ChannelSettingsViewModel()
 {
     this.ChannelInfos = new ObservableCollection <ChannelInfo>(PlayoutRepository.GetChannelInfos());
     _removeCommand    = new DelegateCommand(ExecuteRemove, CanExecuteRemove);
     _addCommand       = new DelegateCommand(ExecuteAdd);
 }