예제 #1
0
 public void ExitFullScreen()
 {
     if (!this.FullScreen)
     {
         return;
     }
     ControlFullScreenShell.ExitFullScreen(this);
 }
예제 #2
0
 public void EnterFullScreen()
 {
     if (this.FullScreen)
     {
         return;
     }
     ControlFullScreenShell.EnterFullScreen(this);
 }
예제 #3
0
        public static void EnterFullScreen(Control control)
        {
            if (control == null || Shells.Contains(control))
            {
                return;
            }
            ControlFullScreenShell shell = new ControlFullScreenShell(control);

            if (control.Parent != null)
            {
                control.Parent.Controls.Remove(control);
            }
            control.Dock = DockStyle.Fill;
            shell.Controls.Add(control);
            shell.Text = control.Text;
            Shells.Add(control, shell);

            shell.FullScreen = true;
            shell.EnterFullScreen();
            shell.Show(shell.ControlParent);
        }
예제 #4
0
        public static void ExitFullScreen(Control control)
        {
            if (control == null || !Shells.Contains(control))
            {
                return;
            }
            ControlFullScreenShell shell = Shells[control] as ControlFullScreenShell;

            if (shell != null && shell.AttachControl == control)
            {
                shell.Controls.Remove(control);
                if (shell.ControlParent != null)
                {
                    shell.ControlParent.Controls.Add(control);
                }
                control.Dock    = shell.ControlDock;
                control.Bounds  = shell.ControlBounds;
                shell.TrueClose = true;
                shell.Close();
            }

            Shells.Remove(control);
        }