private void CloseInterfaces()
        {
            // Reset variables
            _mainDir            = null;
            _projectName        = null;
            _totalFrameNumber   = -1;
            _currentFrameNumber = 0;
            _istimeBarEnabled   = true;

            if (_openFileDialog != null)
            {
                _openFileDialog.Dispose();
                _openFileDialog = null;
            }

            if (_replayControl != null)
            {
                _replayControl.Dispose();
                _replayControl = null;
            }

            if (_dbReplayInfo != null)
            {
                _dbReplayInfo.DBDisconnect();
                _dbReplayInfo = null;
            }

            if (_replayInfo != null)
            {
                _replayInfo = null;
            }
        }
 private void OnLoaded(object sender, RoutedEventArgs routedEventArgs)
 {
     this._dbReplayInfo = new DBReplayInfo(this._mainDir, this._projectName);
     this._dbReplayInfo.DBConnect();
     this._replayInfo = this._dbReplayInfo.GetAllReplayInfo();
     this._dbReplayInfo.DBDisconnect();
     this._dbReplayInfo = null;
     this.cb_replay_videoName.ItemsSource   = this._replayInfo.Select(item => item.userName);
     this.cb_replay_videoName.SelectedIndex = 0;
     if (!File.Exists(_mainDir + @"\" + _projectName + @"\Database\" + _projectName))
     {
         System.Windows.Forms.MessageBox.Show("Can't find the database!", "ERROR");
         this.Close();
     }
 }