protected static void ActivateConsole() { if (form == null) { hideTimer = new Timer(); hideTimer.Interval = 1000; hideTimer.Tick += new EventHandler(hideTimer_Tick); form = new DebugConsoleForm(); form.FormClosed += new FormClosedEventHandler(form_FormClosed); form.Show(); // form.SendToBack(); } else { hideTimer.Start(); } }
static void form_FormClosed(object sender, FormClosedEventArgs e) { form = null; }