diff --git a/mRemoteV1/App/Screens.cs b/mRemoteV1/App/Screens.cs index 59c1447a..b561fbdb 100644 --- a/mRemoteV1/App/Screens.cs +++ b/mRemoteV1/App/Screens.cs @@ -6,32 +6,31 @@ namespace mRemoteNG.App { public static class Screens { - public static void SendFormToScreen(Screen Screen) + public static void SendFormToScreen(Screen screen) { - bool wasMax = false; + var frmMain = FrmMain.Default; + var wasMax = false; - if (FrmMain.Default.WindowState == FormWindowState.Maximized) + if (frmMain.WindowState == FormWindowState.Maximized) { wasMax = true; - FrmMain.Default.WindowState = FormWindowState.Normal; + frmMain.WindowState = FormWindowState.Normal; } - FrmMain.Default.Location = Screen.Bounds.Location; + frmMain.Location = screen.Bounds.Location; if (wasMax) { - FrmMain.Default.WindowState = FormWindowState.Maximized; + frmMain.WindowState = FormWindowState.Maximized; } } - public static void SendPanelToScreen(DockContent Panel, Screen Screen) + public static void SendPanelToScreen(DockContent panel, Screen screen) { - Panel.DockState = DockState.Float; - if (Panel.ParentForm != null) - { - Panel.ParentForm.Left = Screen.Bounds.Location.X; - Panel.ParentForm.Top = Screen.Bounds.Location.Y; - } + panel.DockState = DockState.Float; + if (panel.ParentForm == null) return; + panel.ParentForm.Left = screen.Bounds.Location.X; + panel.ParentForm.Top = screen.Bounds.Location.Y; } } } \ No newline at end of file