private void Start() { _checkClusterLayer.IsEnabled = true; _checkClusterLayer.IsChecked = true; _checkHandLayer.IsEnabled = true; _checkHandLayer.IsChecked = true; _factory = new SDKDataSourceFactory(); _depthImageSource = _factory.CreateDepthImageDataSource(); _depthImageSource.NewDataAvailable += new NewDataHandler <ImageSource>(MainWindow_NewDataAvailable); _depthImageSource.Start(); _clusterDataSource = _factory.CreateClusterDataSource(new ClusterDataSourceSettings { MaximumDepthThreshold = 900 }); _clusterDataSource.NewDataAvailable += new NewDataHandler <ClusterCollection>(ClusterDataSource_NewDataAvailable); _clusterDataSource.Start(); _handDataSource = new HandDataSource(_factory.CreateShapeDataSource(_clusterDataSource, new ShapeDataSourceSettings())); _handDataSource.NewDataAvailable += new NewDataHandler <HandCollection>(HandDataSource_NewDataAvailable); _handDataSource.Start(); UpdateLayers(); }
private void Start() { _checkClusterLayer.IsEnabled = true; _checkClusterLayer.IsChecked = true; _checkHandLayer.IsEnabled = true; _checkHandLayer.IsChecked = true; _factory = new SDKDataSourceFactory(); _depthImageSource = _factory.CreateDepthImageDataSource(); _depthImageSource.NewDataAvailable += new NewDataHandler<ImageSource>(MainWindow_NewDataAvailable); _depthImageSource.Start(); _clusterDataSource = _factory.CreateClusterDataSource(new ClusterDataSourceSettings { MaximumDepthThreshold = 900 }); _clusterDataSource.NewDataAvailable += new NewDataHandler<ClusterCollection>(ClusterDataSource_NewDataAvailable); _clusterDataSource.Start(); _handDataSource = new HandDataSource(_factory.CreateShapeDataSource(_clusterDataSource, new ShapeDataSourceSettings())); _handDataSource.NewDataAvailable += new NewDataHandler<HandCollection>(HandDataSource_NewDataAvailable); _handDataSource.Start(); UpdateLayers(); }