public static void Init(string[] args) { System.Threading.Thread.CurrentThread.Name = "Main"; Assembly asm = Assembly.GetAssembly(typeof(Frontend)); AssemblyName asm_name = asm.GetName(false); AssemblyProductAttribute pr = (AssemblyProductAttribute)asm. GetCustomAttributes(typeof(AssemblyProductAttribute), false)[0]; _Version = asm_name.Version; _VersionNumber = asm_name.Version.ToString(); _VersionString = pr.Product + " - " + _UIName + " frontend " + _Version; #if LOG4NET _Logger.Info(_VersionString + " starting"); #endif // We don't want to put any XP/Vista users by using the dull ugly // unthemed interface. Application.EnableVisualStyles() should be // called before any form is displayed. Application.EnableVisualStyles(); _SplashScreenWindow = new SplashScreenWindow(); _MainWindow = new MainWindow(); // HACK: force creation of window handle, else the engine will have problems adding stuff IntPtr handle = _MainWindow.Handle; _FrontendConfig = new FrontendConfig(UIName); // loading and setting defaults _FrontendConfig.Load(); _FrontendConfig.Save(); if (_FrontendConfig.IsCleanConfig) { /*TODO: Create and show first run wizard*/ } else { if (((string)FrontendConfig["Engines/Default"]).Length == 0) { InitLocalEngine(); } else { // there is a default engine set, means we want a remote engine /*TODO: Create and show Engine Manager Dialog*/ // HACK: for now always use local engine InitLocalEngine(); } } // TODO: Kill the SplashScreen Window _SplashScreenWindow.Close(); /*TODO: Set the main message loop*/ Application.Run(_MainWindow); #if LOG4NET _Logger.Warn("Application.Run() returned!"); #endif }