Changes the CP title when connected to a remote server

This commit is contained in:
Cyberboss
2017-11-02 10:27:10 -04:00
parent 4380457728
commit 1ac3f213f8
2 changed files with 8 additions and 2 deletions
+6
View File
@@ -2,6 +2,7 @@
using System.Drawing;
using System.Windows.Forms;
using TGServiceInterface;
using TGServiceInterface.Components;
namespace TGControlPanel
{
@@ -23,6 +24,11 @@ namespace TGControlPanel
{
Interface = I;
InitializeComponent();
if (Interface.IsRemoteConnection)
{
var splits = Interface.GetComponent<ITGSService>().Version().Split(' ');
Text = String.Format("TGS {0}: {1}:{2}", splits[splits.Length - 1], Interface.HTTPSURL, Interface.HTTPSPort);
}
if (Interface.VersionMismatch(out string error) && MessageBox.Show(error, "Warning", MessageBoxButtons.OKCancel) == DialogResult.Cancel)
{
Close();
+2 -2
View File
@@ -40,12 +40,12 @@ namespace TGServiceInterface
/// <summary>
/// If this is set, we will try and connect to an HTTPS server running at this address
/// </summary>
readonly string HTTPSURL;
public readonly string HTTPSURL;
/// <summary>
/// The port used by the service
/// </summary>
readonly ushort HTTPSPort;
public readonly ushort HTTPSPort;
/// <summary>
/// Username for remote operations