public void SetDeviceTitelBkColor(LANAllComputerIp.ComputerStatus st) { if (st == LANAllComputerIp.ComputerStatus.ON_LINE) { device.SetDeviceColor(Color.FromArgb(24, 121, 231)); } else { device.SetDeviceColor(Color.FromArgb(214, 214, 214)); } }
//组包发给子服务 public static void SendPackToSubService(string ip, LANAllComputerIp.ComputerStatus cs) { PacketInfo pinfo = new PacketInfo(); LANAllComputerIp lan = new LANAllComputerIp(); lan.GetLocalMachineIp(); lan.localMachine.status = cs; pinfo.ip.Add(lan.localMachine); SoftInfo sinfo = new SoftInfo(); sinfo.SoftName = "coach.exe"; sinfo.status = SoftStatus.Init; pinfo.soft.Add(sinfo); Packet pt = new Packet(); var data = pt.Package(pinfo); Form_Main.sc.SendInfo(ip, data); }
private void SendDataTest(LANAllComputerIp.ComputerStatus cs) { PacketInfo pinfo = new PacketInfo(); LANAllComputerIp lan = new LANAllComputerIp(); lan.GetLocalMachineIp(); lan.localMachine.status = cs; pinfo.ip.Add(lan.localMachine); SoftInfo sinfo = new SoftInfo(); sinfo.SoftName = "coach.exe"; sinfo.status = SoftStatus.Init; pinfo.soft.Add(sinfo); Packet pt = new Packet(); var data = pt.Package(pinfo); sc.SendInfo(/*lan.localMachine.ip*/ "172.16.0.125", data);//206 }