File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44using SDRSharp . Common ;
55using SDRSharp . Radio ;
66using System ;
7+ using System . Linq ;
78using System . Reflection ;
89using System . Threading . Tasks ;
910using System . Windows . Forms ;
@@ -44,10 +45,24 @@ public void Initialize(ISharpControl control)
4445 _control = control ;
4546 if ( Utils . GetBooleanSetting ( "EnableRPC" , true ) )
4647 {
47- client = new DiscordRpcClient ( Utils . GetStringSetting ( "ClientID" ) , pipe : discordPipe )
48+ if ( Utils . GetStringSetting ( "ClientID" ) . All ( char . IsWhiteSpace ) )
4849 {
49- Logger = new ConsoleLogger ( logLevel , true )
50- } ;
50+ Utils . SaveSetting ( "ClientID" , "765213507321856078" ) ;
51+ }
52+
53+ try
54+ {
55+ client = new DiscordRpcClient ( Utils . GetStringSetting ( "ClientID" ) , pipe : discordPipe )
56+ {
57+ Logger = new ConsoleLogger ( logLevel , true )
58+ } ;
59+ }
60+ catch ( Exception ex )
61+ {
62+ _controlPanel . ChangeStatus = $ "RPC Error: { ex . Message } ";
63+ LogWriter . WriteToFile ( "Error in DiscordRpcClient\n " + ex . ToString ( ) ) ;
64+ return ;
65+ }
5166
5267 client . RegisterUriScheme ( ) ;
5368 client . OnRpcMessage += Client_OnRpcMessage ;
Original file line number Diff line number Diff line change 3232// You can specify all the values or you can default the Build and Revision Numbers
3333// by using the '*' as shown below:
3434// [assembly: AssemblyVersion("1.0.*")]
35- [ assembly: AssemblyVersion ( "1.2.0.0 " ) ]
36- [ assembly: AssemblyFileVersion ( "1.2.0.0 " ) ]
35+ [ assembly: AssemblyVersion ( "1.2.0.2 " ) ]
36+ [ assembly: AssemblyFileVersion ( "1.2.0.2 " ) ]
You can’t perform that action at this time.
0 commit comments