Exemple #1
0
        private void Flash_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e)
        {
            Control[] Cont = { btnPlay, cmbBox, linkLabel1, Stan, menuStrip1, btnToHTML, btnEpisodesList };

            //Przejdź w tryb pełnoekranowy
            if (e.KeyCode == Keys.F)
            {
                if (Flash.Visible == true)
                {
                    frm.Maximize(this);
                    this.Focus();
                }
            }
            //Wyłącz odtwarzanie i przywróć pierwotne rozmiary okna
            if (e.KeyCode == Keys.Escape)
            {
                if (Flash.Visible == true)
                {
                    frm.Restore(this);
                    this.Size = new Size(Iwidth, Iheight);
                    Flash.LoadMovie(0, "http://www.megavideo.com");//żeby nie odtwarzać filmu
                    KontrolkiVisible(true, Cont);
                    this.Text = "Przyjaciele Player";
                }
            }
            //Wyjście z trybu pełnoekranowego przy oglądaniu filmu
            if (e.KeyCode == Keys.W)
            {
                if (Flash.Visible == true)
                {
                    frm.Restore(this);
                }
            }
        }
Exemple #2
0
        public void ToggleScreenMode()
        {
            FullScreen = !FullScreen;

            if (FullScreen)
            {
                _formState.Maximize(this);
            }
            else
            {
                _formState.Restore(this);
            }
        }
        private void ToggleFullscreen()
        {
            if (_fullScreen)
            {
                _formState.Restore(this);
                menuStrip1.Visible = true;
                BackColor          = _applicationSettingsService.Settings.MainWindowBackgroundColor.ToColor();
                Cursor.Show();
            }
            else
            {
                _formState.Save(this);
                _formState.Maximize(this);
                menuStrip1.Visible = false;

                BackColor = Color.Black;
                Cursor.Hide();
                //HideCursorInFullScreen().Start();
            }

            _fullScreen = !_fullScreen;
        }