private void tsbtnServerSwitch_Click(object sender, EventArgs e) { if (!switchisalive && hostEnable && !FormLogin.SwitchOpen) { switchisalive = true; var ff = new formSwitchServer(); ff.FormClosed += (ss, ee) => { switchisalive = false; }; ff.Show(); } }
private void btnSwitchServer_Click(object sender, EventArgs e) { if (!SwitchOpen&&formSelectTicket.hostEnable) { SwitchOpen = true; var ff = new formSwitchServer(); ff.FormClosed += (ss, ee) => { SwitchOpen = false; }; ff.Show(); } }