Пример #1
0
        private void PopulateCableDropdown()
        {
            try
            {
                JTAGClient.AJI_HARDWARE[] hardware = JTAGClient.GetHardware();

                cableDropdown.Items.Clear();
                foreach (JTAGClient.AJI_HARDWARE h in hardware)
                {
                    cableDropdown.Items.Add(h);
                }
            }
            catch (JTAGClientException e)
            {
                MessageBox.Show(String.Format("Error getting JTAG cables: {0}", e.Message), "JTAG Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Пример #2
0
        private void cableDropdown_SelectedIndexChanged(object sender, EventArgs e)
        {
            try
            {
                JTAGClient.AJI_HARDWARE selectedHardware = (JTAGClient.AJI_HARDWARE)cableDropdown.SelectedItem;

                JTAGClient.AJI_DEVICE[] devices = JTAGClient.GetDevices(selectedHardware.chain);

                deviceList.Items.Clear();
                foreach (JTAGClient.AJI_DEVICE d in devices)
                {
                    deviceList.Items.Add(string.Format("{0} (0x{1,8:X8})", d.deviceName, d.deviceID));
                }
            }
            catch (JTAGClientException ex)
            {
                MessageBox.Show(String.Format("Error getting devices for cable. {0}", ex.Message), "JTAG Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }