private void button10_Click(object sender, EventArgs e) { if (listBox1.SelectedIndex >= 0 && pp.teacher.teacherid == "1536") { Dcheck mq = null; if (mq == null || mq.IsDisposed) { mq = new Dcheck(pp, l1[listBox1.SelectedIndex]); mq.ShowDialog(); // mq.Show(); } else { mq.Activate(); mq.WindowState = FormWindowState.Normal; } } else { MessageBox.Show("没必要啊"); } }
private void button8_Click(object sender, EventArgs e) { int irow = -1; if (dataGridView1.CurrentRow != null) { irow = dataGridView1.CurrentRow.Index; } if (irow >= 0 && pp.teacher.teacherid == "1536") { Dcheck mq = null; if (mq == null || mq.IsDisposed) { mq = new Dcheck(pp, tlvedp[irow]); mq.ShowDialog(); // mq.Show(); } else { mq.Activate(); mq.WindowState = FormWindowState.Normal; } } else { MessageBox.Show("没必要啊"); } }