Hardware.cs 4.6 KB

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