void ShowPopForm(object sender, EventArgs e) { if (popForm != null) { popForm.Activate(); } else { if (this.controller.IsLogin()) { popForm = clientForm = new ClientForm(this.controller); } else { popForm = loginForm = new LoginForm(this.controller); } popForm.Show(); popForm.Activate(); popForm.FormClosed += PopForm_FormClosed; } }
void PopForm_FormClosed(object sender, FormClosedEventArgs e) { loginForm = null; clientForm = null; popForm = null; }
void ShowPopForm(object sender, EventArgs e) { if (popForm != null) popForm.Activate(); else { if (this.controller.IsLogin()) { popForm = clientForm = new ClientForm(this.controller); } else { popForm = loginForm = new LoginForm(this.controller); } popForm.Show(); popForm.Activate(); popForm.FormClosed += PopForm_FormClosed; } }