private void btns10_Click(object sender, System.EventArgs e) { //同上2 if (button11.Text.Equals("退出系统")) { //同上2-1 PharmacyManage.INMedicine pmi = new PharmacyManage.INMedicine(); pmi.ShowDialog(); //MessageBox.Show(((Button)sender).Text + "你好,helloworld!"); //通过sender判断激发事件的控件 } }
private void btns9_Click(object sender, System.EventArgs e) { //同上2 if (button11.Text.Equals("Other-Function-one")) { //同上2-1 PharmacyManage.INMedicine pmi = new PharmacyManage.INMedicine(); pmi.ShowDialog(); //MessageBox.Show(((Button)sender).Text + "你好,lvkun !"); //通过sender判断激发事件的控件 } }