Exemple #1
0
        public MainViewModel()
        {
            _closeCommand = new RelayCommand(_ =>
            {
                _channelMessageProducer.Dispose();
            });

            Channels = new ObservableCollection <ChannelViewModel>();

            _channelMessageProducer = new ChannelMessageWorkerThread();
            _channelMessageProducer.Start(this);
        }
Exemple #2
0
        public MainViewModel()
        {
            _closeCommand = new RelayCommand(_ =>
            {
                _channelMessageProducer.Dispose();
            });

            _syncChannels = new object();
            Channels      = new ObservableCollection <ChannelViewModel>();
            BindingOperations.EnableCollectionSynchronization(Channels, _syncChannels);

            _channelMessageProducer = new ChannelMessageWorkerThread();
            _channelMessageProducer.Start(this);
        }