public override IDeviceSource[] OnGetDeviceSources() { List <IDeviceSource> list = new List <IDeviceSource>(); DataTable tbl = DBI.Instance.ExecuteHDDeviceDataTable(); foreach (DataRow row in tbl.Rows) { HDDeviceSource item = new HDDeviceSource(row); list.Add(item); } return(list.ToArray()); }
public override IDevice OnCreate(IDeviceSource deviceSource) { HDDeviceSource source = (HDDeviceSource)deviceSource; HDDevice d = new HDDevice(); d.Address = source.Address; d.Name = source.DeviceName; d.DeviceSource = source; d.DeviceType = this.Dpu.DeviceType; d.Dpu = this.Dpu; d.Guid = source.Guid; d.StationGuid = source.StationGuid; return(d); }