Standardized method of getting versions

This commit is contained in:
Cyberboss
2017-11-25 17:08:41 -05:00
parent 0a974b4a71
commit 47466f3063
4 changed files with 43 additions and 14 deletions
@@ -32,11 +32,8 @@ namespace TGS.ControlPanel
FormClosed += ControlPanel_FormClosed;
Interface = I;
if (Interface.IsRemoteConnection)
{
var splits = Interface.GetServiceComponent<ITGLanding>().Version().Split(' ');
Text = String.Format("TGS {0}: {1}:{2}", splits[splits.Length - 1], Interface.HTTPSURL, Interface.HTTPSPort);
}
Text += " Instance: " + I.InstanceName;
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();