private static void Main(string[] args) { if (!AttachConsole(ATTACH_PARENT_PROCESS)) { AllocConsole(); } System.Threading.Thread.Sleep(2000); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); try { GR.Initialize(); Application.Run(new MainForm()); } catch (Exception ex) { SimpleLogger.Logger.Log(ex.StackTrace + Environment.NewLine + ex.Message); GR.Instance.OutputCtrl.SetAllIngredientOff(); } finally { GR.Instance.Dispose(); FreeConsole(); } }
public static void Initialize() { if (_inst != null) { throw new Exception("GlobalResources already initialized"); } _inst = new GR(); }