private void CreateGestureRecognition(PRESENTATION_MODE mode)
 {
     if (mode == PRESENTATION_MODE.POWERPOINT)
     {
         gestureRecognition = new PowerPointKinectGestureRecognition(skeletonRepository);
     }
     else if (mode == PRESENTATION_MODE.IMAGE)
     {
         gestureRecognition = new ImagePresentationKinectGestureRecognition(skeletonRepository);
     }
     gestureRecognition.GestureRecognized += this.GestureRecognized;
 }
        public KinectControlWindow(PRESENTATION_MODE mode, CommandExecutor Executor)
        {
            InitializeComponent();
            setWindowPosition();

            skeletonRepository = new SkeletonStateRepository();

            commands = new ServiceCommandsLocalActivation(Executor);

            //Runtime initialization is handled when the window is opened. When the window
            //is closed, the runtime MUST be unitialized.
            this.Loaded += new RoutedEventHandler(MainWindow_Loaded);
            //Handle the content obtained from the video camera, once received.
            this.KeyDown += new KeyEventHandler(MainWindow_KeyDown);

            this.mode = mode;

            CreateGestureRecognition(mode);

            Minimize();
            UnMinimize();
        }
        private Grammar createGrammar(PRESENTATION_MODE mode)
        {
            Grammar grammar = null;
            if (mode == PRESENTATION_MODE.IMAGE)
            {
                grammar = speechControl.CreateGrammarFromResource(Properties.Resources.image_presentation);
            }
            else if (mode == PRESENTATION_MODE.POWERPOINT)
            {
                grammar = speechControl.CreateGrammarFromResource(Properties.Resources.slide_presentation);
            }

            return grammar;
        }
 public void setMode(PRESENTATION_MODE mode)
 {
     this.mode = mode;
 }