private void run_Click(object sender, EventArgs e) { if (!onoff) { onoff = true; try { try { KillAll(procnamecfg(handler.loginexepath)); KillAll(procnamecfg(handler.charexepath)); KillAll(procnamecfg(handler.mapexepath)); } catch { } RTBLogin.Clear(); RTBChar.Clear(); RTBMap.Clear(); RunWithRedirect(handler.loginexepath); RunWithRedirect(handler.charexepath); RunWithRedirect(handler.mapexepath); } catch (Exception err) { MessageBox.Show(err.Message + "\n" + err.StackTrace); } } }
private void tc_startstop_Click(object sender, EventArgs e) { if (onoff) { onoff = false; debugmsgs = 0; sqlmsgs = 0; errormsgs = 0; warnmsgs = 0; playermsgs = 0; lb_debug.Text = "Debug: " + debugmsgs; lb_sql.Text = "SQL: " + sqlmsgs; lb_error.Text = "Error: " + errormsgs; lb_users.Text = "" + playermsgs; lb_warnings.Text = "Warning: " + warnmsgs; KillAll(procnamecfg(handler.loginexepath)); KillAll(procnamecfg(handler.charexepath)); KillAll(procnamecfg(handler.mapexepath)); } else { onoff = true; try { try { KillAll(procnamecfg(handler.loginexepath)); KillAll(procnamecfg(handler.charexepath)); KillAll(procnamecfg(handler.mapexepath)); } catch { } RTBLogin.Clear(); RTBChar.Clear(); RTBMap.Clear(); RunWithRedirect(handler.loginexepath); RunWithRedirect(handler.charexepath); RunWithRedirect(handler.mapexepath); } catch (Exception err) { MessageBox.Show(err.Message + "\n" + err.StackTrace); } } }