private void testsToolStripMenuItem_Click(object sender, EventArgs e)
 {
     frmConfig frm = new frmConfig();
     frm.ShowDialog();
 }
        private void new_test()
        {
            if (current_test_number == NULL_PROG_NUMBER)
            {
                Configuration configuration;
                while (true)
                {
                    String tool = "";
                    String temp = "";
                    String part = "";

                    if (InputDialogBox.Show("Part",
                        "&Enter or Scan Part Number(Type 'exit' to exit, or enter Password)", ref temp) == DialogResult.OK)
                    {

                        int index = temp.IndexOf("*");
                        part  = index >= 0 ? temp.Substring(0, index) : temp;
                    }

                    if (temp == "exit")
                    {
                        Environment.Exit(0);
                    } else if (temp == "configure") {
                        frmConfig frm = new frmConfig();
                        frm.ShowDialog();
                    }

                    temp = "";

                    if (InputDialogBox.Show("tool",
                        "&Enter tool (Type 'exit' in the box to exit):", ref temp) == DialogResult.OK)
                    {
                        int index = temp.IndexOf("*");
                        tool = index >= 0 ? temp.Substring(0, index) : temp;
                    }
                    if (temp == "exit")
                    {
                        Environment.Exit(0);
                    } else if (temp == "configure") {
                        frmConfig frm = new frmConfig();
                        frm.ShowDialog();
                    }

                    if (!(tool == null || tool == String.Empty) &&
                        !(part == null || part == String.Empty))
                    {
                        configuration = DATABASE.getConfiguration(tool, part);
                        if (configuration.program == null || configuration.program == String.Empty) {
                            MessageBox.Show("No configuration exists with those parameters. Please Scan again");
                            continue;
                        }
                        CURRENT_RUNNING_CONFIG = configuration;

                        break;
                    }
                }
                //Done loop
            }
            //done checking if null test.
            String pgm = CURRENT_RUNNING_CONFIG.program;
            txtLotSize.Text = CURRENT_RUNNING_CONFIG.lotsize;
            TESTS_IN_LOT = int.Parse(CURRENT_RUNNING_CONFIG.lotsize);
            change_program(pgm);
            //comOptions.comPort.Write("M\\S1TCAP="+pgm + ENDL);
        }