예제 #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;
        }
예제 #2
0
        private void btnBack_Click(object sender, System.Windows.RoutedEventArgs e)
        {
            if (examples.Count > 0)
            {
                if (MessageBox.Show("Training examples have been recorded. Going back means that all training examples will be discarded.\nDiscard all training examples?", "Discard all training examples?", MessageBoxButton.YesNo) == MessageBoxResult.Yes)
                {
#if KINECT
                    skeletonDrawer.StopDrawing();
                    CursorController.Get().StopListening();
#endif
                    Switcher.Switch(new NewSignVideo(s));
                }
            }
            else
            {
#if KINECT
                skeletonDrawer.StopDrawing();
                CursorController.Get().StopListening();
#endif
                Switcher.Switch(new NewSignVideo(s));
            }
        }