コード例 #1
0
ファイル: VehicleScreen.cs プロジェクト: Tribeman/CS422
 public VehicleScreen(Window MainWindow, KinectSensorChooser SensorChooser, Utilities.State State)
 {
     // Get the main window and sensor objects
     this.mainWindow = MainWindow;
     this.sensorChooser = SensorChooser;
     // Remember some info
     this.state = State;
     // Initialize display containers
     CreateContentGrid();
     CreateInfoGrid();
     CreateKinectRegion();
     //
     Grid.SetColumn(this.infoGrid, 0);
     Grid.SetRow(this.infoGrid, 0);
     this.content.Children.Add(this.infoGrid);
     //
     Grid.SetColumn(this.kRegion, 0);
     Grid.SetRow(this.kRegion, 1);
     this.content.Children.Add(this.kRegion);
     // Bind the Kinect sensor
     //var regionSensorBinding = new Binding("Kinect") { Source = SensorChooser };
     this.regionSensorBinding = new Binding("Kinect") { Source = SensorChooser };
     BindingOperations.SetBinding(this.kRegion, KinectRegion.KinectSensorProperty, this.regionSensorBinding);
 }
コード例 #2
0
ファイル: DataScreen.cs プロジェクト: Tribeman/CS422
 public DataScreen(Window MainWindow, KinectSensorChooser SensorChooser, Utilities.State State, string VehicleType)
 {
     // Get the main window and sensor objects
     this.mainWindow = MainWindow;
     this.sensorChooser = SensorChooser;
     //
     this.state = State;
     this.vehicleType = VehicleType;
     this.data = Utilities.Data.SelectDataByStateAndVehicleType(State.Name, VehicleType);
     //
     CreateKinectRegion();
     // Bind the Kinect sensor
     //var regionSensorBinding = new Binding("Kinect") { Source = SensorChooser };
     this.regionSensorBinding = new Binding("Kinect") { Source = SensorChooser };
     BindingOperations.SetBinding(this.kRegion, KinectRegion.KinectSensorProperty, this.regionSensorBinding);
 }