Пример #1
0
        private void FinishConnect()
        {
            JTAGClient.AJI_HARDWARE selectedHardware = (JTAGClient.AJI_HARDWARE)cableDropdown.SelectedItem;
            connectLabel.Text = string.Format("Connected to {0} on {1}", deviceList.SelectedItem, selectedHardware);

            disconnectButton.Enabled = true;
        }
Пример #2
0
        private void connectButton_Click(object sender, EventArgs e)
        {
            try
            {
                object selectedHardwareItem = cableDropdown.SelectedItem;

                if (selectedHardwareItem == null)
                {
                    return;
                }

                if (deviceList.SelectedIndex == -1)
                {
                    return;
                }

                JTAGClient.AJI_HARDWARE selectedHardware = (JTAGClient.AJI_HARDWARE)selectedHardwareItem;

                DebugDevice.Connect(string.Format("{0} [{1}]", selectedHardware.cableName, selectedHardware.cablePort), deviceList.SelectedIndex, 1);
                network.Connect();

                connectButton.Enabled = false;
            }
            catch (JTAGException ex)
            {
                MessageBox.Show(String.Format("Could not connect to JTAG, error was: {0}", ex.Message), "Connection Error",
                                MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Пример #3
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);
            }
        }