Example #1
0
 private void Window_Loaded_1(object sender, RoutedEventArgs e)
 {
     miKinect = new KinectSensorChooser();
     miKinect.KinectChanged += miKinect_KinectChanged;
     sensorChooserUI.KinectSensorChooser = miKinect;
     miKinect.Start();
 }
 private void OnLoaded(object sender, RoutedEventArgs routedEventArgs)
 {
     _sensorChooser = new KinectSensorChooser();
     _sensorChooser.KinectChanged += SensorChooserOnKinectChanged;
     KinectSensorChooserUi.KinectSensorChooser = _sensorChooser;
     _sensorChooser.Start();
     SetGameField();
 }
Example #3
0
 public MainWindow()
 {
     InitializeComponent();
     myChooser = new KinectSensorChooser();
     myChooser.KinectChanged += new EventHandler<KinectChangedEventArgs>(myChooser_KinectChanged);
     this.SensorChooserUI.KinectSensorChooser = myChooser;
     myChooser.Start();
 }
Example #4
0
 public Asimov(ICreateController create)
     : this(create, null)
 {
     // Find the Kinect and subscribe to changes in the sensor
     KinectSensorChooser sensorChooser = new KinectSensorChooser();
     sensorChooser.KinectChanged += this.KinectSensorChanged;
     sensorChooser.Start();
 }
 private void SetupKinectSensor()
 {
     _sensorChooser = new KinectSensorChooser();
     _sensorChooser.KinectChanged += SensorChooserOnKinectChanged;
     sensorChooserUi.KinectSensorChooser = _sensorChooser;
     _sensorChooser.Start();
     var regionSensorBinding = new Binding("Kinect") { Source = _sensorChooser };
     BindingOperations.SetBinding(kinectRegion, KinectRegion.KinectSensorProperty, regionSensorBinding);
 }
 private void Window_Loaded_1(object sender, RoutedEventArgs e)
 {
     Console.WriteLine("Main Windows Loading...");
     //Kinect Event Handler Register
     KinectSensor = new KinectSensorChooser();
     KinectSensor.KinectChanged += KinectSensor_KinectChanged;
     sensorChooserUI.KinectSensorChooser = KinectSensor;
     KinectSensor.Start();
 }
Example #7
0
        public MainWindow()
        {
            InitializeComponent();

            myChooser = new KinectSensorChooser();
            myColorArray = new byte[640*480*4];
            myChooser.KinectChanged += new EventHandler<KinectChangedEventArgs>(myChooser_KinectChanged);
            this.SensorChooserUI.KinectSensorChooser = myChooser;
            myChooser.Start();
            updateWindow();
        }
Example #8
0
        public static void Init()
        {
            // First Load the XML File that contains the application configuration
            _gestureMap = new GestureMap();
            _gestureMap.LoadGesturesFromXml(GestureFileName);

            _chooser = new KinectSensorChooser();
            _chooser.KinectChanged += ChooserSensorChanged;
            _chooser.Start();

            // Instantiate the in memory representation of the gesture state for each player
            _gestureMaps = new Dictionary<int, GestureMapState>();
        }
Example #9
0
        public MainWindow()
        {
            InitializeComponent();

            myTimer = new System.Windows.Threading.DispatcherTimer();
            myTimer.Tick += new EventHandler(myTimer_Tick);
            myTimer.Interval = new TimeSpan(0, 0, 0, 0, 250);

            myChooser = new KinectSensorChooser();
            myChooser.KinectChanged += new EventHandler<KinectChangedEventArgs>(myChooser_KinectChanged);
            this.SensorChooserUI.KinectSensorChooser = myChooser;
            myChooser.Start();
        }
        public MainWindow()
        {
            InitializeComponent();

            faceTrackingViewerBinding = new Binding("Kinect") {Source = sensorChooser};
            CurrentColorImageFormat = ColorImageFormat.Undefined;
            Bgr32BytesPerPixel = (PixelFormats.Bgr32.BitsPerPixel + 7) / 8;

            sensorChooser = new KinectSensorChooser();
            sensorChooser.KinectChanged += SensorChooserOnKinectChanged;
            sensorChooser.Start();

            faceTrackingViewer.SetBinding(FaceTrackingViewer.KinectProperty, faceTrackingViewerBinding);
            GetDirectory();
        }
Example #11
0
 KinectContext()
 {
     SensorChooser = new KinectSensorChooser();
     SensorChooser.KinectChanged += SensorChooser_KinectChanged;
     SensorChooser.Start();
 }
 /// <summary>
 /// Metodo que arranca la kinect al abrirse la ventana.
 /// </summary>
 /// <param name="sender"></param> Abrir la ventana.
 /// <param name="e"></param> Evento de abrir ventana.
 private void Window_Loaded(object sender, RoutedEventArgs e)
 {
     primeraVez = 1;
     repeticionesD = 0;
     repeticionesI = 0;
     miKinect = new KinectSensorChooser();
     miKinect.KinectChanged += miKinect_KinectChanged;
     sensorChooserUI.KinectSensorChooser = miKinect;
     miKinect.Start();
 }
