public MainWindow() { InitializeComponent(); bsw = new BeamerScreenWindow(); bsw.Show(); tableManager = new TableManager(bsw.GetBeamerUC()); tableManager.Start(); tableManager.ToggleObjectRecognition = true; tableManager.ToggleObjectTracking = true; tableManager.ToggleObjectRotationAnalysation = true; tableManager.OnNewLongTermObject += new TableManager.TableManagerObjectChange(tableManager_OnNewLongTermObject); tableManager.OnObjectMove += new TableManager.TableManagerObjectChange(tableManager_OnObjectMove); tableManager.OnObjectRemove += new TableManager.TableManagerObjectChange(tableManager_OnObjectRemove); tableManager.OnObjectRotate += new TableManager.TableManagerObjectChange(tableManager_OnObjectRotate); ScreenCalibrationWindow scw = new ScreenCalibrationWindow(tableManager,true); scw.Show(); DepthMapViewer dv = new DepthMapViewer(ref tableManager); dv.Show(); }
private void mi_showdepthmaps_Click(object sender, System.Windows.RoutedEventArgs e) { if (!_tableManager.KinectRunning) { MessageBox.Show("Kinect muss zuerst initialisiert werden!", "Achtung!"); } else { //open this window in own thread, because these calculations are expensive Thread d = new Thread(() => { DepthMapViewer dmv = new DepthMapViewer(ref _tableManager); //Bind to the close event so that the thread is closed when the window closes dmv.Closed += (sender2, e2) => dmv.Dispatcher.InvokeShutdown(); //make it WPF ready System.Windows.Threading.Dispatcher.Run(); }); d.SetApartmentState(ApartmentState.STA); d.Start(); } }
private void b_viewdepth_Click(object sender, RoutedEventArgs e) { DepthMapViewer dmv = new DepthMapViewer(ref _tablemanager); dmv.Show(); }