private void Menu_Click(object sender, EventArgs e) { var item = sender as ToolStripMenuItem; switch (item.Name) { case "tsmiChangePwd": // 修改密码 using (var form = new FrmChangePwd()) { form.ShowDialog(); } break; case "tsmiAbout": // 关于 using (var form = new FrmAbout()) { form.ShowDialog(); } break; } }
private void LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { var name = (sender as LinkLabel).Name; switch (name) { case "lnkForgetPassword": if (MessageBox.Show("暂不支持密码找回,需要请联系作者。\r\nKey为:" + ActMgr.Instance.Key + "\r\nEmail: [email protected]\r\n主页:http://soye360.com", "温馨提示", MessageBoxButtons.YesNo) == DialogResult.Yes) { Process.Start("mailto://[email protected]"); } break; case "lnkAbout": using (var form = new FrmAbout()) { form.ShowDialog(); } break; } }