private void debugToolStripMenuItem_Click(object sender, EventArgs e) { ToolStripMenuItem menuItem = (ToolStripMenuItem)sender; menuItem.Checked = !menuItem.Checked; if (menuItem.Checked) { ConsoleU.createConsole(); } else { ConsoleU.releaseConsole(); } }
static void Main(string[] args) { #if _DEBUG //Directory::SetCurrentDirectory(String::Format("{0}/../Release", AppDomain.CurrentDomain->BaseDirectory)); Directory.SetCurrentDirectory(String.Format("{0}/../Release",AppDomain.CurrentDomain.BaseDirectory); #else Directory.SetCurrentDirectory(AppDomain.CurrentDomain.BaseDirectory); #endif //#ifndef _DEBUG //try { //#endif // check multiple instances if (!ProcessU.multiple(args)) { System.Environment.Exit(0); } // check open console if (Array.IndexOf(args, "-debug") >= 0) { // create but not log ConsoleU.createConsole(); ConsoleU.hide(); } // check log file if (Array.IndexOf(args, "-log") >= 0) { ConsoleU.createConsole(true); ConsoleU.hide(); } Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new gf_main(args)); //Application.Run(new soc_remote.gf_remote()); }