2 Commits

Author SHA1 Message Date
bf44bd1076 Updated for SDRSharp 1811 2021-05-10 13:22:46 +03:00
0b51536839 2021-05-05 08:44:07 +03:00
3 changed files with 13 additions and 14 deletions

View File

@ -17,10 +17,10 @@ namespace EnderIce2.SDRSharpPlugin
private const LogLevel logLevel = LogLevel.Trace; private const LogLevel logLevel = LogLevel.Trace;
private const int discordPipe = -1; private const int discordPipe = -1;
[System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE0044:Add readonly modifier", Justification = "<Pending>")] [System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE0044:Add readonly modifier", Justification = "<Pending>")]
bool RPCalreadyLoaded = false; bool RPCalreadyLoaded;
private ISharpControl _control; private ISharpControl _control;
bool playedBefore = false; bool playedBefore;
private SDRSharp.FrontEnds.SpyServer.ControllerPanel controllerPanel; //private SDRSharp.FrontEnds.SpyServer.ControllerPanel controllerPanel;
private TopWindowMessages windowMessages; private TopWindowMessages windowMessages;
[System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE0044:Add readonly modifier", Justification = "<Pending>")] [System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE0044:Add readonly modifier", Justification = "<Pending>")]
private RichPresence presence = new RichPresence() private RichPresence presence = new RichPresence()
@ -43,7 +43,6 @@ namespace EnderIce2.SDRSharpPlugin
public void Initialize(ISharpControl control) public void Initialize(ISharpControl control)
{ {
IConfigurationPanelProvider configurationPanelProvider; IConfigurationPanelProvider configurationPanelProvider;
if (Utils.GetBooleanSetting("ShowWelcomePage", true)) if (Utils.GetBooleanSetting("ShowWelcomePage", true))
{ {
new WelcomeForm().ShowDialog(); new WelcomeForm().ShowDialog();
@ -132,7 +131,7 @@ namespace EnderIce2.SDRSharpPlugin
try try
{ {
configurationPanelProvider = (IConfigurationPanelProvider)_control.Source; configurationPanelProvider = (IConfigurationPanelProvider)_control.Source;
controllerPanel = (SDRSharp.FrontEnds.SpyServer.ControllerPanel)configurationPanelProvider.Gui; //controllerPanel = (SDRSharp.FrontEnds.SpyServer.ControllerPanel)configurationPanelProvider.Gui;
} }
catch (Exception ex) catch (Exception ex)
{ {
@ -229,9 +228,9 @@ namespace EnderIce2.SDRSharpPlugin
LogWriter.WriteToFile("Setting secret..."); LogWriter.WriteToFile("Setting secret...");
try try
{ {
string sdr_url = "sdr://" + controllerPanel.Host + ":" + controllerPanel.Port + "/"; //string sdr_url = "sdr://" + controllerPanel.Host + ":" + controllerPanel.Port + "/";
LogWriter.WriteToFile(sdr_url); //LogWriter.WriteToFile(sdr_url);
presence.Secrets.JoinSecret = sdr_url; //presence.Secrets.JoinSecret = sdr_url;
} }
catch (Exception ex) catch (Exception ex)
{ {
@ -263,7 +262,10 @@ namespace EnderIce2.SDRSharpPlugin
{ {
string space_for_listen_list = " | "; string space_for_listen_list = " | ";
if (!Utils.GetBooleanSetting("EnableRPCInvite", false)) if (!Utils.GetBooleanSetting("EnableRPCInvite", false))
{
space_for_listen_list = ""; space_for_listen_list = "";
}
LogWriter.WriteToFile($"Frequency: {_control.Frequency}"); LogWriter.WriteToFile($"Frequency: {_control.Frequency}");
LogWriter.WriteToFile($"RdsRadioText: {_control.RdsRadioText}"); LogWriter.WriteToFile($"RdsRadioText: {_control.RdsRadioText}");
LogWriter.WriteToFile($"RdsProgramService: {_control.RdsProgramService}"); LogWriter.WriteToFile($"RdsProgramService: {_control.RdsProgramService}");

View File

@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyVersion("1.0.0.1")]
[assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.1")]

View File

@ -46,10 +46,6 @@
<HintPath>packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll</HintPath> <HintPath>packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
<EmbedInteropTypes>False</EmbedInteropTypes> <EmbedInteropTypes>False</EmbedInteropTypes>
</Reference> </Reference>
<Reference Include="SDRSharp, Version=1.0.0.1765, Culture=neutral, processorArchitecture=x86">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\Downloads\sdrsharp-x86\SDRSharp.exe</HintPath>
</Reference>
<Reference Include="SDRSharp.Common, Version=0.0.0.0, Culture=neutral, processorArchitecture=x86"> <Reference Include="SDRSharp.Common, Version=0.0.0.0, Culture=neutral, processorArchitecture=x86">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\sdrsharp-x86\SDRSharp.Common.dll</HintPath> <HintPath>..\..\sdrsharp-x86\SDRSharp.Common.dll</HintPath>
@ -65,6 +61,7 @@
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
<Reference Include="System.Drawing" /> <Reference Include="System.Drawing" />
<Reference Include="System.Runtime" />
<Reference Include="System.Windows.Forms" /> <Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml.Linq" /> <Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" /> <Reference Include="System.Data.DataSetExtensions" />