Exemplo n.º 1
0
        public void AddFormShow(LANAllComputerIp.ComputerIpInfo cr)
        {
            Form_Show fm = new Form_Show();

            fm.FormName = cr.ip;
            fm.TopLevel = false;
            fm.Parent   = flowLayoutPanel1;
            fm.AddDevice(cr.ip, cr.mac);
            fm.RoomList       = roomList;
            fm.RoomName       = roomName;
            fm.OnRoomChanged += Fm_OnRoomChanged;
            flowLayoutPanel1.Controls.Add(fm);
            devices_list.Add(fm);
            fm.Show();
        }
Exemplo n.º 2
0
        public void ProcessPacket(LANAllComputerIp.ComputerIpInfo ipinfo)
        {
            ComputerControl cc = new ComputerControl();

            if (ipinfo.status.Equals(LANAllComputerIp.ComputerStatus.BREAK_LIEN))
            {
                cc.Shutdown("s");//关闭电脑
            }
            else if (ipinfo.status.Equals(LANAllComputerIp.ComputerStatus.ON_LINE))
            {
                //打开电脑
            }
            else if (ipinfo.status.Equals(LANAllComputerIp.ComputerStatus.RESTART))//重启电脑
            {
                cc.Shutdown("r");
            }
        }
Exemplo n.º 3
0
 private void Scan_Kii(LANAllComputerIp.ComputerIpInfo cr)
 {
     if (this != null)
     {
         this.Invoke(new MethodInvoker(delegate
         {
             if (cr != null)
             {
                 var v = IsIncludeFormShow(cr.ip);
                 if (v == null)
                 {
                     AddFormShow(cr);
                 }
                 else
                 {
                     v.SetDeviceTitelBkColor(cr.status);
                 }
             }
         }));
     }
 }