private void CarComm_Loaded(object sender, RoutedEventArgs e) { CommHelper = new CommExamine(DeviceIP); trd = new Thread(CommHelper.GetCommStatus); trd.Start(); pingTimer.Start(); pingTimer.Tick += PingTimer_Tick; pingTimer.Interval = TimeSpan.FromSeconds(5); _ColorBinding(); }
private void Comm_Loaded(object sender, RoutedEventArgs e) { _ColorBinding(); //暂时在界面中给IpArr赋值(之后需要在参数配置界面给各车网络设备的IP赋值) AssignCarDeviceIpArr(); for (int i = 0; i < 8; i++) { AddCarComm(i); } pingTimer.Start(); pingTimer.Tick += PingTimer_Tick; pingTimer.Interval = TimeSpan.FromSeconds(5); commHelper = new CommExamine(wirelessIp); Communication.CommLst.Add(commHelper); trd = new Thread(commHelper.GetCommStatus); trd.Start(); }