Esempio n. 1
0
        private void TestSockets()
        {
            sc.RD += Sc_RD;
            LANAllComputerIp lan = new LANAllComputerIp();

            lan.GetLocalMachineIp();
            sc.Start(lan.localMachine.ip);
        }
Esempio n. 2
0
        //组包发给子服务
        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);
        }
Esempio n. 3
0
        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
        }
Esempio n. 4
0
 private void InitObj()
 {
     scan         = new LANAllComputerIp();
     scan.Kii    += Scan_Kii;
     devices_list = new List <Form_Show>();
 }