static void Main(string[] args) { #if CONSOLE AllocConsole(); #endif if (!System.Diagnostics.Debugger.IsAttached) { Application.ThreadException += Application_ThreadException; AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException; } Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); SplashForm splash = null; if (!System.Diagnostics.Debugger.IsAttached) { splash = new SplashForm(); splash.Show(); Application.DoEvents(); } ClientCore core = new ClientCore(); core.Initialize(args); if (!System.Diagnostics.Debugger.IsAttached) { splash.Close(); splash = null; } Application.Run(core.MainWindow); core.Uninitialize(); Properties.Settings.Default.Save(); #if CONSOLE FreeConsole(); #endif }
public ClientCore() { s_clientCore = this; }
public MainWindow(ClientCore clientCore) { InitializeComponent(); m_clientCore = clientCore; }