public ReplayKinectModel(Stream fileStream) : base() { this.fileStream = fileStream; replay = new SkeletonReplay(fileStream); replay.SkeletonFrameReady += new EventHandler <ReplaySkeletonFrameReadyEventArgs>(SkeletonFrameReady); replay.Start(); }
private void replayButton_Click(object sender, RoutedEventArgs e) { OpenFileDialog openFileDialog = new OpenFileDialog { Title = "Select filename", Filter = "Replay files|*.replay" }; if (openFileDialog.ShowDialog() == true) { if (replay != null) { replay.SkeletonFrameReady -= replay_SkeletonFrameReady; replay.Stop(); } Stream recordStream = File.OpenRead(openFileDialog.FileName); replay = new SkeletonReplay(recordStream); replay.SkeletonFrameReady += replay_SkeletonFrameReady; replay.Start(); } }