/// <summary> /// Checks for new devices. /// </summary> /// <returns></returns> private IEnumerable <TC08Device> CheckForNewDevices() { short handle = 0; while ((handle = TC08DeviceImports.OpenUnit()) > 0) { TC08Device device = new TC08Device(handle, OnClosed); Trace.WriteLine("Device Found - \r\n" + device.DeviceInfo); yield return(device); } }
public override bool Equals(object obj) { TC08Device device = obj as TC08Device; return(device != null && Handle.Equals(device.Handle)); }