@@ -12,26 +12,20 @@ namespace ReClassNET
1212{
1313 static class Program
1414 {
15- private static Settings settings ;
16- private static ILogger logger ;
17- private static Random random = new Random ( ) ;
18- private static MainForm mainForm ;
19- private static bool designMode = true ;
15+ public static Settings Settings { get ; private set ; }
2016
21- public static Settings Settings => settings ;
17+ public static ILogger Logger { get ; private set ; }
2218
23- public static ILogger Logger => logger ;
19+ public static Random GlobalRandom { get ; } = new Random ( ) ;
2420
25- public static Random GlobalRandom => random ;
21+ public static MainForm MainForm { get ; private set ; }
2622
27- public static MainForm MainForm => mainForm ;
28-
29- public static bool DesignMode => designMode ;
23+ public static bool DesignMode { get ; private set ; } = true ;
3024
3125 [ STAThread ]
3226 static void Main ( )
3327 {
34- designMode = false ; // The designer doesn't call Main()
28+ DesignMode = false ; // The designer doesn't call Main()
3529
3630 DpiUtil . ConfigureProcess ( ) ;
3731
@@ -42,14 +36,14 @@ static void Main()
4236
4337 CultureInfo . DefaultThreadCurrentCulture = CultureInfo . InvariantCulture ;
4438
45- settings = Settings . Load ( Constants . SettingsFile ) ;
46- logger = new GuiLogger ( ) ;
39+ Settings = Settings . Load ( Constants . SettingsFile ) ;
40+ Logger = new GuiLogger ( ) ;
4741#if DEBUG
4842 using ( var coreFunctions = new CoreFunctionsManager ( ) )
4943 {
50- mainForm = new MainForm ( coreFunctions ) ;
44+ MainForm = new MainForm ( coreFunctions ) ;
5145
52- Application . Run ( mainForm ) ;
46+ Application . Run ( MainForm ) ;
5347 }
5448#else
5549 try
@@ -67,7 +61,7 @@ static void Main()
6761 }
6862#endif
6963
70- Settings . Save ( settings , Constants . SettingsFile ) ;
64+ Settings . Save ( Settings , Constants . SettingsFile ) ;
7165 }
7266
7367 /// <summary>Shows the exception in a special form.</summary>
@@ -76,9 +70,11 @@ public static void ShowException(Exception ex)
7670 {
7771 ex . HelpLink = Constants . HelpUrl ;
7872
79- var msg = new ExceptionMessageBox ( ex ) ;
80- msg . ShowToolBar = true ;
81- msg . Symbol = ExceptionMessageBoxSymbol . Error ;
73+ var msg = new ExceptionMessageBox ( ex )
74+ {
75+ ShowToolBar = true ,
76+ Symbol = ExceptionMessageBoxSymbol . Error
77+ } ;
8278 msg . Show ( null ) ;
8379 }
8480 }
0 commit comments