2
0

HardwareModel.cs 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. using System;
  2. using System.Collections.Generic;
  3. namespace Optimizer
  4. {
  5. public sealed class CPU
  6. {
  7. public string Name { get; set; }
  8. public ByteSize L2CacheSize { get; set; }
  9. public ByteSize L3CacheSize { get; set; }
  10. public UInt32 Cores { get; set; }
  11. public UInt32 Threads { get; set; }
  12. public UInt32 LogicalCpus { get; set; }
  13. public string Virtualization { get; set; }
  14. public string DataExecutionPrevention { get; set; }
  15. public string Stepping { get; set; }
  16. public string Revision { get; set; }
  17. }
  18. public sealed class RAM
  19. {
  20. public string BankLabel { get; set; }
  21. public ByteSize Capacity { get; set; }
  22. public string FormFactor { get; set; }
  23. public string Manufacturer { get; set; }
  24. public string MemoryType { get; set; }
  25. public UInt32 Speed { get; set; }
  26. }
  27. public sealed class VirtualMemory
  28. {
  29. public ByteSize TotalVirtualMemory { get; set; }
  30. public ByteSize AvailableVirtualMemory { get; set; }
  31. public ByteSize UsedVirtualMemory { get; set; }
  32. }
  33. public sealed class GPU
  34. {
  35. public string Name { get; set; }
  36. public ByteSize Memory { get; set; }
  37. public UInt32 ResolutionX { get; set; }
  38. public UInt32 ResolutionY { get; set; }
  39. public UInt32 RefreshRate { get; set; }
  40. public string DACType { get; set; }
  41. public string VideoMemoryType { get; set; }
  42. }
  43. public sealed class Disk
  44. {
  45. public UInt32 BytesPerSector { get; set; }
  46. public string FirmwareRevision { get; set; }
  47. public string MediaType { get; set; }
  48. public string Model { get; set; }
  49. public ByteSize Capacity { get; set; }
  50. }
  51. public sealed class Volume
  52. {
  53. public UInt64 BlockSize { get; set; }
  54. public ByteSize Capacity { get; set; }
  55. public string Compressed { get; set; }
  56. public string DriveLetter { get; set; }
  57. public string DriveType { get; set; }
  58. public string FileSystem { get; set; }
  59. public ByteSize FreeSpace { get; set; }
  60. public ByteSize UsedSpace { get; set; }
  61. public string Indexing { get; set; }
  62. public string Label { get; set; }
  63. }
  64. public sealed class NetworkDevice
  65. {
  66. public string AdapterType { get; set; }
  67. public string Manufacturer { get; set; }
  68. public string ProductName { get; set; }
  69. public string PhysicalAdapter { get; set; }
  70. public string MacAddress { get; set; }
  71. public string ServiceName { get; set; }
  72. }
  73. public sealed class Keyboard
  74. {
  75. public string Name { get; set; }
  76. public string Layout { get; set; }
  77. public string Status { get; set; }
  78. public UInt16 FunctionKeys { get; set; }
  79. public string Locked { get; set; }
  80. }
  81. public sealed class PointingDevice
  82. {
  83. public string Name { get; set; }
  84. public string Manufacturer { get; set; }
  85. public string Status { get; set; }
  86. public UInt16 Buttons { get; set; }
  87. public string Locked { get; set; }
  88. public string HardwareType { get; set; }
  89. public string PointingType { get; set; }
  90. public string DeviceInterface { get; set; }
  91. }
  92. public sealed class AudioDevice
  93. {
  94. public string ProductName { get; set; }
  95. public string Manufacturer { get; set; }
  96. public string Status { get; set; }
  97. }
  98. public sealed class Motherboard
  99. {
  100. public string Model { get; set; }
  101. public string Manufacturer { get; set; }
  102. public string Chipset { get; set; }
  103. public string Product { get; set; }
  104. public string Version { get; set; }
  105. public string Revision { get; set; }
  106. public string SystemModel { get; set; }
  107. public string BIOSName { get; set; }
  108. public string BIOSManufacturer { get; set; }
  109. public string BIOSVersion { get; set; }
  110. public string BIOSBuildNumber { get; set; }
  111. }
  112. public static class HardwareSummary
  113. {
  114. public static List<string> CPUs = new List<string>();
  115. public static string TotalRAM = string.Empty;
  116. public static List<string> Motherboards = new List<string>();
  117. public static List<string> GPUs = new List<string>();
  118. public static List<string> Disks = new List<string>();
  119. public static List<string> NetworkAdapters = new List<string>();
  120. public static List<string> BIOS = new List<string>();
  121. public static List<string> OSInfo = new List<string>();
  122. }
  123. }