public ExtractionView() { InitializeComponent(); if (!DesignerProperties.GetIsInDesignMode(this)) { DataSource = new ExtractionViewModel(); } }
private void Connected(IDevice device) { Pump pump = CreatePump(@"F:\Test\Extraction", "data.db", device); if (pump == null) { return; } var allexts = PluginAdapter.Instance.GetAllExtractItems(pump); Dispatcher.BeginInvoke((Action) delegate() { ExtractionViewModel vm = (ExtractionViewModel)EV.DataContext; vm.Pump = pump; }); }