Example #1
0
        public void RedockVideoControlsToolStripMenuItemClick(object sender, EventArgs e)
        {
            if (!Configuration.Settings.General.Undocked)
                return;

            mediaPlayer.ShowNonFullScreenControls();

            SaveUndockedPositions();

            Configuration.Settings.General.Undocked = false;

            if (_videoControlsUndocked != null && !_videoControlsUndocked.IsDisposed)
            {
                var control = _videoControlsUndocked.PanelContainer.Controls[0];
                var controlCheckBox = _videoControlsUndocked.PanelContainer.Controls[1];
                _videoControlsUndocked.PanelContainer.Controls.Clear();
                ReDockVideoButtons(control, controlCheckBox);
                _videoControlsUndocked.Close();
                _videoControlsUndocked = null;
            }

            if (_waveformUndocked != null && !_waveformUndocked.IsDisposed)
            {
                var controlWaveform = _waveformUndocked.PanelContainer.Controls[0];
                var controlButtons = _waveformUndocked.PanelContainer.Controls[1];
                var controlTrackBar = _waveformUndocked.PanelContainer.Controls[2];
                _waveformUndocked.PanelContainer.Controls.Clear();
                ReDockWaveform(controlWaveform, controlButtons, controlTrackBar);
                _waveformUndocked.Close();
                _waveformUndocked = null;
            }

            if (_videoPlayerUndocked != null && !_videoPlayerUndocked.IsDisposed)
            {
                var control = _videoPlayerUndocked.PanelContainer.Controls[0];
                _videoPlayerUndocked.PanelContainer.Controls.Remove(control);
                ReDockVideoPlayer(control);
                _videoPlayerUndocked.Close();
                _videoPlayerUndocked = null;
                mediaPlayer.ShowFullscreenButton = Configuration.Settings.General.VideoPlayerShowFullscreenButton;
            }

            _isVideoControlsUndocked = false;
            _videoPlayerUndocked = null;
            _waveformUndocked = null;
            _videoControlsUndocked = null;
            ShowVideoPlayer();

            audioVisualizer.Visible = toolStripButtonToggleWaveform.Checked;
            trackBarWaveformPosition.Visible = toolStripButtonToggleWaveform.Checked;
            panelWaveformControls.Visible = toolStripButtonToggleWaveform.Checked;
            if (!toolStripButtonToggleVideo.Checked)
                HideVideoPlayer();

            mediaPlayer.Invalidate();
            Refresh();

            undockVideoControlsToolStripMenuItem.Visible = true;
            redockVideoControlsToolStripMenuItem.Visible = false;
        }
Example #2
0
        private void UnDockVideoButtons()
        {
            _videoControlsUndocked = new VideoControlsUndocked(this);
            var control = tabControlButtons;
            groupBoxVideo.Controls.Remove(control);
            control.Top = 25;
            control.Left = 0;
            _videoControlsUndocked.PanelContainer.Controls.Add(control);

            groupBoxVideo.Controls.Remove(checkBoxSyncListViewWithVideoWhilePlaying);
            _videoControlsUndocked.PanelContainer.Controls.Add(checkBoxSyncListViewWithVideoWhilePlaying);
            checkBoxSyncListViewWithVideoWhilePlaying.Top = 5;
            checkBoxSyncListViewWithVideoWhilePlaying.Left = 5;

            splitContainerMain.Panel2Collapsed = true;
            splitContainer1.Panel2Collapsed = true;
        }