mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-28 23:52:36 +01:00
Changes the CP title when connected to a remote server
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user