Form1_28.cs - using using using using using using using...

This preview shows page 1 - 2 out of 2 pages.

using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Threading.Tasks;using System.Windows.Forms;using System.Threading;using System.Web;using lj;using LabJack.LabJackUD;namespace FormTest{public partial class Form1 : Form{public Form1(){InitializeComponent();}private void Form1_Load(object sender, EventArgs e){Thread t1 = new Thread(new ThreadStart(DetectRun));t1.Start();}void DetectRun(){while(true){int[] idList = GetAllLabJacks();// Check to see if any LabJacks were foundif (idList.Length != 0){MessageBox.Show("LabJack pluged in!");break;}Thread.Sleep(3000);}}public static int[] GetAllLabJacks(){// Make sure we allocate space for what is passedint[] productIDList = new int[127];int[] serialNumList = new int[127];

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture