Ejemplo n.º 1
0
        private void button2_Click(object sender, EventArgs e)
        {
            int irow = -1;

            if (dataGridView1.CurrentRow != null)
            {
                irow = dataGridView1.CurrentRow.Index;
            }
            if (irow >= 0 && comboBox7.SelectedIndex >= 0)
            {
                //pp.vdlword=
                EditTestPaper mq = null;
                if (mq == null || mq.IsDisposed)
                {
                    pp.elword  = tlvedp[irow];
                    pp.vdlword = lcs[comboBox7.SelectedIndex];
                    mq         = new EditTestPaper(pp, tlvedp[irow], lcs[comboBox7.SelectedIndex]);
                    mq.ShowDialog();
                    // mq.Show();
                }
                else
                {
                    mq.Activate();
                    mq.WindowState = FormWindowState.Normal;
                }
            }
            else
            {
                MessageBox.Show("请选择练习!or 课程");
            }
        }
Ejemplo n.º 2
0
        private void button2_Click(object sender, EventArgs e)
        {
            if (listBox1.SelectedIndex >= 0)
            {   //summary
                pp.vdlword = null;
                pp.elword  = null;

                //summary
                pp.exerl1 = l1[listBox1.SelectedIndex].id;
                pp.cc1    = l1[listBox1.SelectedIndex].courseid;

                /*
                 * EditererList mq = null;
                 * if (mq == null || mq.IsDisposed)
                 * {
                 *  mq = new EditererList(pp);
                 *  mq.ShowDialog();
                 *  // mq.Show();
                 * }
                 * else
                 * {
                 *  mq.Activate();
                 *  mq.WindowState = FormWindowState.Normal;
                 * }
                 * }
                 * else
                 * {
                 * MessageBox.Show("请选择练习!");
                 * }*/
                int irow = listBox1.SelectedIndex;
                if (irow >= 0 && comboBox1.SelectedIndex >= 0)
                {
                    //pp.vdlword=
                    EditTestPaper mq = null;
                    if (mq == null || mq.IsDisposed)
                    {
                        pp.elword  = l1[listBox1.SelectedIndex];
                        pp.vdlword = lcs[comboBox1.SelectedIndex];
                        mq         = new EditTestPaper(pp, l1[listBox1.SelectedIndex], lcs[comboBox1.SelectedIndex]);
                        mq.ShowDialog();
                        // mq.Show();
                    }
                    else
                    {
                        mq.Activate();
                        mq.WindowState = FormWindowState.Normal;
                    }
                }
                else
                {
                    MessageBox.Show("请选择练习!or 课程");
                }
            }
        }