if (Others.g_connectState[Others.blueDeviceId] == true) //通过蓝牙名称找到对应的连接 Others.g_blueClients[Others.blueDeviceId].GetStream().Write(buffer.ToArray(),0,buffer.Count); if (Others.g_blueDeviceAddresses.ContainsKey(Others.g_blueDevicesNames[Others.blueDeviceId])) { Others.g_blueClients[Others.blueDeviceId] = null; Others.g_blueDeviceAddresses.Remove(Others.g_blueDevicesNames[Others.blueDeviceId]); } Others.g_connectState[Others.blueDeviceId] = false; Console.WriteLine("ReturnSyncTimeError:" + Others.g_blueDevicesNames[Others.blueDeviceId] + "连接已断开!\r" + DateTime.Now);