/// <summary> /// The entry point. /// </summary> public static void Main() { // Bind any unhandled exceptions in the main thread so that they are logged. AppDomain.CurrentDomain.UnhandledException += OnUnhandledException; // Set correct working directory for compatibility with double-clicking Directory.SetCurrentDirectory(DirectoryHelpers.GetLocalDir()); if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { Environment.SetEnvironmentVariable("GSETTINGS_SCHEMA_DIR", "share\\glib-2.0\\schemas\\"); } log4net.Config.XmlConfigurator.Configure(); Log.Info("----------------"); Log.Info("Initializing Everlook..."); Log.Info("Initializing OpenTK..."); // OpenGL var toolkitOptions = new ToolkitOptions { Backend = PlatformBackend.PreferNative, EnableHighResolution = true }; using (Toolkit.Init(toolkitOptions)) { Log.Info($"OpenTK initialized using the {GetOpenTKBackend()} backend."); Log.Info("Initializing GTK..."); // Bind any unhandled exceptions in the GTK UI so that they are logged. ExceptionManager.UnhandledException += OnGLibUnhandledException; Log.Info("Registering treeview types with the native backend..."); GType nodeType = (GType)typeof(SerializedNode); GType.Register(nodeType, typeof(SerializedNode)); GType referenceType = (GType)typeof(FileReference); GType.Register(referenceType, typeof(FileReference)); // GTK IconManager.LoadEmbeddedIcons(); Application.Init(); MainWindow win = MainWindow.Create(); win.Show(); Application.Run(); } }
/// <summary> /// The entry point. /// </summary> public static void Main() { // Bind any unhandled exceptions in the main thread so that they are logged. AppDomain.CurrentDomain.UnhandledException += OnUnhandledException; // Set correct working directory for compatibility with double-clicking Directory.SetCurrentDirectory(DirectoryHelpers.GetLocalDir()); log4net.Config.XmlConfigurator.Configure(); Log.Info("----------------"); Log.Info("Initializing Everlook..."); Log.Info("Initializing OpenTK..."); // OpenGL Toolkit.Init(new ToolkitOptions { Backend = PlatformBackend.PreferNative }); Log.Info($"OpenTK initialized using the {GetOpenTKBackend()} backend."); Log.Info("Initializing GTK..."); // Bind any unhandled exceptions in the GTK UI so that they are logged. ExceptionManager.UnhandledException += OnGLibUnhandledException; Log.Info("Registering treeview types with the native backend..."); GType nodeType = (GType)typeof(FileNode); GType.Register(nodeType, typeof(FileNode)); GType referenceType = (GType)typeof(FileReference); GType.Register(referenceType, typeof(FileReference)); // GTK IconManager.LoadEmbeddedIcons(); Application.Init(); MainWindow win = MainWindow.Create(); win.Show(); Application.Run(); }