Example #13
0
        void OnLoaded(object sender, RoutedEventArgs e)
        {
            _sensorChooser = new KinectSensorChooser();
            _sensorChooser.KinectChanged += KinectChanged;
            _sensorChooser.PropertyChanged += PropertyChanged;

            KinectSensorChooser.KinectSensorChooser = _sensorChooser;
            _sensorChooser.Start();
        }
 public InicializadorKinect()
 {
     SeletorKinect = new KinectSensorChooser();
     SeletorKinect.KinectChanged += SeletorKinect_KinectChanged;
     SeletorKinect.Start();
 }
Example #15
0
 private void Form1_Load(object sender, EventArgs e)
 {
     _chooser = new KinectSensorChooser();
     _chooser.KinectChanged += ChooserSensorChanged;
     _chooser.Start();
 }
        /// <summary>
        /// Set up the sensorchooser, create handlers for when a Kinect is changed and handlers for the KinectRegion grip events
        /// </summary>
        public void InitializeKinect()
        {
            sensorChooser = new KinectSensorChooser();
            sensorChooser.KinectChanged += SensorChooserOnKinectChanged;
            sensorChooserUi.KinectSensorChooser = sensorChooser;
            sensorChooser.Start();

            //Add handlers for the Kinect Grip events
            KinectRegion.AddHandPointerGripHandler(kRegion, OnHandGrip);
            KinectRegion.AddHandPointerGripReleaseHandler(kRegion, OnHandGripRelease);
            KinectRegion.AddQueryInteractionStatusHandler(kRegion, GripHandler);
        }
        //Manages establishing a connection to the Kinect Sensor
        private void ManageSensor()
        {
            //An object which finds any connected Kinects (it's hard to not let those spellings overlap...)
            //and selects one of them for the application. Once selected, it locks that Kinect to our process.
            sensorChooser = new KinectSensorChooser();
            sensorChooser.Start();

            //An object which accesses the underlying data available from the Kinect, allowing us
            // to specify particular settings we desire from it.
            sensorManager = new KinectSensorManager();
            sensorManager.KinectSensorChanged += this.KinectSensorChanged;

            sensorManager.KinectSensor = sensorChooser.Kinect;
            if(sensorManager.KinectSensor != null)
                Console.WriteLine("*** Kinect Ready! ***");
        }
        private void InitKinect()
        {

            // initialise le truc qui choisi le capteur kinect utilisé, et l'affichage sur la fenetre de ce capteur
            sensorChooser = new KinectSensorChooser();
            sensorChooser.KinectChanged += SensorChooserOnKinectChanged;
            sensorChooserUi.KinectSensorChooser = sensorChooser;
            sensorChooser.Start();


            // Bind the sensor chooser's current sensor to the KinectRegion
            var regionSensorBinding = new Binding("Kinect") { Source = sensorChooser };
            BindingOperations.SetBinding(kinectRegion, KinectRegion.KinectSensorProperty, regionSensorBinding);

            KinectRegion.AddHandPointerGripHandler(CanvasCombat, PinceKinect);
            KinectRegion.AddHandPointerPressHandler(CanvasCombat, PressionKinect);
        }
        public KinectController()
        {
            sensorChooser = new KinectSensorChooser();

            QueryPrimaryUserCallback = this.OnQueryPrimaryUserCallback;
            PreEngagementUserColors = new Dictionary<int, Color>();
            PostEngagementUserColors = new Dictionary<int, Color>();

            engagementStateManager.TrackedUsersChanged += this.OnEngagementManagerTrackedUsersChanged;
            engagementStateManager.CandidateUserChanged += this.OnEngagementManagerCandidateUserChanged;
            engagementStateManager.EngagedUserChanged += this.OnEngagementManagerEngagedUserChanged;
            engagementStateManager.PrimaryUserChanged += this.OnEngagementManagerPrimaryUserChanged;

            handoffConfirmationStasisTimer.Tick += this.OnHandoffConfirmationStasisTimerTick;
            disengagementNavigationTimer.Tick += this.OnDisengagementNavigationTick;

            shutdownCommand = new RelayCommand(this.Cleanup);
            engagementConfirmationCommand = new RelayCommand<RoutedEventArgs>(this.OnEngagementConfirmation);
            engagementHandoffConfirmationCommand = new RelayCommand<RoutedEventArgs>(this.OnEngagementHandoffConfirmation);

            sensorChooser.KinectChanged += SensorChooserOnKinectChanged;
            sensorChooser.Start();
        }