public SerialLogViewModel(SerialLog log) { this.log = log; log.Data.CollectionChanged += new System.Collections.Specialized.NotifyCollectionChangedEventHandler(Data_CollectionChanged); log.PropertyChanged += new PropertyChangedEventHandler(log_PropertyChanged); }
public MainWindow() { InitializeComponent(); log = new SerialLog(); logViewModel = new SerialLogViewModel(log); DataContext = logViewModel; log.Start(); }