static void Main() { StaticConfigurationManager.Initialize(); StaticConfigurationManager.ConfigurationManager.SetString("LogDir", "VortexEditor"); StaticConsole.Initialize(); Logger.Add(new ConsoleLogger { LoggerLevel = LoggerLevel.Trace }); Logger.Add(new FileLogger()); AppDomain.CurrentDomain.UnhandledException += UnhandledExceptionEventHandler; Lookup.AddPath("."); Lookup.AddPath(@"Layouts"); Lookup.AddPath(@"..\..\GobosData", true); var windowAttributes = new WindowAttributes { Width = 800, Height = 600, Title = "GuiSandbox", AllowResize = true }; using (var sample = new EditorWindow(windowAttributes)) { sample.Run(); } }
static void Main() { StaticConfigurationManager.Initialize(); StaticConfigurationManager.ConfigurationManager.RegisterSource(new FileConfigurationSource("epicedit.cfg")); StaticConsole.Initialize(); StandardCommands.Attach(); StaticConfigurationManager.ConfigurationManager.SetString("LogDir", "EpicEdit"); Logger.Add(new CommandPromptLogger { LoggerLevel = LoggerLevel.Trace }); Logger.Add(new FileLogger { FlushAfterEachWrite = true, LoggerLevel = LoggerLevel.Debug }); Logger.Add(new ConsoleLogger { LoggerLevel = LoggerLevel.Info }); var dataPath = StaticConfigurationManager.ConfigurationManager.GetString("DataPath"); Lookup.AddPath(".", true); if (!string.IsNullOrEmpty(dataPath)) { Lookup.AddPath(dataPath, true); } Lookup.DumpPaths(); var windowAttributes = new WindowAttributes { Width = 1024, Height = 768, Title = GetWindowTitle(), AllowResize = true }; AppDomain.CurrentDomain.UnhandledException += (sender, eventArgs) => Logger.WriteException((Exception)eventArgs.ExceptionObject); using (var window = new EditorWindow(windowAttributes)) { window.Run(); } }