public DataTable PopulateTable(List <string[]> listIn)
        {
            FileSelectedLabel.Text = "List count: " + listIn.Count();
            FileSelectedLabel.Update();
            DataTable tableOut = InitializeTable();
            int       counter  = 0;

            while (tableOut.Rows.Count < listIn.Count())
            {
                counter++;
                tableOut.Rows.Add();
                FileSelectedLabel.Text = "Adding Rows: " + counter.ToString();
                FileSelectedLabel.Update();
            }
            for (int i = 0; i < listIn.Count(); i++)
            {
                if (listIn[i] == null)
                {
                    continue;
                }
                for (int j = 0; j < listIn[i].Count(); j++)
                {
                    if (listIn[i][j] != null && listIn.Count() > 0)
                    {
                        tableOut.Rows[i][j] = listIn[i][j];
                    }
                }
            }
            return(tableOut);
        }
        private void button1_Click(object sender, EventArgs e)
        {
            OpenFileDialog openFileDialog1 = new OpenFileDialog();

            openFileDialog1.InitialDirectory = @"C:\Users\SmithS3\Documents\";
            openFileDialog1.Filter           = "excel files (*.xlsx)|*.xlsx|All files (*.*)|*.*";
            openFileDialog1.FilterIndex      = 2;
            openFileDialog1.RestoreDirectory = true;

            if (openFileDialog1.ShowDialog() == DialogResult.OK)
            {
                try
                {
                    if ((QubitFileInString = openFileDialog1.FileName) != null)
                    {
                        FileSelectedLabel.Text = QubitFileInString + "\nSelected";
                        FileSelectedLabel.Update();
                        if (testFile())
                        {
                            ProcessInputButton.Enabled = true;
                        }
                    }
                }
                catch (Exception ex)
                {
                    MessageBox.Show("Error: Could not read file from disk. Original error: " + ex.Message);
                }
            }
        }
 private void textBox2_TextChanged(object sender, EventArgs e)
 {
     try
     {
         dnaConcetrationFinal   = float.Parse(textBox2.Text);
         FileSelectedLabel.Text = "Dna final concentration = " + dnaConcetrationFinal + "uL";
         FileSelectedLabel.Update();
     }
     catch
     {
         MessageBox.Show("Use a float", "flooooooatt");
         textBox2.Text = string.Empty;
     }
 }
 private void textBox1_TextChanged(object sender, EventArgs e)
 {
     try
     {
         dnaVolumeInitial       = float.Parse(textBox1.Text);
         FileSelectedLabel.Text = "Dna input = " + dnaVolumeInitial + "uL";
         FileSelectedLabel.Update();
     }
     catch
     {
         MessageBox.Show("Use a float", "flooooooatt");
         textBox1.Text = string.Empty;
     }
 }