//关闭程序时写注册表离线 static void quitWriteSql() { if (Global.isNormalStatus == false) return; LinkMySql lms = new LinkMySql(); try { lms.conn("update "+Global.sqlUserTable+" set `online`='0' where user_name='" + Global.user_name + "'"); } catch { DialogResult drr = MessageBox.Show("程序关闭时遇到问题,如果无法再次登录软件,请联系售后", "温馨提示", MessageBoxButtons.OKCancel); if (drr == DialogResult.OK) { Global.user_name = ""; Environment.Exit(0); } if (drr == DialogResult.Cancel) { return; } } //try //{ //WebConnect wc = new WebConnect(); // string result = wc.sendStringMessage("http://eztx.cn/eztx/eztx_offline.php?username="******""); // Application.Exit(); //} //catch //{ // MessageBox.Show("程序关闭时遇到问题,如果无法再次登录软件,请联系售后", "温馨提示"); //} }
//关闭程序时写注册表离线 static void quitWriteSql() { LinkMySql lms = new LinkMySql(); try { lms.conn("update "+Global.sqlUserTable+" set `online`='0' where user_name='" + Global.user_name + "'"); } catch { DialogResult drr = MessageBox.Show("程序关闭时遇到问题,如果无法再次登录软件,请联系售后", "温馨提示", MessageBoxButtons.OKCancel); if (drr == DialogResult.OK) { Global.user_name = ""; Environment.Exit(0); } if (drr == DialogResult.Cancel) { Application.Run(new main()); } } }