@@ -54,83 +54,83 @@ public static void Main(string[] args)
5454 try
5555 {
5656#endif
57- var splashScreen = new SplashScreen ( "Resources/Icons/icon256x.png" ) ;
58- splashScreen . Show ( false , true ) ;
59- Environment . CurrentDirectory =
60- Path . GetDirectoryName ( Assembly . GetExecutingAssembly ( ) . Location ) ??
61- throw new NullReferenceException ( ) ;
57+ var splashScreen = new SplashScreen ( "Resources/Icons/icon256x.png" ) ;
58+ splashScreen . Show ( false , true ) ;
59+ Environment . CurrentDirectory =
60+ Path . GetDirectoryName ( Assembly . GetExecutingAssembly ( ) . Location ) ??
61+ throw new NullReferenceException ( ) ;
6262#if ! DEBUG
6363 ProfileOptimization . SetProfileRoot ( Environment . CurrentDirectory ) ;
6464 ProfileOptimization . StartProfile ( "Startup.Profile" ) ;
6565#endif
66- UpdateStatus = new UpdateInfo ( ) ;
67- OptionsObject = OptionsControl . Load ( out var ProgramIsNew ) ;
66+ UpdateStatus = new UpdateInfo ( ) ;
67+ OptionsObject = OptionsControl . Load ( out var ProgramIsNew ) ;
6868
69- if ( ! File . Exists ( Constants . HotkeysFile ) )
70- {
71- HotkeyControl . CreateDefaultHotkeys ( ) ;
72- }
73- else
74- {
75- HotkeyControl . CheckAndBufferHotkeys ( ) ;
76- }
77-
78- // Delete the default Ctrl+D hotkey to assign manually
79- AvalonEditCommands . DeleteLine . InputGestures . Clear ( ) ;
69+ if ( ! File . Exists ( Constants . HotkeysFile ) )
70+ {
71+ HotkeyControl . CreateDefaultHotkeys ( ) ;
72+ }
73+ else
74+ {
75+ HotkeyControl . CheckAndBufferHotkeys ( ) ;
76+ }
8077
81- if ( OptionsObject . Program_DiscordPresence )
82- {
83- // Init Discord RPC
84- DiscordClient . Initialize ( ) ;
78+ // Delete the default Ctrl+D hotkey to assign manually
79+ AvalonEditCommands . DeleteLine . InputGestures . Clear ( ) ;
8580
86- // Set default presence
87- DiscordClient . SetPresence ( new RichPresence
81+ if ( OptionsObject . Program_DiscordPresence )
8882 {
89- State = "Idle" ,
90- Timestamps = DiscordTime ,
91- Assets = new Assets
92- {
93- LargeImageKey = "immagine"
94- } ,
95- Buttons = new Button [ ]
83+ // Init Discord RPC
84+ DiscordClient . Initialize ( ) ;
85+
86+ // Set default presence
87+ DiscordClient . SetPresence ( new RichPresence
9688 {
97- new Button ( ) { Label = Constants . GetSPCodeText , Url = Constants . GitHubLatestRelease }
98- }
99- } ) ;
100- }
89+ State = "Idle" ,
90+ Timestamps = DiscordTime ,
91+ Assets = new Assets { LargeImageKey = "immagine" } ,
92+ Buttons = new Button [ ]
93+ {
94+ new Button ( )
95+ {
96+ Label = Constants . GetSPCodeText , Url = Constants . GitHubLatestRelease
97+ }
98+ }
99+ } ) ;
100+ }
101101
102- // Set up translations
103- Translations = new TranslationProvider ( ) ;
104- Translations . LoadLanguage ( OptionsObject . Language , true ) ;
102+ // Set up translations
103+ Translations = new TranslationProvider ( ) ;
104+ Translations . LoadLanguage ( OptionsObject . Language , true ) ;
105105
106- // Check startup arguments for -rcck
107- foreach ( var arg in args )
108- {
109- if ( arg . ToLowerInvariant ( ) == "-rcck" ) //ReCreateCryptoKey
106+ // Check startup arguments for -rcck
107+ foreach ( var arg in args )
110108 {
111- OptionsObject . ReCreateCryptoKey ( ) ;
112- MakeRCCKAlert ( ) ;
109+ if ( arg . ToLowerInvariant ( ) == "-rcck" ) //ReCreateCryptoKey
110+ {
111+ OptionsObject . ReCreateCryptoKey ( ) ;
112+ MakeRCCKAlert ( ) ;
113+ }
113114 }
114- }
115115
116- Configs = ConfigLoader . Load ( ) ;
117- for ( var i = 0 ; i < Configs . Count ; ++ i )
118- {
119- if ( Configs [ i ] . Name == OptionsObject . Program_SelectedConfig )
116+ Configs = ConfigLoader . Load ( ) ;
117+ for ( var i = 0 ; i < Configs . Count ; ++ i )
120118 {
121- SelectedConfig = i ;
122- break ;
119+ if ( Configs [ i ] . Name == OptionsObject . Program_SelectedConfig )
120+ {
121+ SelectedConfig = i ;
122+ break ;
123+ }
123124 }
124- }
125125
126- if ( ! OptionsObject . Program_UseHardwareAcceleration )
127- {
128- RenderOptions . ProcessRenderMode = RenderMode . SoftwareOnly ;
129- }
126+ if ( ! OptionsObject . Program_UseHardwareAcceleration )
127+ {
128+ RenderOptions . ProcessRenderMode = RenderMode . SoftwareOnly ;
129+ }
130130#if ! DEBUG
131131 if ( ProgramIsNew )
132132 {
133- if ( Translations . AvailableLanguageIDs . Count > 0 )
133+ if ( Translations . AvailableLanguageIDs . Count > 0 )
134134 {
135135 splashScreen . Close ( new TimeSpan ( 0 , 0 , 1 ) ) ;
136136 var langIds = Translations . AvailableLanguageIDs ;
@@ -148,9 +148,9 @@ public static void Main(string[] args)
148148 }
149149 }
150150#endif
151- MainWindow = new MainWindow ( splashScreen ) ;
152- var pipeServer = new PipeInteropServer ( MainWindow ) ;
153- pipeServer . Start ( ) ;
151+ MainWindow = new MainWindow ( splashScreen ) ;
152+ var pipeServer = new PipeInteropServer ( MainWindow ) ;
153+ pipeServer . Start ( ) ;
154154#if ! DEBUG
155155 }
156156 catch ( Exception e )
@@ -176,9 +176,9 @@ public static void Main(string[] args)
176176 Task . Run ( UpdateCheck . Check ) ;
177177 }
178178#endif
179- app . Startup += App_Startup ;
180- app . Run ( MainWindow ) ;
181- OptionsControl . Save ( ) ;
179+ app . Startup += App_Startup ;
180+ app . Run ( MainWindow ) ;
181+ OptionsControl . Save ( ) ;
182182#if ! DEBUG
183183 }
184184 catch ( Exception e )
0 commit comments