Esempio n. 1
0
        public NewSignRecord(Sign s, List <Sequence> examples)
        {
            this.InitializeComponent();
            this.Cursor = Cursors.None;
#if KINECT
            KinectHandler.Get().AddVideoListener(NUIVideoFrameReady);
            skeletonDrawer = new SkeletonDrawer(SkeletonImage);
            skeletonDrawer.StartDrawing();
            CursorController.Get().StartListening();
#endif
            this.s                     = s;
            this.examples              = examples;
            this.currentCount          = -1;
            lblTrainExampleNum.Content = "Number of Training Examples: " + examples.Count;
        }
Esempio n. 2
0
 public NewSignRecord(Sign s, List<Sequence> examples)
 {
     this.InitializeComponent();
     this.Cursor = Cursors.None;
     #if KINECT
     KinectHandler.Get().AddVideoListener(NUIVideoFrameReady);
     skeletonDrawer = new SkeletonDrawer(SkeletonImage);
     skeletonDrawer.StartDrawing();
     CursorController.Get().StartListening();
     #endif
     this.s = s;
     this.examples = examples;
     this.currentCount = -1;
     lblTrainExampleNum.Content = "Number of Training Examples: " + examples.Count;
 }
Esempio n. 3
0
        private DispatcherTimer timer; // timer to indicate the change in movement

        #endregion Fields

        #region Constructors

        public PerformView(Sign sign)
        {
            this.InitializeComponent();
            this.Cursor = Cursors.None;
            this.sign = sign;
            #if KINECT
            skeletonDrawer = new SkeletonDrawer(SkeletonImage);
            skeletonDrawer.StartDrawing();
            model = sign.SignModel;
            KinectHandler.Get().AddVideoListener(NUIVideoFrameReady);
            CursorController.Get().StartListening();
            #else
            model = new MockModel();
            #endif
            this.currentCount = -1;
            this.timer = new DispatcherTimer { IsEnabled = true, Interval = TimeSpan.FromSeconds(1) };
        }
        public StoryPerformView(LinkedList<Scenario>.Enumerator sceneIt)
        {
            InitializeComponent();
            this.Cursor = Cursors.None;
            sceneIterator = sceneIt;
            if (!TrySetupScenario())
            {
                Switcher.Switch(new FinalComplete());
                //Switcher.Switch(new StoryManagerView());
                return;
            }

            #if KINECT
            skeletonDrawer = new SkeletonDrawer(SkeletonImage);
            skeletonDrawer.StartDrawing();
            model = sign.SignModel;
            KinectHandler.Get().AddVideoListener(NUIVideoFrameReady);
            CursorController.Get().StartListening();
            #else
            model = new MockModel();
            #endif
            this.currentCount = -1;
            this.timer = new DispatcherTimer { IsEnabled = true, Interval = TimeSpan.FromSeconds(1) };
        }
Esempio n. 5
0
 private void setSign(ISpySign spySign)
 {
     var curSign = Sign.FromName(spySign.signName);
     if (curSign == null)
     {
         throw new Exception("The sign \"" + spySign.signName + "\" has not been trained.");
     }
     #if KINECT
     currentSignModel = curSign.SignModel;
     skeletonDrawer = new SkeletonDrawer(SkeletonImage);
     KinectHandler.Get().AddVideoListener(NUIVideoFrameReady);
     CursorController.Get().StartListening();
     #else
     currentSignModel = new MockModel();
     #endif
 }