private ISkeletonService getSkeletonService()
 {
     if (null == skeletonService)
     {
         skeletonService = SpringUtil.getService<ISkeletonService>();
         skeletonService.enableSkeleton(getSensorService().getSensor(SENSOR_IDX));
     }
     return skeletonService;
 }
 private ISkeletonService getSekeltonService()
 {
     if (null == skeletonService)
     {
         skeletonService = SpringUtil.getService<ISkeletonService>();
         skeletonService.enableSkeleton(sensor);
     }
     return skeletonService;
 }
        private void initialize(int sensorIdx)
        {
            Enabled = true;

            cameraService = SpringUtil.getService<ICameraService>();
            sensorService = SpringUtil.getService<ISensorService>();
            skeletonService = SpringUtil.getService<ISkeletonService>();
            gestureService = SpringUtil.getService<IGestureService>();

            sensorService.startSensor(sensorIdx);
            cameraService.startCameraService(sensorService.getSensor(sensorIdx));
            skeletonService.enableSkeleton(sensorService.getSensor(sensorIdx));
            gestureService.enableGestureService(sensorService.getSensor(sensorIdx));

            imgHandLeft = new BitmapImage(new Uri(Application.Current.StartupUri, IMAGE_HAND_LEFT));
            imgHandRight = new BitmapImage(new Uri(Application.Current.StartupUri, IMAGE_HAND_RIGHT));
            imgHandLeftActive = new BitmapImage(new Uri(Application.Current.StartupUri, IMAGE_HAND_LEFT_ACTIVE));
            imgHandRightActive = new BitmapImage(new Uri(Application.Current.StartupUri, IMAGE_HAND_RIGHT_ACTIVE));

            imgHandLeft.Freeze();
            imgHandRight.Freeze();
            imgHandLeftActive.Freeze();
            imgHandRightActive.Freeze();
        }