Example #1
0
        private void NormalSpeedLoadButton_Click(object sender, RoutedEventArgs e)
        {
            if (movements[(int)Movement.NORMAL] != null)
            {
                SkeletonRecording movement = movements[(int)Movement.NORMAL].getMovement();
                skeletonClient.subscribe(new RecordingReproducer(skeletonCanvas, movement, movement.getTag(),
                                                                 Colors.Black, skeletonClient));
                return;
            }
            Microsoft.Win32.OpenFileDialog dlg = new Microsoft.Win32.OpenFileDialog();
            if (dlg.ShowDialog() == true)
            {
                SkeletonRecording movement = new SkeletonRecording("normalSpeedLoadedMovement");
                movement.loadFromFile(dlg.FileName);
                skeletonClient.subscribe(new RecordingReproducer(skeletonCanvas, movement, movement.getTag(),
                                                                 Colors.Black, skeletonClient));

                // Loading movement to analyzer
                movements[(int)Movement.NORMAL] = new MovementAnalyzer(movement, "NormalMovementAnalyzerStream",
                                                                       new NormalSpeedAction(Array.AsReadOnly <VlcController>(allControllers)), Movement.NORMAL, this);
                movements[(int)Movement.NORMAL].setThreshold(movementThresholds[(int)Movement.NORMAL]);
                skeletonClient.subscribe(movements[(int)Movement.NORMAL]);

                normalEnabler.Background = new SolidColorBrush(Colors.Red);
            }
        }
Example #2
0
 private void LoadButton_Click(object sender, RoutedEventArgs e)
 {
     Microsoft.Win32.OpenFileDialog dlg = new Microsoft.Win32.OpenFileDialog();
     if (dlg.ShowDialog() == true)
     {
         loadedMovement = new SkeletonRecording("loadedMovement");
         loadedMovement.loadFromFile(dlg.FileName);
         skeletonClient.subscribe(new RecordingReproducer(skeletonCanvas, loadedMovement, loadedMovement.getTag(),
                                                          Colors.Black, skeletonClient));
     }
 }
Example #3
0
        private void FasterLoadButton_Click(object sender, RoutedEventArgs e)
        {
            if (movements[(int)Movement.FASTER] != null)
            {
                SkeletonRecording movement = movements[(int)Movement.FASTER].getMovement();
                skeletonClient.subscribe(new RecordingReproducer(skeletonCanvas, movement, movement.getTag(),
                                                                 Colors.Black, skeletonClient));
                return;
            }
            Microsoft.Win32.OpenFileDialog dlg = new Microsoft.Win32.OpenFileDialog();
            if (dlg.ShowDialog() == true)
            {
                SkeletonRecording movement = new SkeletonRecording("fasterLoadedMovement");
                movement.loadFromFile(dlg.FileName);
                skeletonClient.subscribe(new RecordingReproducer(skeletonCanvas, movement, movement.getTag(),
                                                                 Colors.Black, skeletonClient));

                // Loading movement to analyzer
                movements[(int)Movement.FASTER] = new MovementAnalyzer(movement, "FasterMovementAnalyzerStream", new FasterAction(this), Movement.FASTER, this);
                movements[(int)Movement.FASTER].setThreshold(movementThresholds[(int)Movement.FASTER]);
                skeletonClient.subscribe(movements[(int)Movement.FASTER]);
                fasterEnabler.Background = new SolidColorBrush(Colors.Red);
            }
        }