void EngagementSettings_Loaded(object sender, RoutedEventArgs e)
        {
            // change controls to represent current engagement settings
            // during load of page.
            App app = ((App)App.Current);

            IKinectEngagementManager kinectEngagementManager = app.KinectRegion.KinectEngagementManager;
            var handInScreenEngagementModel = kinectEngagementManager as HandInScreenEngagementModel;
            var handOverHeadEngagementModel = kinectEngagementManager as HandOverheadEngagementModel;

            switch (KinectCoreWindow.KinectEngagementMode)
            {
            case KinectEngagementMode.SystemOnePerson:
                onePerson.IsChecked = true;
                system.IsChecked    = true;
                break;

            case KinectEngagementMode.SystemTwoPerson:
                twoPerson.IsChecked = true;
                system.IsChecked    = true;
                break;

            case KinectEngagementMode.ManualOnePerson:
                onePerson.IsChecked = true;
                if (handInScreenEngagementModel != null)
                {
                    manualOnScreen.IsChecked = true;
                }
                else if (handOverHeadEngagementModel != null)
                {
                    manualOverHead.IsChecked = true;
                }
                break;

            case KinectEngagementMode.ManualTwoPerson:
                twoPerson.IsChecked = true;
                if (handInScreenEngagementModel != null)
                {
                    manualOnScreen.IsChecked = true;
                }
                else if (handOverHeadEngagementModel != null)
                {
                    manualOverHead.IsChecked = true;
                }
                break;
            }

            // Manage cursor sprite sheets
            if (app.KinectRegion.CursorSpriteSheetDefinition == KinectRegion.DefaultSpriteSheet)
            {
                cursorSpriteSheetDefault.IsChecked = true;
            }
            else
            {
                cursorSpriteSheetColor.IsChecked = true;
            }
        }
Beispiel #2
0
        void kinectRegion_Loaded(object sender, RoutedEventArgs e)
        {
            App app = ((App)App.Current);

            IKinectEngagementManager kinectEngagementManager = app.KinectRegion.KinectEngagementManager;

            var handInScreenEngagementModel = kinectEngagementManager as HandInScreenEngagementModel;
            var handOverHeadEngagementModel = kinectEngagementManager as HandOverheadEngagementModel;

            var engagementModel1 = new HandOverheadEngagementModel(1);

            var engagementModel2 = new HandInScreenEngagementModel(1, app.KinectRegion.InputPointerManager);
//app.KinectRegion.SetKinectOnePersonManualEngagement(engagementModel2);
        }