private static void ConnectEventHandler(object sender, EventArgs e) { if (iphone.IsConnected) { Console.WriteLine("设备(链接句柄{0})已连接,正在开启SSH隧道", iphone.Device.ToString()); Thread thread1 = new Thread(() => { iphone.CreateUSBMuxConnect(port); }); thread1.Start(); ThreadCount++; Console.WriteLine("设备(链接句柄{0})SSH隧道已建立成功", iphone.Device.ToString()); } else { Console.WriteLine("设备(链接句柄{0})断开链接", iphone.Device.ToString()); ThreadCount--; } }