예제 #1
0
 // Load up a new motion recording to play, but puts the player in pause
 public void setMotionRecording(MotionRecording rec)
 {
     stop();
     this.rec = rec;
     playing = false;
     stopped = false;
     t = new Thread(new ThreadStart(this.run));
     t.Start();
 }
예제 #2
0
 private void record_Unchecked(object sender, RoutedEventArgs e)
 {
     if (recording)
     {
         SetGUIMode(Modes.PLAY);
         // stop recording
         recording = false;
         stopwatch.Stop();
         // Convert from a list of points to a MotionRecording
         string name = this.recording_title.Text;
         currentMotionRecording = new MotionRecording(currentRecordingSequence, name);
         currentRecordingSequence.Clear();
         recordings.Items.Add(currentMotionRecording);
     }
     // else the button was pressed but recording couldn't start for some reason
 }
예제 #3
0
        private void recordings_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            motion_player.stop();
            if (e.AddedItems.Count == 0)
            {
                currentMotionRecording = null;
            }
            else
            {
                currentMotionRecording = (MotionRecording)e.AddedItems[0];
            }

            updatePlaybackStatus();
        }