private void 判断题ToolStripMenuItem1_Click(object sender, EventArgs e) { UPTF mq = null; if (mq == null || mq.IsDisposed) { mq = new UPTF(pp, -1); // mq.MdiParent = this; mq.Show(); } else { mq.Activate(); mq.WindowState = FormWindowState.Normal; } }
private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e) { if (e.ColumnIndex == 0) { if (listBox1.SelectedIndex == 0) { UPmq mq = null; if (mq == null || mq.IsDisposed) { // pp.showupcc = 0; mq = new UPmq(pp, int.Parse(dataGridView1.Rows[e.RowIndex].Cells[0].Value.ToString())); // mq.MdiParent = this; mq.Show(); } else { mq.Activate(); mq.WindowState = FormWindowState.Normal; } } ////////////////////////////////////////// if (listBox1.SelectedIndex == 1) { UPTF mq = null; if (mq == null || mq.IsDisposed) { // pp.showupcc = 0; mq = new UPTF(pp, int.Parse(dataGridView1.Rows[e.RowIndex].Cells[0].Value.ToString())); // mq.MdiParent = this; mq.Show(); } else { mq.Activate(); mq.WindowState = FormWindowState.Normal; } } /////////////////////////////////////////////////// if (listBox1.SelectedIndex == 3) { UPS mq = null; if (mq == null || mq.IsDisposed) { // pp.showupcc = 0; mq = new UPS(pp, int.Parse(dataGridView1.Rows[e.RowIndex].Cells[0].Value.ToString())); // mq.MdiParent = this; mq.Show(); } else { mq.Activate(); mq.WindowState = FormWindowState.Normal; } } /////////////////////////////////////////////////// if (listBox1.SelectedIndex == 4) { UPA mq = null; if (mq == null || mq.IsDisposed) { // pp.showupcc = 0; mq = new UPA(pp, int.Parse(dataGridView1.Rows[e.RowIndex].Cells[0].Value.ToString())); // mq.MdiParent = this; mq.Show(); } else { mq.Activate(); mq.WindowState = FormWindowState.Normal; } } }//end col }
private void dataGridView1_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e) { if (e.RowIndex >= 0) { exerDetail ted = tled[e.RowIndex]; if (ted.typeq == 0) { UPmq mq = null; if (mq == null || mq.IsDisposed) { // pp.showupcc = 0; mq = new UPmq(pp, ted.qid); // mq.MdiParent = this; mq.Show(); } else { mq.Activate(); mq.WindowState = FormWindowState.Normal; } } ////////////////////////////////////////// if (ted.typeq == 1) { UPTF mq = null; if (mq == null || mq.IsDisposed) { // pp.showupcc = 0; mq = new UPTF(pp, ted.qid); // mq.MdiParent = this; mq.Show(); } else { mq.Activate(); mq.WindowState = FormWindowState.Normal; } } /////////////////////////// if (ted.typeq == 2) { UPE mq = null; if (mq == null || mq.IsDisposed) { // pp.showupcc = 0; mq = new UPE(pp, ted.qid); // mq.MdiParent = this; mq.Show(); } else { mq.Activate(); mq.WindowState = FormWindowState.Normal; } } /////////////////////////////////////////////////// if (ted.typeq == 3) { UPS mq = null; if (mq == null || mq.IsDisposed) { // pp.showupcc = 0; mq = new UPS(pp, ted.qid); // mq.MdiParent = this; mq.Show(); } else { mq.Activate(); mq.WindowState = FormWindowState.Normal; } } /////////////////////////////////////////////////// if (ted.typeq == 4) { UPA mq = null; if (mq == null || mq.IsDisposed) { // pp.showupcc = 0; mq = new UPA(pp, ted.qid); // mq.MdiParent = this; mq.Show(); } else { mq.Activate(); mq.WindowState = FormWindowState.Normal; } } }//end col }