DeviceInfo.cs 973 B

123456789101112131415161718192021222324252627282930313233
  1. using GeneralData;
  2. namespace EEMSUIClient.Models;
  3. public class DeviceInfo
  4. {
  5. public DeviceModel DeviceModel { get; set; }
  6. public string? DeviceSubModel { get; set; }
  7. public string? DeviceName { get; set; }
  8. public string? Position { get; set; }
  9. public string? SoftwareVersion { get; set; }
  10. public Guid? Guid { get; set; }
  11. public string? IP { get; set; }
  12. public ushort Port { get; set; }
  13. public string? DBConnectionString { get; set; }
  14. public Device.DeviceInfo Convert()
  15. {
  16. return new Device.DeviceInfo()
  17. {
  18. DeviceModel = this.DeviceModel,
  19. DeviceSubModel = this.DeviceSubModel,
  20. DeviceName = this.DeviceName,
  21. Position = this.Position,
  22. SoftwareVersion = this.SoftwareVersion,
  23. Guid = this.Guid,
  24. IP = this.IP ?? string.Empty,
  25. Port = this.Port,
  26. DBConnectionString = this.DBConnectionString
  27. };
  28. }
  29. }