Exemplo n.º 1
0
        void InternalSetSource <T>(IObservable <T> source)
        {
            Clear();

            // attempt to create an observer collection
            if (null != source)
            {
                _collection           = new ObservableCollectionSubject <T>(source, this);
                _grid.DataContext     = _collection;
                _playButton.IsEnabled = true;
            }
        }
Exemplo n.º 2
0
        public void Clear()
        {
            // clear any existing data context settings
            if (null != _collection)
            {
                _collection.Stop();
                _collection = null;
            }

            // reset UI
            _errorTextBox.Text = null;
            _grid.DataContext  = null;
            _grid.Columns.Clear();
            _playButton.IsEnabled = false;
            _stopButton.IsEnabled = false;
        }