This commit is contained in:
EnderIce2 2021-04-30 01:59:24 +03:00
parent a1a66c3dd1
commit 4913bb45c4

View File

@ -35,7 +35,7 @@ namespace EnderIce2.SDRSharpPlugin
SmallImageText = $"SDR-RPC plugin v{Assembly.LoadFrom("SDR-RPC.dll").GetName().Version} by EnderIce2" // should show the correct version SmallImageText = $"SDR-RPC plugin v{Assembly.LoadFrom("SDR-RPC.dll").GetName().Version} by EnderIce2" // should show the correct version
} }
}; };
private static DiscordRpcClient client; private DiscordRpcClient client;
private bool isRunning = true; private bool isRunning = true;
public string DisplayName public string DisplayName
{ {
@ -86,7 +86,10 @@ namespace EnderIce2.SDRSharpPlugin
}; };
} }
if (Utils.GetBooleanSetting("EnableRPCInvite", false)) if (Utils.GetBooleanSetting("EnableRPCInvite", false))
{
windowMessages.Show(); windowMessages.Show();
}
if (Utils.GetBooleanSetting("EnableRPC", true)) if (Utils.GetBooleanSetting("EnableRPC", true))
{ {
if (RPCalreadyLoaded) if (RPCalreadyLoaded)
@ -304,9 +307,13 @@ namespace EnderIce2.SDRSharpPlugin
} }
} }
if (client == null) if (client == null)
{
_controlPanel.ChangeStatus = "Client was null"; _controlPanel.ChangeStatus = "Client was null";
}
else else
{
_controlPanel.ChangeStatus = "Presence stopped"; _controlPanel.ChangeStatus = "Presence stopped";
}
} }
catch (Exception ex) catch (Exception ex)
{ {