Esempio n. 1
0
        //Start Test
        private void button_test_Click(object sender, EventArgs e)
        {
            if (this.dataGridView1.SelectedRows.Count <= 0)
            {
                MessageBox.Show("Please select a wocket");
                return;
            }

            this.button_test.Enabled = false;

            DataGridViewRow selected_row          = this.dataGridView1.SelectedRows[0];
            int             selected_device_index = selected_row.Index;

            this.label_status.Text = "Loading Wocket: " +
                                     ((BluetoothDeviceInfo)bluetoothlist[selected_device_index]).DeviceAddress.ToString().Substring(7);

            Application.DoEvents();

            BluetoothDeviceInfo bt = (BluetoothDeviceInfo)bluetoothlist[selected_device_index];

            WktTestForm = new FormTestWocket(bt.DeviceAddress.ToString(), bt.DeviceName);
            WktTestForm.Show();


            this.label_status.Text   = "...";
            this.button_test.Enabled = true;
        }
Esempio n. 2
0
        //Start Test
        private void button_test_Click(object sender, EventArgs e)
        {
            if (this.dataGridView1.SelectedRows.Count <= 0)
            {
                MessageBox.Show("Please select a wocket");
                return;
            }

            this.button_test.Enabled = false;

            DataGridViewRow selected_row = this.dataGridView1.SelectedRows[0];
            int selected_device_index = selected_row.Index;

            this.label_status.Text = "Loading Wocket: " +
                                     ((BluetoothDeviceInfo)bluetoothlist[selected_device_index]).DeviceAddress.ToString().Substring(7);

            Application.DoEvents();

            BluetoothDeviceInfo bt = (BluetoothDeviceInfo)bluetoothlist[selected_device_index];
            WktTestForm = new FormTestWocket(bt.DeviceAddress.ToString(), bt.DeviceName);
            WktTestForm.Show();

            this.label_status.Text = "...";
            this.button_test.Enabled = true;
        }