Exemplo n.º 1
0
        public NDIMonitorDataProvider()
        {
            _number = _random.Next();

            _ui = new OnWidgetUI()
            {
                DataContext = this
            };
        }
Exemplo n.º 2
0
        public NDIMonitorDataProvider()
        {
            _number = _random.Next();

            _ui = new OnWidgetUI()
            {
                DataContext = this
            };
            _ui.InitializeComponent();

            /*foreach (var b in ((Grid)_ui.FindName("Multiview8")).Children.OfType<Button>())
             *  b.Command = PlayInput;*/
        }
Exemplo n.º 3
0
        public NDIMonitorDataProvider()
        {
            _instances++;

            _ui = new OnWidgetUI()
            {
                DataContext = this
            };
            _ui.InitializeComponent();

            if (_finder == null)
            {
                _finder = new Finder(true);
            }
            else
            {
                Sources = new ObservableCollection <string>(_finder.Sources.Select(x => x.Name).ToArray());
            }
            _finder.Sources.CollectionChanged += Sources_CollectionChanged;

            // Not required, but "correct". (see the SDK documentation)
            if (!NDIlib.initialize())
            {
                // Cannot run NDI. Most likely because the CPU is not sufficient (see SDK documentation).
                // you can check this directly with a call to NDIlib.is_supported_CPU()
                if (!NDIlib.is_supported_CPU())
                {
                    MessageBox.Show("CPU unsupported.");
                }
                else
                {
                    // not sure why, but it's not going to run
                    MessageBox.Show("Cannot run NDI.");
                }

                // we can't go on
            }

            /*foreach (var b in ((Grid)_ui.FindName("Multiview8")).Children.OfType<Button>())
             *  b.Command = PlayInput;*/
        }