Exemple #1
0
 public override void Destroy()
 {
     replay.SkeletonFrameReady -= SkeletonFrameReady;
     replay.Stop();
     if (this.fileStream != null)
     {
         this.fileStream.Close();
     }
 }
Exemple #2
0
        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();
            }
        }