/// <summary>
        /// Opens a sub session from the database
        /// </summary>
        private static void OpenSubSession(DateTime subSessionStartTime)
        {
            string fileName = BuildSubSessionFileName(subSessionStartTime);

            try
            {
                FileStream      fs         = new FileStream(fileName, FileMode.Open);
                BinaryFormatter bFormatter = new BinaryFormatter();

                _currentSubSession   = (VirtualMotionCaptureSubSession)bFormatter.Deserialize(fs);
                _subSessionStartTime = subSessionStartTime;
            }
            catch (System.IO.FileNotFoundException ex)
            {
                System.Windows.Forms.MessageBox.Show("Session file not found. Exception message: " + ex.Message, "Default Task File Not Found");
                _currentSubSession = null;
            }
            catch (System.IO.DirectoryNotFoundException ex)
            {
                System.Windows.Forms.MessageBox.Show("Session file directory not found. Exception message: " + ex.Message, "Directory Not Found");
                _currentSubSession = null;
            }
            catch (System.IO.IOException ex)
            {
                System.Windows.Forms.MessageBox.Show("Error opening session file. Exception message: " + ex.Message, "Unanticipated Error Opening Default Task File");
                _currentSubSession = null;
            }
        }
 /// <summary>
 /// Starts recording a new sub session
 /// </summary>
 /// <param name="_treadmillSpeed">The starting speed</param>
 private static void RecordedSubSessionStart(float _treadmillSpeed)
 {
     _subSessionStartTime = DateTime.Now;
     _currentSubSession   = new VirtualMotionCaptureSubSession();
     _currentFrame        = new VirtualMotionCaptureFrame();
     SaveTreadmillSpeedChange(_treadmillSpeed);
 }
        /// <summary>
        /// Opens a sub session from the database
        /// </summary>
        private static void OpenSubSession(DateTime subSessionStartTime)
        {


            string fileName = BuildSubSessionFileName(subSessionStartTime);
            try
            {
                FileStream fs = new FileStream(fileName, FileMode.Open);
                BinaryFormatter bFormatter = new BinaryFormatter();

                _currentSubSession = (VirtualMotionCaptureSubSession)bFormatter.Deserialize(fs);
                _subSessionStartTime = subSessionStartTime;


            }
            catch (System.IO.FileNotFoundException ex)
            {
                System.Windows.Forms.MessageBox.Show("Session file not found. Exception message: " + ex.Message, "Default Task File Not Found");
                _currentSubSession = null;
            }
            catch (System.IO.DirectoryNotFoundException ex)
            {
                System.Windows.Forms.MessageBox.Show("Session file directory not found. Exception message: " + ex.Message, "Directory Not Found");
                _currentSubSession = null;
            }
            catch (System.IO.IOException ex)
            {
                System.Windows.Forms.MessageBox.Show("Error opening session file. Exception message: " + ex.Message, "Unanticipated Error Opening Default Task File");
                _currentSubSession = null;
            }

        }
 /// <summary>
 /// Starts recording a new sub session
 /// </summary>
 /// <param name="_treadmillSpeed">The starting speed</param>
 private static void RecordedSubSessionStart(float _treadmillSpeed)
 {
     _subSessionStartTime = DateTime.Now;
     _currentSubSession = new VirtualMotionCaptureSubSession();
     _currentFrame = new VirtualMotionCaptureFrame();
     SaveTreadmillSpeedChange(_treadmillSpeed);
 }