Пример #1
0
 public static void ManipClientObject(ThisDevice thisObject)
 {
     if (thisObject.data == "REMOVE_THIS_DEVICE")
     {
         UpdateFlag = 1;
         ListClient.Remove(thisObject);
     }
     else
     {
         foreach (var item in ListClient)
         {
             if (item.address.Equals(thisObject.address))
             {
                 if (!item.data.Equals(thisObject.data))
                 {
                     item.data = thisObject.data;
                 }
             }
         }
         if (thisObject.flag == 1)
         {
             UpdateFlag = 1;
             ListClient.Add(thisObject);
             Cnt++;
             thisObject.flag = 1;
         }
     }
 }
Пример #2
0
 public static void GetCompiled(IPAddress addr)
 {
     thisDeviceInfo           = new ThisDevice();
     thisDeviceInfo.ipEp      = new IPEndPoint(addr, 8810);
     thisDeviceInfo.aliasName = "Ras";
     thisDeviceInfo.address   = addr.ToString();
     thisDeviceInfo.password  = "******";
 }