public static void Main() { AppDomain.CurrentDomain.UnhandledException += OnSillyCrashHandler; Console.Title = "Steam Database"; // Load settings file before logging as it can be enabled in settings Settings.Load(); Log.WriteInfo("Bootstrapper", "Copyright (c) 2013-2015, SteamDB. See LICENSE file for more information."); // Just create deepest folder we will use in the app var filesDir = Path.Combine(Application.Path, "files", ".support", "chunks"); Directory.CreateDirectory(filesDir); Settings.Initialize(); LocalConfig.Load(); if (Settings.Current.SteamKitDebug) { DebugLog.AddListener(new Log.SteamKitLogger()); DebugLog.Enabled = true; } Console.CancelKeyPress += OnCancelKey; Application.Init(); }
public static async Task Main() { CultureInfo.DefaultThreadCurrentCulture = CultureInfo.InvariantCulture; CultureInfo.DefaultThreadCurrentUICulture = CultureInfo.InvariantCulture; AppDomain.CurrentDomain.UnhandledException += OnSillyCrashHandler; TaskScheduler.UnobservedTaskException += OnUnobservedTaskException; Console.Title = "Steam Database"; // Load settings file before logging as it can be enabled in settings await Settings.Load(); Log.WriteInfo(nameof(Bootstrapper), "Copyright (c) 2013-present, SteamDB. See LICENSE file for more information."); // Just create deepest folder we will use in the app var filesDir = Path.Combine(Application.Path, "files", ".support", "chunks"); Directory.CreateDirectory(filesDir); await Settings.Initialize(); await LocalConfig.Load(); DebugLog.AddListener(new Log.SteamKitLogger()); DebugLog.Enabled = true; Console.CancelKeyPress += OnCancelKey; await Application.Init(); Steam.Instance.Tick(); }
public static void Main() { Console.Title = "Steam Database"; var version = FileVersionInfo.GetVersionInfo(typeof(Steam).Assembly.Location); ProductVersion = version.ProductVersion; Log.WriteInfo("Bootstrapper", "Steam Database, built from commit: {0}", ProductVersion); Log.WriteInfo("Bootstrapper", "Copyright (c) 2013-2015, SteamDB. See LICENSE file for more information."); try { // Just create deepest folder we will use in the app string filesDir = Path.Combine(Application.Path, "files", ".support", "chunks"); Directory.CreateDirectory(filesDir); Settings.Load(); LocalConfig.Load(); } catch (Exception e) { Log.WriteError("Settings", "{0}", e.Message); return; } ErrorReporter.Init(Settings.Current.BugsnagApiKey); if (Settings.Current.SteamKitDebug) { DebugLog.AddListener(new Log.SteamKitLogger()); DebugLog.Enabled = true; } AppDomain.CurrentDomain.UnhandledException += OnSillyCrashHandler; Console.CancelKeyPress += OnCancelKey; Application.Init(); }