diff --git a/mRemoteV1/App/Windows.cs b/mRemoteV1/App/Windows.cs index 4472175bf..fad7cfcbf 100644 --- a/mRemoteV1/App/Windows.cs +++ b/mRemoteV1/App/Windows.cs @@ -29,8 +29,7 @@ namespace mRemoteNG.App public static ConfigWindow ConfigForm { get; set; } = new ConfigWindow(); public static ErrorAndInfoWindow ErrorsForm { get; set; } = new ErrorAndInfoWindow(); public static ScreenshotManagerWindow ScreenshotForm { get; set; } = new ScreenshotManagerWindow(); - public static UpdateWindow UpdateForm { get; set; } - public static DockContent UpdatePanel { get; set; } = new DockContent(); + public static UpdateWindow UpdateForm { get; set; } = new UpdateWindow(); public static SSHTransferWindow SshtransferForm { get; set; } @@ -73,8 +72,7 @@ namespace mRemoteNG.App { if (UpdateForm == null || UpdateForm.IsDisposed) { - UpdateForm = new UpdateWindow(UpdatePanel); - UpdatePanel = UpdateForm; + UpdateForm = new UpdateWindow(); } UpdateForm.Show(frmMain.Default.pnlDock); } diff --git a/mRemoteV1/Config/Settings/LayoutSettingsLoader.cs b/mRemoteV1/Config/Settings/LayoutSettingsLoader.cs index 7ac5d5b5b..326dc7fc7 100644 --- a/mRemoteV1/Config/Settings/LayoutSettingsLoader.cs +++ b/mRemoteV1/Config/Settings/LayoutSettingsLoader.cs @@ -86,12 +86,8 @@ namespace mRemoteNG.Config.Settings Windows.ConfigForm = new ConfigWindow(); Windows.TreeForm = new ConnectionTreeWindow(); Windows.ErrorsForm = new ErrorAndInfoWindow(); - - Windows.ScreenshotForm = new ScreenshotManagerWindow(Windows.ScreenshotForm); - Windows.ScreenshotForm = Windows.ScreenshotForm; - - Windows.UpdateForm = new UpdateWindow(Windows.UpdatePanel); - Windows.UpdatePanel = Windows.UpdateForm; + Windows.ScreenshotForm = new ScreenshotManagerWindow(); + Windows.UpdateForm = new UpdateWindow(); } } } \ No newline at end of file diff --git a/mRemoteV1/UI/Window/UpdateWindow.cs b/mRemoteV1/UI/Window/UpdateWindow.cs index 31027bc18..4a486a340 100644 --- a/mRemoteV1/UI/Window/UpdateWindow.cs +++ b/mRemoteV1/UI/Window/UpdateWindow.cs @@ -18,7 +18,14 @@ namespace mRemoteNG.UI.Window { public partial class UpdateWindow : BaseWindow { -#region Public Methods + private AppUpdater _appUpdate; + private bool _isUpdateDownloadHandlerDeclared; + + #region Public Methods + public UpdateWindow() : this(new DockContent()) + { + } + public UpdateWindow(DockContent panel) { WindowType = WindowType.Update; @@ -26,9 +33,9 @@ namespace mRemoteNG.UI.Window InitializeComponent(); Runtime.FontOverride(this); } -#endregion + #endregion -#region Form Stuff + #region Form Stuff private void Update_Load(object sender, EventArgs e) { @@ -72,14 +79,9 @@ namespace mRemoteNG.UI.Window } Process.Start(linkUri.ToString()); } -#endregion + #endregion -#region Private Fields - private AppUpdater _appUpdate; - private bool _isUpdateDownloadHandlerDeclared; -#endregion - -#region Private Methods + #region Private Methods private void CheckForUpdate() { if (_appUpdate == null) @@ -230,9 +232,9 @@ namespace mRemoteNG.UI.Window Runtime.MessageCollector.AddExceptionStackTrace(Language.strUpdateDownloadFailed, ex); } } -#endregion + #endregion -#region Events + #region Events private void DownloadUpdateProgressChanged(object sender, DownloadProgressChangedEventArgs e) { prgbDownload.Value = e.ProgressPercentage; @@ -268,6 +270,6 @@ namespace mRemoteNG.UI.Window Runtime.MessageCollector.AddMessage(MessageClass.ErrorMsg, ex.Message); } } -#endregion + #endregion } } \ No newline at end of file