From 202a23797e3895e2a6a4980d126340956a4bae75 Mon Sep 17 00:00:00 2001 From: Cyberboss Date: Sat, 25 Nov 2017 17:10:41 -0500 Subject: [PATCH] Fixed when the version mismatch message is shown in Control Panel --- TGS.ControlPanel/ControlPanel/ControlPanel.cs | 5 ----- TGS.ControlPanel/Login.cs | 5 ++++- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/TGS.ControlPanel/ControlPanel/ControlPanel.cs b/TGS.ControlPanel/ControlPanel/ControlPanel.cs index c60f68822c..a6d66c86a3 100644 --- a/TGS.ControlPanel/ControlPanel/ControlPanel.cs +++ b/TGS.ControlPanel/ControlPanel/ControlPanel.cs @@ -34,11 +34,6 @@ namespace TGS.ControlPanel if (Interface.IsRemoteConnection) Text = String.Format("TGS {0}: {1}:{2}", Interface.ServerVersion, Interface.HTTPSURL, Interface.HTTPSPort); Text = String.Format("{0} Instance: {1}", Text, I.InstanceName); - if (Interface.VersionMismatch(out string error) && MessageBox.Show(error, "Warning", MessageBoxButtons.OKCancel) == DialogResult.Cancel) - { - Close(); - return; - } Panels.SelectedIndexChanged += Panels_SelectedIndexChanged; Panels.SelectedIndex += Math.Min(Properties.Settings.Default.LastPageIndex, Panels.TabCount - 1); InitRepoPage(); diff --git a/TGS.ControlPanel/Login.cs b/TGS.ControlPanel/Login.cs index 4897e5260d..8b03af0ee1 100644 --- a/TGS.ControlPanel/Login.cs +++ b/TGS.ControlPanel/Login.cs @@ -73,7 +73,10 @@ namespace TGS.ControlPanel MessageBox.Show("Authentication error: Username/password/windows identity is not authorized! Ensure you are a system administrator or in the correct Windows group on the service machine."); return; } - + + if (I.VersionMismatch(out error) && MessageBox.Show(error, "Warning", MessageBoxButtons.OKCancel) == DialogResult.Cancel) + return; + new InstanceSelector(I).Show(); Close(); }