public MainViewModel(ClusterDataSourceSettings clusterDataSourceSettings, ShapeDataSourceSettings shapeDataSourceSettings, HandDataSourceSettings handDataSourceSettings) { this.Frames = new BindingList <TestDepthFrame>(); this.clusterDataSourceSettings = clusterDataSourceSettings; this.shapeDataSourceSettings = shapeDataSourceSettings; this.handDataSourceSettings = handDataSourceSettings; this.VideoPresenter = new VideoViewModel(clusterDataSourceSettings, shapeDataSourceSettings, handDataSourceSettings); this.VideoPresenter.NewFrameCaptured += new Action <DepthDataFrame>(VideoPresenter_NewFrameCaptured); this.SaveFrameCommand = new RelayCommand(SaveCurrentFrame); this.LoadFrameCommand = new RelayCommand(LoadFrames); this.SelectPointCommand = new RelayCommand(SelectPoint); this.SelectFrameCommand = new RelayCommand <TestDepthFrame>(SelectFrame); this.RemoveFrameCommand = new RelayCommand(RemoveFrame); this.AddHandCommand = new RelayCommand(AddHand); this.RemoveHandCommand = new RelayCommand <HandDataViewModel>(RemoveHand); this.MarkPalmCenterCommand = new RelayCommand <HandDataViewModel>(MarkPalmCenter); this.MarkFingersCommand = new RelayCommand <HandDataViewModel>(MarkFingers); this.RemoveFingerCommand = new RelayCommand <FingerRoutedEventArgs>(RemoveFinger); this.OptionChangeCommand = new RelayCommand(ChangeOptions); this.LayerViewModel = new LayerViewModel(); }
private void accurateToolStripMenuItem_Click_1(object sender, EventArgs e) { HandDataSourceSettings.SetToAccurate(this.propertyGridHandDetection.SelectedObject as HandDataSourceSettings); this.propertyGridClustering.Refresh(); this.propertyGridHandDetection.Refresh(); }
private void defaultToolStripMenuItem_Click_1(object sender, EventArgs e) { ClusterDataSourceSettings.SetToDefault(this.propertyGridClustering.SelectedObject as ClusterDataSourceSettings); HandDataSourceSettings.SetToDefault(this.propertyGridHandDetection.SelectedObject as HandDataSourceSettings); this.propertyGridClustering.Refresh(); this.propertyGridHandDetection.Refresh(); }
private void CreateDataSources() { var settings = new HandDataSourceSettings(); settings.DetectCenterOfPalm = false; //Not used, so disabling this makes the app faster this.handDataSource = new HandDataSource(this.factory.CreateShapeDataSource(), settings); handDataSource.NewDataAvailable += new NewDataHandler <HandCollection>(handDataSource_NewDataAvailable); this.handDataSource.Start(); }
public VideoViewModel(ClusterDataSourceSettings clusterDataSourceSettings, ShapeDataSourceSettings shapeDataSourceSettings, HandDataSourceSettings handDataSourceSettings) { this.clusterDataSourceSettings = clusterDataSourceSettings; this.shapeDataSourceSettings = shapeDataSourceSettings; this.handDataSourceSettings = handDataSourceSettings; this.CaptureFrameCommand = new RelayCommand(CaptureFrame); this.CaptureFrameDelayedCommand = new RelayCommand(CaptureFrameDelayed); this.StartDepthSourceCommand = new RelayCommand(StartDepthSource); this.LayerViewModel = new LayerViewModel(); }
public SettingsForm(ClusterDataSourceSettings clusterSettings, ShapeDataSourceSettings shapeDataSourceSettings, HandDataSourceSettings handDetectionSettings) : this() { this.propertyGridClustering.SelectedObject = clusterSettings; this.propertyGridShape.SelectedObject = shapeDataSourceSettings; this.propertyGridHandDetection.SelectedObject = handDetectionSettings; }