Exemplo n.º 1
0
        public HDeviceInfo[] GetDevices()
        {
            HDeviceInfo[] devices = new HDeviceInfo[this.devices_.Count];
            for (int i = 0; i < this.devices_.Count; i++)
            {
                devices[i] = (HDeviceInfo)this.devices_[i];
            }

            return(devices);
        }
Exemplo n.º 2
0
        private void AddDevice(string id, IPEndPoint address)
        {
            HDeviceInfo info = new HDeviceInfo();

            info.id = id;
            info.ip = address.Address.ToString();
            int ip = (int)address.Address.Address;

            this.devices_.Add(info);
        }
Exemplo n.º 3
0
 public HDeviceInfo GetDeviceInfo(string id)
 {
     for (int i = 0; i < this.devices_.Count; i++)
     {
         HDeviceInfo info = (HDeviceInfo)this.devices_[i];
         if (info.id.Contains(id))
         {
             return(info);
         }
     }
     return(new HDeviceInfo());
 }
Exemplo n.º 4
0
 private bool FindDeviceID(string id)
 {
     for (int i = 0; i < this.devices_.Count; i++)
     {
         HDeviceInfo info = (HDeviceInfo)this.devices_[i];
         if (info.id == id)
         {
             return(true);
         }
     }
     return(false);
 }