public void ExitFullScreen() { if (!this.FullScreen) { return; } ControlFullScreenShell.ExitFullScreen(this); }
public void EnterFullScreen() { if (this.FullScreen) { return; } ControlFullScreenShell.EnterFullScreen(this); }
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); }
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); }