コード例 #1
0
        public SerialLogViewModel(SerialLog log)
        {
            this.log = log;

            log.Data.CollectionChanged += new System.Collections.Specialized.NotifyCollectionChangedEventHandler(Data_CollectionChanged);
            log.PropertyChanged += new PropertyChangedEventHandler(log_PropertyChanged);
        }
コード例 #2
0
        public MainWindow()
        {
            InitializeComponent();

            log = new SerialLog();
            logViewModel = new SerialLogViewModel(log);

            DataContext = logViewModel;

            log.Start();
        }