77using System . Runtime ;
88using System . Text ;
99using System . Threading ;
10+ using System . Threading . Tasks ;
1011using System . Windows ;
1112using System . Windows . Media ;
1213using DiscordRPC ;
@@ -29,7 +30,7 @@ public static class Program
2930 public static Timestamps discordTime = Timestamps . Now ;
3031
3132 [ STAThread ]
32- public static void Main ( string [ ] args )
33+ public static async Task Main ( string [ ] args )
3334 {
3435 // Init Discord RPC
3536 discordClient . Initialize ( ) ;
@@ -110,7 +111,7 @@ public static void Main(string[] args)
110111 }
111112 catch ( Exception e )
112113 {
113- File . WriteAllText ( "CRASH_" + Environment . TickCount . ToString ( ) + ".txt" , BuildExceptionString ( e , "SPEDIT LOADING" ) ) ;
114+ File . WriteAllText ( "CRASH_" + Environment . TickCount . ToString ( ) + ".txt" , BuildExceptionString ( e , "SPCODE LOADING" ) ) ;
114115 MessageBox . Show ( "An error occured while loading." + Environment . NewLine + "A crash report was written in the editor-directory." ,
115116 "Error while Loading" ,
116117 MessageBoxButton . OK ,
@@ -124,9 +125,7 @@ public static void Main(string[] args)
124125 {
125126 if ( OptionsObject . Program_CheckForUpdates )
126127 {
127- #pragma warning disable 4014
128- UpdateCheck . Check ( ) ;
129- #pragma warning restore 4014
128+ await UpdateCheck . Check ( ) ;
130129 }
131130#endif
132131 app . Startup += App_Startup ;
@@ -136,7 +135,7 @@ public static void Main(string[] args)
136135 }
137136 catch ( Exception e )
138137 {
139- File . WriteAllText ( "CRASH_" + Environment . TickCount . ToString ( ) + ".txt" , BuildExceptionString ( e , "SPEDIT MAIN" ) ) ;
138+ File . WriteAllText ( "CRASH_" + Environment . TickCount . ToString ( ) + ".txt" , BuildExceptionString ( e , "SPCODE MAIN" ) ) ;
140139 MessageBox . Show ( "An error occured." + Environment . NewLine + "A crash report was written in the editor-directory." ,
141140 "Error" ,
142141 MessageBoxButton . OK ,
0 commit comments