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); }
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); }
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()); }
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); }