Пример #1
0
        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;
            }
        }
Пример #2
0
        private void InitComponent(string mainDir, string projectName)
        {
            if (mainDir != null && projectName != null)
            {
                this._mainDir     = mainDir;
                this._projectName = projectName;
                this.Title        = "Replay - " + this._projectName;
            }
            else
            {
                System.Windows.Forms.MessageBox.Show("Can't find data folder!", "ERROR");
                this.Close();
            }
            this._openFileDialog        = new System.Windows.Forms.OpenFileDialog();
            this._openFileDialog.Filter = @"Video Files (*.avi; *.qt; *.mov; *.mpg; *.mpeg; *.m1v)|*.avi; *.qt; *.mov; *.mpg; *.mpeg; *.m1v|Audio files (*.wav; *.mpa; *.mp2; *.mp3; *.au; *.aif; *.aiff; *.snd)|*.wav; *.mpa; *.mp2; *.mp3; *.au; *.aif; *.aiff; *.snd|MIDI Files (*.mid, *.midi, *.rmi)|*.mid; *.midi; *.rmi|Image Files (*.jpg, *.bmp, *.gif, *.tga)|*.jpg; *.bmp; *.gif; *.tga|All Files (*.*)|*.*";

            this._replayControl = new ReplayControl(this._mainDir, this._projectName);
            this._replayControl.MediaComplete += new EventHandler(OnMediaComplete);
            this._replayControl.FrameEvent    += new ReplayControl.FrameEventHandler(OnFrameEvent);
            wfh_replay_window.Child            = this._replayControl;
        }