From 6eaadcc24c10193f5e78c241d68913fa4e57824a Mon Sep 17 00:00:00 2001 From: Ylian Saint-Hilaire Date: Fri, 4 Jun 2021 12:48:36 -0700 Subject: [PATCH] Display notools disconnect message. --- MainForm.cs | 7 +++++++ Properties/Resources.Designer.cs | 9 +++++++++ Properties/Resources.resx | 3 +++ 3 files changed, 19 insertions(+) diff --git a/MainForm.cs b/MainForm.cs index 969e41d..cb7e486 100644 --- a/MainForm.cs +++ b/MainForm.cs @@ -802,6 +802,13 @@ namespace MeshCentralRouter stateClearTimer.Enabled = true; serverNameComboBox.Focus(); } + else if ((meshcentral.disconnectMsg != null) && meshcentral.disconnectMsg.StartsWith("notools")) + { + stateLabel.Text = Translate.T(Properties.Resources.NoToolsAllowed); + stateLabel.Visible = true; + stateClearTimer.Enabled = true; + serverNameComboBox.Focus(); + } else if ((meshcentral.disconnectMsg != null) && meshcentral.disconnectMsg.StartsWith("emailvalidationrequired")) { stateLabel.Text = Translate.T(Properties.Resources.EmailVerificationRequired); diff --git a/Properties/Resources.Designer.cs b/Properties/Resources.Designer.cs index e23dbdd..0fbc661 100644 --- a/Properties/Resources.Designer.cs +++ b/Properties/Resources.Designer.cs @@ -527,6 +527,15 @@ namespace MeshCentralRouter.Properties { } } + /// + /// Looks up a localized string similar to No tools allowed. + /// + internal static string NoToolsAllowed { + get { + return ResourceManager.GetString("NoToolsAllowed", resourceCulture); + } + } + /// /// Looks up a localized string similar to Offline. /// diff --git a/Properties/Resources.resx b/Properties/Resources.resx index 8ee33e7..3826a5f 100644 --- a/Properties/Resources.resx +++ b/Properties/Resources.resx @@ -391,4 +391,7 @@ Toggle zoom-to-fit mode + + No tools allowed + \ No newline at end of file