private void AddButton_Click(object sender, EventArgs e)
        {
            DisableButtons();

            byte[] temp = AddressHexadecimalTextBox.ToByteArray();
            I2CTest.Address = Convert.ToInt32(temp[0]);

            if ((string)ActionComboBox.SelectedItem == "Read")
            {
                I2CTest.Action = MTKI2CTestType.Read;
            }
            else if ((string)ActionComboBox.SelectedItem == "Write")
            {
                I2CTest.Action = MTKI2CTestType.Write;
            }

            I2CTest.DataBuffer = DataHexadecimalTextBox.ToByteArray();
            I2CTest.NumRxBytes = I2CTest.DataBuffer.Count();

            I2CTest.ValidateRxData = VerifyCheckBox.Checked;

            if ((I2CTest.Action != MTKI2CTestType.Write) && (I2CTest.Action != MTKI2CTestType.Read))
            {
                MessageBox.Show("Action not configured correctly", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            I2CTestArray.Add(I2CTest);
            I2CTest = new UnitI2CTest();
            RefreshTable();

            EnableButtons();
        }
 private void AddressHexadecimalTextBox_TextChanged(object sender, EventArgs e)
 {
     byte[] temp = AddressHexadecimalTextBox.ToByteArray();
     if (temp.Count() > 0)
     {
         I2CTest.Address = Convert.ToInt32(temp[0]);
     }
 }