Bladeren bron

Code cleanup

deadmoon 3 jaren geleden
bovenliggende
commit
3097452c4f
9 gewijzigde bestanden met toevoegingen van 778 en 785 verwijderingen
  1. 4 0
      CHANGELOG.md
  2. 115 115
      Optimizer/Hardware.cs
  3. 477 477
      Optimizer/IndiciumHelper.cs
  4. 13 13
      Optimizer/MainForm.Designer.cs
  5. 2 13
      Optimizer/MainForm.cs
  6. 78 78
      Optimizer/NetworkAdapter.cs
  7. 85 85
      Optimizer/NetworkMonitor.cs
  8. 3 3
      README.md
  9. 1 1
      version.txt

+ 4 - 0
CHANGELOG.md

@@ -2,6 +2,10 @@
 
 All notable changes to this project will be documented in this file.
 
+## [10.0] - 2021-09-14
+- Code cleanup
+- Minor UI changes
+
 ## [9.9] - 2021-08-23
 - New: Fully translated into French (thanks to https://github.com/RAFF47 - RAFF)
 

+ 115 - 115
Optimizer/Hardware.cs

@@ -1,127 +1,127 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
+//using System;
+//using System.Collections.Generic;
+//using System.Linq;
+//using System.Text;
+//using System.Threading.Tasks;
 
-namespace Optimizer
-{
-    public class CPU
-    {
-        public string Name { get; set; }
-        public ByteSize L2CacheSize { get; set; }
-        public ByteSize L3CacheSize { get; set; }
-        public UInt32 Cores { get; set; }
-        public UInt32 Threads { get; set; }
-        public UInt32 LogicalCpus { get; set; }
-        public string Virtualization { get; set; }
-        public string DataExecutionPrevention { get; set; }
-        public string Stepping { get; set; }
-        public string Revision { get; set; }
-    }
+//namespace Optimizer
+//{
+//    public class CPU
+//    {
+//        public string Name { get; set; }
+//        public ByteSize L2CacheSize { get; set; }
+//        public ByteSize L3CacheSize { get; set; }
+//        public UInt32 Cores { get; set; }
+//        public UInt32 Threads { get; set; }
+//        public UInt32 LogicalCpus { get; set; }
+//        public string Virtualization { get; set; }
+//        public string DataExecutionPrevention { get; set; }
+//        public string Stepping { get; set; }
+//        public string Revision { get; set; }
+//    }
 
-    public class RAM
-    {
-        public string BankLabel { get; set; }
-        public UInt64 Capacity { get; set; }
-        public string FormFactor { get; set; }
-        public string Manufacturer { get; set; }
-        public string MemoryType { get; set; }
-        public UInt32 Speed { get; set; }
-    }
+//    public class RAM
+//    {
+//        public string BankLabel { get; set; }
+//        public UInt64 Capacity { get; set; }
+//        public string FormFactor { get; set; }
+//        public string Manufacturer { get; set; }
+//        public string MemoryType { get; set; }
+//        public UInt32 Speed { get; set; }
+//    }
 
-    public class VirtualMemory
-    {
-        public ByteSize TotalVirtualMemory { get; set; }
-        public ByteSize AvailableVirtualMemory { get; set; }
-        public ByteSize UsedVirtualMemory { get; set; }
-    }
+//    public class VirtualMemory
+//    {
+//        public ByteSize TotalVirtualMemory { get; set; }
+//        public ByteSize AvailableVirtualMemory { get; set; }
+//        public ByteSize UsedVirtualMemory { get; set; }
+//    }
 
-    public class GPU
-    {
-        public string Name { get; set; }
-        public ByteSize Memory { get; set; }
-        public UInt32 ResolutionX { get; set; }
-        public UInt32 ResolutionY { get; set; }
-        public UInt32 RefreshRate { get; set; }
-        public string DACType { get; set; }
-        public string VideoMemoryType { get; set; }
-    }
+//    public class GPU
+//    {
+//        public string Name { get; set; }
+//        public ByteSize Memory { get; set; }
+//        public UInt32 ResolutionX { get; set; }
+//        public UInt32 ResolutionY { get; set; }
+//        public UInt32 RefreshRate { get; set; }
+//        public string DACType { get; set; }
+//        public string VideoMemoryType { get; set; }
+//    }
 
-    public class Disk
-    {
-        public UInt32 BytesPerSector { get; set; }
-        public string FirmwareRevision { get; set; }
-        public string MediaType { get; set; }
-        public string Model { get; set; }
-        public ByteSize Capacity { get; set; }
-    }
+//    public class Disk
+//    {
+//        public UInt32 BytesPerSector { get; set; }
+//        public string FirmwareRevision { get; set; }
+//        public string MediaType { get; set; }
+//        public string Model { get; set; }
+//        public ByteSize Capacity { get; set; }
+//    }
 
-    public class Volume
-    {
-        public UInt64 BlockSize { get; set; }
-        public ByteSize Capacity { get; set; }
-        public string Compressed { get; set; }
-        public string DriveLetter { get; set; }
-        public string DriveType { get; set; }
-        public string FileSystem { get; set; }
-        public ByteSize FreeSpace { get; set; }
-        public ByteSize UsedSpace { get; set; }
-        public string Indexing { get; set; }
-        public string Label { get; set; }
-    }
+//    public class Volume
+//    {
+//        public UInt64 BlockSize { get; set; }
+//        public ByteSize Capacity { get; set; }
+//        public string Compressed { get; set; }
+//        public string DriveLetter { get; set; }
+//        public string DriveType { get; set; }
+//        public string FileSystem { get; set; }
+//        public ByteSize FreeSpace { get; set; }
+//        public ByteSize UsedSpace { get; set; }
+//        public string Indexing { get; set; }
+//        public string Label { get; set; }
+//    }
 
-    public class NetworkDevice
-    {
-        public string AdapterType { get; set; }
-        public string Manufacturer { get; set; }
-        public string ProductName { get; set; }
-        public string PhysicalAdapter { get; set; }
-        public string MacAddress { get; set; }
-        public string ServiceName { get; set; }
-    }
+//    public class NetworkDevice
+//    {
+//        public string AdapterType { get; set; }
+//        public string Manufacturer { get; set; }
+//        public string ProductName { get; set; }
+//        public string PhysicalAdapter { get; set; }
+//        public string MacAddress { get; set; }
+//        public string ServiceName { get; set; }
+//    }
 
-    public class Keyboard
-    {
-        public string Name { get; set; }
-        public string Layout { get; set; }
-        public string Status { get; set; }
-        public UInt16 FunctionKeys { get; set; }
-        public string Locked { get; set; }
-    }
+//    public class Keyboard
+//    {
+//        public string Name { get; set; }
+//        public string Layout { get; set; }
+//        public string Status { get; set; }
+//        public UInt16 FunctionKeys { get; set; }
+//        public string Locked { get; set; }
+//    }
 
-    public class PointingDevice
-    {
-        public string Name { get; set; }
-        public string Manufacturer { get; set; }
-        public string Status { get; set; }
-        public UInt16 Buttons { get; set; }
-        public string Locked { get; set; }
-        public string HardwareType { get; set; }
-        public string PointingType { get; set; }
-        public string DeviceInterface { get; set; }
-    }
+//    public class PointingDevice
+//    {
+//        public string Name { get; set; }
+//        public string Manufacturer { get; set; }
+//        public string Status { get; set; }
+//        public UInt16 Buttons { get; set; }
+//        public string Locked { get; set; }
+//        public string HardwareType { get; set; }
+//        public string PointingType { get; set; }
+//        public string DeviceInterface { get; set; }
+//    }
 
-    public class AudioDevice
-    {
-        public string ProductName { get; set; }
-        public string Manufacturer { get; set; }
-        public string Status { get; set; }
-    }
+//    public class AudioDevice
+//    {
+//        public string ProductName { get; set; }
+//        public string Manufacturer { get; set; }
+//        public string Status { get; set; }
+//    }
 
-    public class Motherboard
-    {
-        public string Model { get; set; }
-        public string Manufacturer { get; set; }
-        public string Chipset { get; set; }
-        public string Product { get; set; }
-        public string Version { get; set; }
-        public string Revision { get; set; }
-        public string SystemModel { get; set; }
+//    public class Motherboard
+//    {
+//        public string Model { get; set; }
+//        public string Manufacturer { get; set; }
+//        public string Chipset { get; set; }
+//        public string Product { get; set; }
+//        public string Version { get; set; }
+//        public string Revision { get; set; }
+//        public string SystemModel { get; set; }
 
-        public string BIOSName { get; set; }
-        public string BIOSManufacturer { get; set; }
-        public string BIOSVersion { get; set; }
-        public string BIOSBuildNumber { get; set; }
-    }
-}
+//        public string BIOSName { get; set; }
+//        public string BIOSManufacturer { get; set; }
+//        public string BIOSVersion { get; set; }
+//        public string BIOSBuildNumber { get; set; }
+//    }
+//}

+ 477 - 477
Optimizer/IndiciumHelper.cs

@@ -1,477 +1,477 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Management;
-using System.IO;
-using System.Net.NetworkInformation;
-using System.Runtime.InteropServices;
-using System.Globalization;
-using Microsoft.Win32;
-
-namespace Optimizer
-{
-    public static class IndiciumHelper
-    {
-        public static List<CPU> GetCPUs()
-        {
-            List<CPU> CPUs = new List<CPU>();
-            CPU cpu;
-
-            ManagementObjectSearcher searcher = new ManagementObjectSearcher("SELECT * FROM Win32_Processor");
-            foreach (ManagementObject mo in searcher.Get())
-            {
-                cpu = new CPU();
-
-                cpu.Name = Convert.ToString(mo.Properties["Name"].Value);
-                cpu.L2CacheSize = ByteSize.FromKiloBytes(Convert.ToDouble(mo.Properties["L2CacheSize"].Value));
-                cpu.L3CacheSize = ByteSize.FromKiloBytes(Convert.ToDouble(mo.Properties["L3CacheSize"].Value));
-                cpu.Cores = Convert.ToUInt32(mo.Properties["NumberOfCores"].Value);
-                cpu.Threads = Convert.ToUInt32(mo.Properties["ThreadCount"].Value);
-                cpu.LogicalCpus = Convert.ToUInt32(mo.Properties["NumberOfLogicalProcessors"].Value);
-                bool temp = Convert.ToBoolean(mo.Properties["VirtualizationFirmwareEnabled"].Value);
-                cpu.Virtualization = (temp) ? "Yes" : "No";
-                cpu.Stepping = Convert.ToString(mo.Properties["Description"].Value);
-                cpu.Revision = Convert.ToString(mo.Properties["Revision"].Value);
-
-                try
-                {
-                    ManagementObjectSearcher searcher2 = new ManagementObjectSearcher("SELECT * FROM Win32_OperatingSystem");
-                    foreach (ManagementObject mo2 in searcher2.Get())
-                    {
-                        bool temp2 = Convert.ToBoolean(mo2.Properties["DataExecutionPrevention_Available"].Value);
-                        cpu.DataExecutionPrevention = (temp2) ? "Yes" : "No";
-                    }
-                }
-                catch { }
-
-                if (string.IsNullOrEmpty(cpu.Name)) cpu.Name = GetCPUNameAlternative();
-
-                CPUs.Add(cpu);
-            }
-
-            return CPUs;
-        }
-
-        private static string GetCPUNameAlternative()
-        {
-            using (RegistryKey key = Registry.LocalMachine.OpenSubKey(@"HARDWARE\DESCRIPTION\System\CentralProcessor\0", false))
-            {
-                return key.GetValue("ProcessorNameString").ToString();
-            }
-        }
-
-        public static List<RAM> GetRAM()
-        {
-            List<RAM> modules = new List<RAM>();
-            RAM module;
-
-            ManagementObjectSearcher searcher = new ManagementObjectSearcher("SELECT * FROM Win32_PhysicalMemory");
-            foreach (ManagementObject mo in searcher.Get())
-            {
-                module = new RAM();
-
-                module.BankLabel = Convert.ToString(mo.Properties["BankLabel"].Value);
-                module.Capacity = Convert.ToUInt64(mo.Properties["Capacity"].Value);
-                module.Manufacturer = Convert.ToString(mo.Properties["Manufacturer"].Value);
-                module.Speed = Convert.ToUInt32(mo.Properties["Speed"].Value);
-                UInt16 memorytype = Convert.ToUInt16(mo.Properties["MemoryType"].Value);
-                UInt16 formfactor = Convert.ToUInt16(mo.Properties["FormFactor"].Value);
-                module.MemoryType = SanitizeMemoryType(memorytype);
-                module.FormFactor = SanitizeFormFactor(formfactor);
-
-                modules.Add(module);
-            }
-
-            return modules;
-        }
-
-        public static List<GPU> GetGPUs()
-        {
-            List<GPU> GPUs = new List<GPU>();
-            GPU gpu;
-
-            ManagementObjectSearcher searcher = new ManagementObjectSearcher("SELECT * FROM Win32_VideoController");
-            foreach (ManagementObject mo in searcher.Get())
-            {
-                gpu = new GPU();
-
-                gpu.Name = Convert.ToString(mo.Properties["Name"].Value);
-                gpu.Memory = ByteSize.FromBytes(Convert.ToDouble(mo.Properties["AdapterRAM"].Value));
-                gpu.ResolutionX = Convert.ToUInt32(mo.Properties["CurrentHorizontalResolution"].Value);
-                gpu.ResolutionY = Convert.ToUInt32(mo.Properties["CurrentVerticalResolution"].Value);
-                gpu.RefreshRate = Convert.ToUInt32(mo.Properties["CurrentRefreshRate"].Value);
-                gpu.DACType = Convert.ToString(mo.Properties["AdapterDACType"].Value);
-                UInt16 vtype = Convert.ToUInt16(mo.Properties["VideoMemoryType"].Value);
-                gpu.VideoMemoryType = SanitizeVideoMemoryType(vtype);
-
-                GPUs.Add(gpu);
-            }
-
-            return GPUs;
-        }
-
-        public static List<Motherboard> GetMotherboards()
-        {
-            List<Motherboard> motherboards = new List<Motherboard>();
-            Motherboard mobo;
-
-            ManagementObjectSearcher searcher = new ManagementObjectSearcher("SELECT * FROM Win32_BaseBoard");
-            foreach (ManagementObject mo in searcher.Get())
-            {
-                mobo = new Motherboard();
-
-                mobo.Model = Convert.ToString(mo.Properties["Model"].Value);
-                mobo.Manufacturer = Convert.ToString(mo.Properties["Manufacturer"].Value);
-                mobo.Product = Convert.ToString(mo.Properties["Product"].Value);
-                mobo.Version = Convert.ToString(mo.Properties["Version"].Value);
-
-                try
-                {
-                    ManagementObjectSearcher searcher2 = new ManagementObjectSearcher("SELECT * FROM Win32_IDEController");
-                    foreach (ManagementObject mo2 in searcher2.Get())
-                    {
-                        mobo.Chipset = Convert.ToString(mo2.Properties["Description"].Value);
-                    }
-                }
-                catch { }
-
-                try
-                {
-                    ManagementObjectSearcher searcher3 = new ManagementObjectSearcher("SELECT * FROM Win32_IDEController");
-                    foreach (ManagementObject mo3 in searcher3.Get())
-                    {
-                        mobo.Revision = Convert.ToString(mo3.Properties["RevisionNumber"].Value);
-                    }
-                }
-                catch { }
-
-                try
-                {
-                    ManagementObjectSearcher searcher4 = new ManagementObjectSearcher("SELECT * FROM Win32_ComputerSystem");
-                    foreach (ManagementObject mo4 in searcher4.Get())
-                    {
-                        mobo.SystemModel = Convert.ToString(mo4.Properties["Model"].Value);
-                    }
-                }
-                catch { }
-
-                ManagementObjectSearcher searcher5 = new ManagementObjectSearcher("SELECT * FROM Win32_BIOS");
-                foreach (ManagementObject mo5 in searcher5.Get())
-                {
-                    mobo.BIOSName = Convert.ToString(mo5.Properties["Name"].Value);
-                    mobo.BIOSManufacturer = Convert.ToString(mo5.Properties["Manufacturer"].Value);
-                    mobo.BIOSVersion = Convert.ToString(mo5.Properties["Version"].Value);
-                    mobo.BIOSBuildNumber = Convert.ToString(mo5.Properties["BuildNumber"].Value);
-                    //ReleaseDate = DateTime.Parse(mo.Properties["ReleaseDate"].Value.ToString());
-                }
-
-                motherboards.Add(mobo);
-            }
-
-            return motherboards;
-        }
-
-        public static List<Disk> GetStorageDevices()
-        {
-            List<Disk> Disks = new List<Disk>();
-            //List<Volume> Volumes = new List<Volume>();
-            //List<Volume> Removables = new List<Volume>();
-            //List<Volume> Opticals = new List<Volume>();
-
-            Disk disk;
-
-            ManagementObjectSearcher searcher2 = new ManagementObjectSearcher("SELECT * FROM Win32_DiskDrive");
-            foreach (ManagementObject mo2 in searcher2.Get())
-            {
-                disk = new Disk();
-
-                disk.Model = Convert.ToString(mo2.Properties["Model"].Value);
-                disk.BytesPerSector = Convert.ToUInt32(mo2.Properties["BytesPerSector"].Value);
-                disk.FirmwareRevision = Convert.ToString(mo2.Properties["FirmwareRevision"].Value);
-                disk.MediaType = Convert.ToString(mo2.Properties["MediaType"].Value);
-                disk.Capacity = ByteSize.FromBytes(Convert.ToDouble(mo2.Properties["Size"].Value));
-
-                Disks.Add(disk);
-            }
-
-            return Disks;
-        }
-
-        public static List<NetworkDevice> GetNetworkDevices()
-        {
-            List<NetworkDevice> adapters = new List<NetworkDevice>();
-            NetworkDevice adapter;
-
-            ManagementObjectSearcher searcher = new ManagementObjectSearcher("SELECT * FROM Win32_NetworkAdapter");
-            foreach (ManagementObject mo in searcher.Get())
-            {
-                adapter = new NetworkDevice();
-
-                adapter.AdapterType = Convert.ToString(mo.Properties["AdapterType"].Value);
-                adapter.Manufacturer = Convert.ToString(mo.Properties["Manufacturer"].Value);
-                adapter.ProductName = Convert.ToString(mo.Properties["ProductName"].Value);
-                bool isPhysical = Convert.ToBoolean(mo.Properties["PhysicalAdapter"].Value);
-                adapter.PhysicalAdapter = (isPhysical) ? "Yes" : "No";
-                adapter.MacAddress = Convert.ToString(mo.Properties["MacAddress"].Value);
-                adapter.ServiceName = Convert.ToString(mo.Properties["ServiceName"].Value);
-
-                if (isPhysical) adapters.Add(adapter);
-            }
-
-            return adapters;
-        }
-
-        private static string SanitizeDriveType(UInt32 i)
-        {
-            string result = string.Empty;
-
-            switch (i)
-            {
-                case 0:
-                    result = "Unknown";
-                    break;
-                case 1:
-                    result = "No Root Directory";
-                    break;
-                case 2:
-                    result = "Removable Disk";
-                    break;
-                case 3:
-                    result = "Local Disk";
-                    break;
-                case 4:
-                    result = "Network Drive";
-                    break;
-                case 5:
-                    result = "Compact Disk";
-                    break;
-                case 6:
-                    result = "RAM Disk";
-                    break;
-            }
-
-            return result;
-        }
-
-        private static string SanitizeVideoMemoryType(UInt16 i)
-        {
-            string result = string.Empty;
-
-            switch (i)
-            {
-                case 1:
-                    result = "Other";
-                    break;
-                case 2:
-                    result = "Unknown";
-                    break;
-                case 3:
-                    result = "VRAM";
-                    break;
-                case 4:
-                    result = "DRAM";
-                    break;
-                case 5:
-                    result = "SRAM";
-                    break;
-                case 6:
-                    result = "WRAM";
-                    break;
-                case 7:
-                    result = "EDO RAM";
-                    break;
-                case 8:
-                    result = "Burst Synchronous DRAM";
-                    break;
-                case 9:
-                    result = "Pipelined Burst SRAM";
-                    break;
-                case 10:
-                    result = "CDRAM";
-                    break;
-                case 11:
-                    result = "3DRAM";
-                    break;
-                case 12:
-                    result = "SDRAM";
-                    break;
-                case 13:
-                    result = "SGRAM";
-                    break;
-            }
-
-            return result;
-        }
-
-        private static string SanitizeFormFactor(UInt16 i)
-        {
-            string result = string.Empty;
-
-            switch (i)
-            {
-                case 0:
-                    result = "Unknown";
-                    break;
-                case 1:
-                    result = "Other";
-                    break;
-                case 2:
-                    result = "SIP";
-                    break;
-                case 3:
-                    result = "DIP";
-                    break;
-                case 4:
-                    result = "ZIP";
-                    break;
-                case 5:
-                    result = "SOJ";
-                    break;
-                case 6:
-                    result = "Proprietary";
-                    break;
-                case 7:
-                    result = "SIMM";
-                    break;
-                case 8:
-                    result = "DIMM";
-                    break;
-                case 9:
-                    result = "TSOP";
-                    break;
-                case 10:
-                    result = "PGA";
-                    break;
-                case 11:
-                    result = "RIMM";
-                    break;
-                case 12:
-                    result = "SODIMM";
-                    break;
-                case 13:
-                    result = "SRIMM";
-                    break;
-                case 14:
-                    result = "SMD";
-                    break;
-                case 15:
-                    result = "SSMP";
-                    break;
-                case 16:
-                    result = "QFP";
-                    break;
-                case 17:
-                    result = "TQFP";
-                    break;
-                case 18:
-                    result = "SOIC";
-                    break;
-                case 19:
-                    result = "LCC";
-                    break;
-                case 20:
-                    result = "PLCC";
-                    break;
-                case 21:
-                    result = "BGA";
-                    break;
-                case 22:
-                    result = "FPBGA";
-                    break;
-                case 23:
-                    result = "LGA";
-                    break;
-            }
-
-            return result;
-        }
-
-        private static string SanitizeMemoryType(UInt16 i)
-        {
-            string result = string.Empty;
-
-            switch (i)
-            {
-                case 0:
-                    result = "Unknown";
-                    break;
-                case 1:
-                    result = "Other";
-                    break;
-                case 2:
-                    result = "DRAM";
-                    break;
-                case 3:
-                    result = "Synchonous DRAM";
-                    break;
-                case 4:
-                    result = "Cache DRAM";
-                    break;
-                case 5:
-                    result = "EDO";
-                    break;
-                case 6:
-                    result = "EDRAM";
-                    break;
-                case 7:
-                    result = "VRAM";
-                    break;
-                case 8:
-                    result = "SRAM";
-                    break;
-                case 9:
-                    result = "RAM";
-                    break;
-                case 10:
-                    result = "ROM";
-                    break;
-                case 11:
-                    result = "Flash";
-                    break;
-                case 12:
-                    result = "EEPROM";
-                    break;
-                case 13:
-                    result = "FEPROM";
-                    break;
-                case 14:
-                    result = "EPROM";
-                    break;
-                case 15:
-                    result = "CDRAM";
-                    break;
-                case 16:
-                    result = "3DRAM";
-                    break;
-                case 17:
-                    result = "SDRAM";
-                    break;
-                case 18:
-                    result = "SGRAM";
-                    break;
-                case 19:
-                    result = "RDRAM";
-                    break;
-                case 20:
-                    result = "DDR";
-                    break;
-                case 21:
-                    result = "DDR2";
-                    break;
-                case 22:
-                    result = "DDR2 FB-DIMM";
-                    break;
-                case 24:
-                    result = "DDR3";
-                    break;
-                case 25:
-                    result = "FBD2";
-                    break;
-            }
-
-            return result;
-        }
-    }
-}
+//using System;
+//using System.Collections.Generic;
+//using System.Linq;
+//using System.Text;
+//using System.Threading.Tasks;
+//using System.Management;
+//using System.IO;
+//using System.Net.NetworkInformation;
+//using System.Runtime.InteropServices;
+//using System.Globalization;
+//using Microsoft.Win32;
+
+//namespace Optimizer
+//{
+//    public static class IndiciumHelper
+//    {
+//        public static List<CPU> GetCPUs()
+//        {
+//            List<CPU> CPUs = new List<CPU>();
+//            CPU cpu;
+
+//            ManagementObjectSearcher searcher = new ManagementObjectSearcher("SELECT * FROM Win32_Processor");
+//            foreach (ManagementObject mo in searcher.Get())
+//            {
+//                cpu = new CPU();
+
+//                cpu.Name = Convert.ToString(mo.Properties["Name"].Value);
+//                cpu.L2CacheSize = ByteSize.FromKiloBytes(Convert.ToDouble(mo.Properties["L2CacheSize"].Value));
+//                cpu.L3CacheSize = ByteSize.FromKiloBytes(Convert.ToDouble(mo.Properties["L3CacheSize"].Value));
+//                cpu.Cores = Convert.ToUInt32(mo.Properties["NumberOfCores"].Value);
+//                cpu.Threads = Convert.ToUInt32(mo.Properties["ThreadCount"].Value);
+//                cpu.LogicalCpus = Convert.ToUInt32(mo.Properties["NumberOfLogicalProcessors"].Value);
+//                bool temp = Convert.ToBoolean(mo.Properties["VirtualizationFirmwareEnabled"].Value);
+//                cpu.Virtualization = (temp) ? "Yes" : "No";
+//                cpu.Stepping = Convert.ToString(mo.Properties["Description"].Value);
+//                cpu.Revision = Convert.ToString(mo.Properties["Revision"].Value);
+
+//                try
+//                {
+//                    ManagementObjectSearcher searcher2 = new ManagementObjectSearcher("SELECT * FROM Win32_OperatingSystem");
+//                    foreach (ManagementObject mo2 in searcher2.Get())
+//                    {
+//                        bool temp2 = Convert.ToBoolean(mo2.Properties["DataExecutionPrevention_Available"].Value);
+//                        cpu.DataExecutionPrevention = (temp2) ? "Yes" : "No";
+//                    }
+//                }
+//                catch { }
+
+//                if (string.IsNullOrEmpty(cpu.Name)) cpu.Name = GetCPUNameAlternative();
+
+//                CPUs.Add(cpu);
+//            }
+
+//            return CPUs;
+//        }
+
+//        private static string GetCPUNameAlternative()
+//        {
+//            using (RegistryKey key = Registry.LocalMachine.OpenSubKey(@"HARDWARE\DESCRIPTION\System\CentralProcessor\0", false))
+//            {
+//                return key.GetValue("ProcessorNameString").ToString();
+//            }
+//        }
+
+//        public static List<RAM> GetRAM()
+//        {
+//            List<RAM> modules = new List<RAM>();
+//            RAM module;
+
+//            ManagementObjectSearcher searcher = new ManagementObjectSearcher("SELECT * FROM Win32_PhysicalMemory");
+//            foreach (ManagementObject mo in searcher.Get())
+//            {
+//                module = new RAM();
+
+//                module.BankLabel = Convert.ToString(mo.Properties["BankLabel"].Value);
+//                module.Capacity = Convert.ToUInt64(mo.Properties["Capacity"].Value);
+//                module.Manufacturer = Convert.ToString(mo.Properties["Manufacturer"].Value);
+//                module.Speed = Convert.ToUInt32(mo.Properties["Speed"].Value);
+//                UInt16 memorytype = Convert.ToUInt16(mo.Properties["MemoryType"].Value);
+//                UInt16 formfactor = Convert.ToUInt16(mo.Properties["FormFactor"].Value);
+//                module.MemoryType = SanitizeMemoryType(memorytype);
+//                module.FormFactor = SanitizeFormFactor(formfactor);
+
+//                modules.Add(module);
+//            }
+
+//            return modules;
+//        }
+
+//        public static List<GPU> GetGPUs()
+//        {
+//            List<GPU> GPUs = new List<GPU>();
+//            GPU gpu;
+
+//            ManagementObjectSearcher searcher = new ManagementObjectSearcher("SELECT * FROM Win32_VideoController");
+//            foreach (ManagementObject mo in searcher.Get())
+//            {
+//                gpu = new GPU();
+
+//                gpu.Name = Convert.ToString(mo.Properties["Name"].Value);
+//                gpu.Memory = ByteSize.FromBytes(Convert.ToDouble(mo.Properties["AdapterRAM"].Value));
+//                gpu.ResolutionX = Convert.ToUInt32(mo.Properties["CurrentHorizontalResolution"].Value);
+//                gpu.ResolutionY = Convert.ToUInt32(mo.Properties["CurrentVerticalResolution"].Value);
+//                gpu.RefreshRate = Convert.ToUInt32(mo.Properties["CurrentRefreshRate"].Value);
+//                gpu.DACType = Convert.ToString(mo.Properties["AdapterDACType"].Value);
+//                UInt16 vtype = Convert.ToUInt16(mo.Properties["VideoMemoryType"].Value);
+//                gpu.VideoMemoryType = SanitizeVideoMemoryType(vtype);
+
+//                GPUs.Add(gpu);
+//            }
+
+//            return GPUs;
+//        }
+
+//        public static List<Motherboard> GetMotherboards()
+//        {
+//            List<Motherboard> motherboards = new List<Motherboard>();
+//            Motherboard mobo;
+
+//            ManagementObjectSearcher searcher = new ManagementObjectSearcher("SELECT * FROM Win32_BaseBoard");
+//            foreach (ManagementObject mo in searcher.Get())
+//            {
+//                mobo = new Motherboard();
+
+//                mobo.Model = Convert.ToString(mo.Properties["Model"].Value);
+//                mobo.Manufacturer = Convert.ToString(mo.Properties["Manufacturer"].Value);
+//                mobo.Product = Convert.ToString(mo.Properties["Product"].Value);
+//                mobo.Version = Convert.ToString(mo.Properties["Version"].Value);
+
+//                try
+//                {
+//                    ManagementObjectSearcher searcher2 = new ManagementObjectSearcher("SELECT * FROM Win32_IDEController");
+//                    foreach (ManagementObject mo2 in searcher2.Get())
+//                    {
+//                        mobo.Chipset = Convert.ToString(mo2.Properties["Description"].Value);
+//                    }
+//                }
+//                catch { }
+
+//                try
+//                {
+//                    ManagementObjectSearcher searcher3 = new ManagementObjectSearcher("SELECT * FROM Win32_IDEController");
+//                    foreach (ManagementObject mo3 in searcher3.Get())
+//                    {
+//                        mobo.Revision = Convert.ToString(mo3.Properties["RevisionNumber"].Value);
+//                    }
+//                }
+//                catch { }
+
+//                try
+//                {
+//                    ManagementObjectSearcher searcher4 = new ManagementObjectSearcher("SELECT * FROM Win32_ComputerSystem");
+//                    foreach (ManagementObject mo4 in searcher4.Get())
+//                    {
+//                        mobo.SystemModel = Convert.ToString(mo4.Properties["Model"].Value);
+//                    }
+//                }
+//                catch { }
+
+//                ManagementObjectSearcher searcher5 = new ManagementObjectSearcher("SELECT * FROM Win32_BIOS");
+//                foreach (ManagementObject mo5 in searcher5.Get())
+//                {
+//                    mobo.BIOSName = Convert.ToString(mo5.Properties["Name"].Value);
+//                    mobo.BIOSManufacturer = Convert.ToString(mo5.Properties["Manufacturer"].Value);
+//                    mobo.BIOSVersion = Convert.ToString(mo5.Properties["Version"].Value);
+//                    mobo.BIOSBuildNumber = Convert.ToString(mo5.Properties["BuildNumber"].Value);
+//                    //ReleaseDate = DateTime.Parse(mo.Properties["ReleaseDate"].Value.ToString());
+//                }
+
+//                motherboards.Add(mobo);
+//            }
+
+//            return motherboards;
+//        }
+
+//        public static List<Disk> GetStorageDevices()
+//        {
+//            List<Disk> Disks = new List<Disk>();
+//            //List<Volume> Volumes = new List<Volume>();
+//            //List<Volume> Removables = new List<Volume>();
+//            //List<Volume> Opticals = new List<Volume>();
+
+//            Disk disk;
+
+//            ManagementObjectSearcher searcher2 = new ManagementObjectSearcher("SELECT * FROM Win32_DiskDrive");
+//            foreach (ManagementObject mo2 in searcher2.Get())
+//            {
+//                disk = new Disk();
+
+//                disk.Model = Convert.ToString(mo2.Properties["Model"].Value);
+//                disk.BytesPerSector = Convert.ToUInt32(mo2.Properties["BytesPerSector"].Value);
+//                disk.FirmwareRevision = Convert.ToString(mo2.Properties["FirmwareRevision"].Value);
+//                disk.MediaType = Convert.ToString(mo2.Properties["MediaType"].Value);
+//                disk.Capacity = ByteSize.FromBytes(Convert.ToDouble(mo2.Properties["Size"].Value));
+
+//                Disks.Add(disk);
+//            }
+
+//            return Disks;
+//        }
+
+//        public static List<NetworkDevice> GetNetworkDevices()
+//        {
+//            List<NetworkDevice> adapters = new List<NetworkDevice>();
+//            NetworkDevice adapter;
+
+//            ManagementObjectSearcher searcher = new ManagementObjectSearcher("SELECT * FROM Win32_NetworkAdapter");
+//            foreach (ManagementObject mo in searcher.Get())
+//            {
+//                adapter = new NetworkDevice();
+
+//                adapter.AdapterType = Convert.ToString(mo.Properties["AdapterType"].Value);
+//                adapter.Manufacturer = Convert.ToString(mo.Properties["Manufacturer"].Value);
+//                adapter.ProductName = Convert.ToString(mo.Properties["ProductName"].Value);
+//                bool isPhysical = Convert.ToBoolean(mo.Properties["PhysicalAdapter"].Value);
+//                adapter.PhysicalAdapter = (isPhysical) ? "Yes" : "No";
+//                adapter.MacAddress = Convert.ToString(mo.Properties["MacAddress"].Value);
+//                adapter.ServiceName = Convert.ToString(mo.Properties["ServiceName"].Value);
+
+//                if (isPhysical) adapters.Add(adapter);
+//            }
+
+//            return adapters;
+//        }
+
+//        private static string SanitizeDriveType(UInt32 i)
+//        {
+//            string result = string.Empty;
+
+//            switch (i)
+//            {
+//                case 0:
+//                    result = "Unknown";
+//                    break;
+//                case 1:
+//                    result = "No Root Directory";
+//                    break;
+//                case 2:
+//                    result = "Removable Disk";
+//                    break;
+//                case 3:
+//                    result = "Local Disk";
+//                    break;
+//                case 4:
+//                    result = "Network Drive";
+//                    break;
+//                case 5:
+//                    result = "Compact Disk";
+//                    break;
+//                case 6:
+//                    result = "RAM Disk";
+//                    break;
+//            }
+
+//            return result;
+//        }
+
+//        private static string SanitizeVideoMemoryType(UInt16 i)
+//        {
+//            string result = string.Empty;
+
+//            switch (i)
+//            {
+//                case 1:
+//                    result = "Other";
+//                    break;
+//                case 2:
+//                    result = "Unknown";
+//                    break;
+//                case 3:
+//                    result = "VRAM";
+//                    break;
+//                case 4:
+//                    result = "DRAM";
+//                    break;
+//                case 5:
+//                    result = "SRAM";
+//                    break;
+//                case 6:
+//                    result = "WRAM";
+//                    break;
+//                case 7:
+//                    result = "EDO RAM";
+//                    break;
+//                case 8:
+//                    result = "Burst Synchronous DRAM";
+//                    break;
+//                case 9:
+//                    result = "Pipelined Burst SRAM";
+//                    break;
+//                case 10:
+//                    result = "CDRAM";
+//                    break;
+//                case 11:
+//                    result = "3DRAM";
+//                    break;
+//                case 12:
+//                    result = "SDRAM";
+//                    break;
+//                case 13:
+//                    result = "SGRAM";
+//                    break;
+//            }
+
+//            return result;
+//        }
+
+//        private static string SanitizeFormFactor(UInt16 i)
+//        {
+//            string result = string.Empty;
+
+//            switch (i)
+//            {
+//                case 0:
+//                    result = "Unknown";
+//                    break;
+//                case 1:
+//                    result = "Other";
+//                    break;
+//                case 2:
+//                    result = "SIP";
+//                    break;
+//                case 3:
+//                    result = "DIP";
+//                    break;
+//                case 4:
+//                    result = "ZIP";
+//                    break;
+//                case 5:
+//                    result = "SOJ";
+//                    break;
+//                case 6:
+//                    result = "Proprietary";
+//                    break;
+//                case 7:
+//                    result = "SIMM";
+//                    break;
+//                case 8:
+//                    result = "DIMM";
+//                    break;
+//                case 9:
+//                    result = "TSOP";
+//                    break;
+//                case 10:
+//                    result = "PGA";
+//                    break;
+//                case 11:
+//                    result = "RIMM";
+//                    break;
+//                case 12:
+//                    result = "SODIMM";
+//                    break;
+//                case 13:
+//                    result = "SRIMM";
+//                    break;
+//                case 14:
+//                    result = "SMD";
+//                    break;
+//                case 15:
+//                    result = "SSMP";
+//                    break;
+//                case 16:
+//                    result = "QFP";
+//                    break;
+//                case 17:
+//                    result = "TQFP";
+//                    break;
+//                case 18:
+//                    result = "SOIC";
+//                    break;
+//                case 19:
+//                    result = "LCC";
+//                    break;
+//                case 20:
+//                    result = "PLCC";
+//                    break;
+//                case 21:
+//                    result = "BGA";
+//                    break;
+//                case 22:
+//                    result = "FPBGA";
+//                    break;
+//                case 23:
+//                    result = "LGA";
+//                    break;
+//            }
+
+//            return result;
+//        }
+
+//        private static string SanitizeMemoryType(UInt16 i)
+//        {
+//            string result = string.Empty;
+
+//            switch (i)
+//            {
+//                case 0:
+//                    result = "Unknown";
+//                    break;
+//                case 1:
+//                    result = "Other";
+//                    break;
+//                case 2:
+//                    result = "DRAM";
+//                    break;
+//                case 3:
+//                    result = "Synchonous DRAM";
+//                    break;
+//                case 4:
+//                    result = "Cache DRAM";
+//                    break;
+//                case 5:
+//                    result = "EDO";
+//                    break;
+//                case 6:
+//                    result = "EDRAM";
+//                    break;
+//                case 7:
+//                    result = "VRAM";
+//                    break;
+//                case 8:
+//                    result = "SRAM";
+//                    break;
+//                case 9:
+//                    result = "RAM";
+//                    break;
+//                case 10:
+//                    result = "ROM";
+//                    break;
+//                case 11:
+//                    result = "Flash";
+//                    break;
+//                case 12:
+//                    result = "EEPROM";
+//                    break;
+//                case 13:
+//                    result = "FEPROM";
+//                    break;
+//                case 14:
+//                    result = "EPROM";
+//                    break;
+//                case 15:
+//                    result = "CDRAM";
+//                    break;
+//                case 16:
+//                    result = "3DRAM";
+//                    break;
+//                case 17:
+//                    result = "SDRAM";
+//                    break;
+//                case 18:
+//                    result = "SGRAM";
+//                    break;
+//                case 19:
+//                    result = "RDRAM";
+//                    break;
+//                case 20:
+//                    result = "DDR";
+//                    break;
+//                case 21:
+//                    result = "DDR2";
+//                    break;
+//                case 22:
+//                    result = "DDR2 FB-DIMM";
+//                    break;
+//                case 24:
+//                    result = "DDR3";
+//                    break;
+//                case 25:
+//                    result = "FBD2";
+//                    break;
+//            }
+
+//            return result;
+//        }
+//    }
+//}

+ 13 - 13
Optimizer/MainForm.Designer.cs

@@ -1092,7 +1092,7 @@ namespace Optimizer
             this.txtFeedError.ForeColor = System.Drawing.Color.Gold;
             this.txtFeedError.Location = new System.Drawing.Point(3, 47);
             this.txtFeedError.Name = "txtFeedError";
-            this.txtFeedError.Size = new System.Drawing.Size(923, 443);
+            this.txtFeedError.Size = new System.Drawing.Size(923, 441);
             this.txtFeedError.TabIndex = 170;
             this.txtFeedError.Text = "No internet connection, try refreshing links again";
             this.txtFeedError.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
@@ -1239,7 +1239,7 @@ namespace Optimizer
             this.panelCommonApps.Controls.Add(this.bitPref);
             this.panelCommonApps.Controls.Add(this.goToDownloadsB);
             this.panelCommonApps.Dock = System.Windows.Forms.DockStyle.Bottom;
-            this.panelCommonApps.Location = new System.Drawing.Point(3, 490);
+            this.panelCommonApps.Location = new System.Drawing.Point(3, 488);
             this.panelCommonApps.Name = "panelCommonApps";
             this.panelCommonApps.Size = new System.Drawing.Size(923, 120);
             this.panelCommonApps.TabIndex = 162;
@@ -1268,7 +1268,7 @@ namespace Optimizer
             this.setDownDirLbl.AutoSize = true;
             this.setDownDirLbl.Font = new System.Drawing.Font("Segoe UI Semibold", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
             this.setDownDirLbl.ForeColor = System.Drawing.Color.DodgerBlue;
-            this.setDownDirLbl.Location = new System.Drawing.Point(6, 4);
+            this.setDownDirLbl.Location = new System.Drawing.Point(3, 4);
             this.setDownDirLbl.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.setDownDirLbl.Name = "setDownDirLbl";
             this.setDownDirLbl.Size = new System.Drawing.Size(160, 21);
@@ -1282,7 +1282,7 @@ namespace Optimizer
             this.txtDownloadFolder.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
             this.txtDownloadFolder.Font = new System.Drawing.Font("Segoe UI Semibold", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
             this.txtDownloadFolder.ForeColor = System.Drawing.Color.Silver;
-            this.txtDownloadFolder.Location = new System.Drawing.Point(11, 30);
+            this.txtDownloadFolder.Location = new System.Drawing.Point(8, 30);
             this.txtDownloadFolder.Name = "txtDownloadFolder";
             this.txtDownloadFolder.Size = new System.Drawing.Size(302, 23);
             this.txtDownloadFolder.TabIndex = 70;
@@ -1296,7 +1296,7 @@ namespace Optimizer
             this.changeDownDirB.FlatAppearance.MouseOverBackColor = System.Drawing.Color.RoyalBlue;
             this.changeDownDirB.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
             this.changeDownDirB.ForeColor = System.Drawing.Color.White;
-            this.changeDownDirB.Location = new System.Drawing.Point(316, 30);
+            this.changeDownDirB.Location = new System.Drawing.Point(313, 30);
             this.changeDownDirB.Margin = new System.Windows.Forms.Padding(2);
             this.changeDownDirB.Name = "changeDownDirB";
             this.changeDownDirB.Size = new System.Drawing.Size(30, 23);
@@ -1311,7 +1311,7 @@ namespace Optimizer
             this.txtDownloadStatus.AutoSize = true;
             this.txtDownloadStatus.Font = new System.Drawing.Font("Segoe UI Semibold", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
             this.txtDownloadStatus.ForeColor = System.Drawing.Color.LightGray;
-            this.txtDownloadStatus.Location = new System.Drawing.Point(7, 58);
+            this.txtDownloadStatus.Location = new System.Drawing.Point(4, 58);
             this.txtDownloadStatus.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.txtDownloadStatus.Name = "txtDownloadStatus";
             this.txtDownloadStatus.Size = new System.Drawing.Size(32, 19);
@@ -1327,7 +1327,7 @@ namespace Optimizer
             this.linkWarnings.Font = new System.Drawing.Font("Segoe UI Semibold", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
             this.linkWarnings.ForeColor = System.Drawing.Color.Gold;
             this.linkWarnings.LinkColor = System.Drawing.Color.Gold;
-            this.linkWarnings.Location = new System.Drawing.Point(7, 98);
+            this.linkWarnings.Location = new System.Drawing.Point(4, 98);
             this.linkWarnings.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.linkWarnings.Name = "linkWarnings";
             this.linkWarnings.Size = new System.Drawing.Size(92, 19);
@@ -1344,7 +1344,7 @@ namespace Optimizer
             this.bitPref.AutoSize = true;
             this.bitPref.Font = new System.Drawing.Font("Segoe UI Semibold", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
             this.bitPref.ForeColor = System.Drawing.Color.DodgerBlue;
-            this.bitPref.Location = new System.Drawing.Point(368, 6);
+            this.bitPref.Location = new System.Drawing.Point(368, 5);
             this.bitPref.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.bitPref.Name = "bitPref";
             this.bitPref.Size = new System.Drawing.Size(143, 21);
@@ -4324,9 +4324,9 @@ namespace Optimizer
             this.cAutoInstall.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
             this.cAutoInstall.Font = new System.Drawing.Font("Segoe UI Semibold", 11F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
             this.cAutoInstall.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
-            this.cAutoInstall.Location = new System.Drawing.Point(551, 55);
+            this.cAutoInstall.Location = new System.Drawing.Point(550, 55);
             this.cAutoInstall.Name = "cAutoInstall";
-            this.cAutoInstall.Size = new System.Drawing.Size(290, 24);
+            this.cAutoInstall.Size = new System.Drawing.Size(369, 24);
             this.cAutoInstall.TabIndex = 107;
             this.cAutoInstall.Text = "Install after downloading";
             this.cAutoInstall.UseVisualStyleBackColor = true;
@@ -4334,7 +4334,7 @@ namespace Optimizer
             // progressDownloader
             // 
             this.progressDownloader.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
-            this.progressDownloader.Location = new System.Drawing.Point(11, 83);
+            this.progressDownloader.Location = new System.Drawing.Point(8, 83);
             this.progressDownloader.MarqueeAnimationSpeed = 15;
             this.progressDownloader.Name = "progressDownloader";
             this.progressDownloader.Size = new System.Drawing.Size(302, 10);
@@ -4344,7 +4344,7 @@ namespace Optimizer
             // 
             this.c64.AutoSize = true;
             this.c64.Font = new System.Drawing.Font("Segoe UI Semibold", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
-            this.c64.Location = new System.Drawing.Point(373, 29);
+            this.c64.Location = new System.Drawing.Point(373, 28);
             this.c64.Name = "c64";
             this.c64.Size = new System.Drawing.Size(72, 25);
             this.c64.TabIndex = 75;
@@ -4356,7 +4356,7 @@ namespace Optimizer
             // 
             this.c32.AutoSize = true;
             this.c32.Font = new System.Drawing.Font("Segoe UI Semibold", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
-            this.c32.Location = new System.Drawing.Point(448, 29);
+            this.c32.Location = new System.Drawing.Point(448, 28);
             this.c32.Name = "c32";
             this.c32.Size = new System.Drawing.Size(72, 25);
             this.c32.TabIndex = 76;

+ 2 - 13
Optimizer/MainForm.cs

@@ -533,7 +533,8 @@ namespace Optimizer
 
             //if (Utilities.CurrentWindowsVersion == WindowsVersion.Windows11)
             //{
-            //    // load toggles ...
+            //    // * load toggles * ...
+
             //    tabCollection.TabPages.Remove(windows8Tab);
             //    //tabCollection.TabPages.Remove(windows10Tab);
             //    GetModernApps(false);
@@ -605,21 +606,9 @@ namespace Optimizer
                 lblUpdateDisabled.Visible = true;
             }
 
-            //LoadIndicium();
-
             //_networkMonitor = new NetworkMonitor();
         }
 
-        private void LoadIndicium()
-        {
-            var CPUs = IndiciumHelper.GetCPUs();
-            var RAM = IndiciumHelper.GetRAM();
-            var GPUs = IndiciumHelper.GetGPUs();
-            var Motherboards = IndiciumHelper.GetMotherboards();
-            var Storage = IndiciumHelper.GetStorageDevices();
-            var Network = IndiciumHelper.GetNetworkDevices();
-        }
-
         //private void NetworkMonitoring()
         //{
         //    while (true)

+ 78 - 78
Optimizer/NetworkAdapter.cs

@@ -1,78 +1,78 @@
-using System.Diagnostics;
-
-namespace Optimizer
-{
-    public class NetworkAdapter
-    {
-        long _downloadSpeed, _uploadSpeed;
-        long _downloadValue, _uploadValue;
-        long _downloadValueOld, _uploadValueOld;
-
-        string _name;
-
-        internal PerformanceCounter DownloadCounter, UploadCounter;
-
-        internal NetworkAdapter(string name)
-        {
-            _name = name;
-        }
-
-        internal void Initialize()
-        {
-            _downloadValueOld = DownloadCounter.NextSample().RawValue;
-            _uploadValueOld = UploadCounter.NextSample().RawValue;
-        }
-
-        internal void Refresh()
-        {
-            _downloadValue = DownloadCounter.NextSample().RawValue;
-            _uploadValue = UploadCounter.NextSample().RawValue;
-
-            _downloadSpeed = _downloadValue - _downloadValueOld;
-            _uploadSpeed = _uploadValue - _uploadValueOld;
-
-            _downloadValueOld = _downloadValue;
-            _uploadValueOld = _uploadValue;
-        }
-
-        public override string ToString()
-        {
-            return _name;
-        }
-
-        public string Name
-        {
-            get { return _name; }
-        }
-
-        public long DownloadSpeed
-        {
-            get { return _downloadSpeed; }
-        }
-
-        public long UploadSpeed
-        {
-            get { return _uploadSpeed; }
-        }
-
-        public double DownloadSpeedKbps
-        {
-            get { return this._downloadSpeed / 1024.0; }
-        }
-
-        public double UploadSpeedKbps
-        {
-            get { return this._uploadSpeed / 1024.0; }
-        }
-
-        public double DownloadSpeedMbps
-        {
-            get { return this._downloadSpeed / 1024.0 / 1024.0; }
-        }
-
-        public double UploadSpeedMbps
-        {
-            get { return this._uploadSpeed / 1024.0 / 1024.0; }
-        }
-    }
-}
+//using System.Diagnostics;
+
+//namespace Optimizer
+//{
+//    public class NetworkAdapter
+//    {
+//        long _downloadSpeed, _uploadSpeed;
+//        long _downloadValue, _uploadValue;
+//        long _downloadValueOld, _uploadValueOld;
+
+//        string _name;
+
+//        internal PerformanceCounter DownloadCounter, UploadCounter;
+
+//        internal NetworkAdapter(string name)
+//        {
+//            _name = name;
+//        }
+
+//        internal void Initialize()
+//        {
+//            _downloadValueOld = DownloadCounter.NextSample().RawValue;
+//            _uploadValueOld = UploadCounter.NextSample().RawValue;
+//        }
+
+//        internal void Refresh()
+//        {
+//            _downloadValue = DownloadCounter.NextSample().RawValue;
+//            _uploadValue = UploadCounter.NextSample().RawValue;
+
+//            _downloadSpeed = _downloadValue - _downloadValueOld;
+//            _uploadSpeed = _uploadValue - _uploadValueOld;
+
+//            _downloadValueOld = _downloadValue;
+//            _uploadValueOld = _uploadValue;
+//        }
+
+//        public override string ToString()
+//        {
+//            return _name;
+//        }
+
+//        public string Name
+//        {
+//            get { return _name; }
+//        }
+
+//        public long DownloadSpeed
+//        {
+//            get { return _downloadSpeed; }
+//        }
+
+//        public long UploadSpeed
+//        {
+//            get { return _uploadSpeed; }
+//        }
+
+//        public double DownloadSpeedKbps
+//        {
+//            get { return this._downloadSpeed / 1024.0; }
+//        }
+
+//        public double UploadSpeedKbps
+//        {
+//            get { return this._uploadSpeed / 1024.0; }
+//        }
+
+//        public double DownloadSpeedMbps
+//        {
+//            get { return this._downloadSpeed / 1024.0 / 1024.0; }
+//        }
+
+//        public double UploadSpeedMbps
+//        {
+//            get { return this._uploadSpeed / 1024.0 / 1024.0; }
+//        }
+//    }
+//}

+ 85 - 85
Optimizer/NetworkMonitor.cs

@@ -1,100 +1,100 @@
-using System.Collections;
-using System.Diagnostics;
-using System.Timers;
+//using System.Collections;
+//using System.Diagnostics;
+//using System.Timers;
 
-namespace Optimizer
-{
-    public class NetworkMonitor
-    {
-        Timer _timer;
-        ArrayList _adapters;
-        ArrayList _monitoredAdapters;
+//namespace Optimizer
+//{
+//    public class NetworkMonitor
+//    {
+//        Timer _timer;
+//        ArrayList _adapters;
+//        ArrayList _monitoredAdapters;
 
-        public NetworkMonitor()
-        {
-            _adapters = new ArrayList();
-            _monitoredAdapters = new ArrayList();
-            EnumerateNetworkAdapters();
+//        public NetworkMonitor()
+//        {
+//            _adapters = new ArrayList();
+//            _monitoredAdapters = new ArrayList();
+//            EnumerateNetworkAdapters();
 
-            _timer = new Timer(1000);
-            _timer.Elapsed += new ElapsedEventHandler(timer_Elapsed);
-        }
+//            _timer = new Timer(1000);
+//            _timer.Elapsed += new ElapsedEventHandler(timer_Elapsed);
+//        }
 
-        private void EnumerateNetworkAdapters()
-        {
-            PerformanceCounterCategory category = new PerformanceCounterCategory("Network Interface");
+//        private void EnumerateNetworkAdapters()
+//        {
+//            PerformanceCounterCategory category = new PerformanceCounterCategory("Network Interface");
 
-            foreach (string name in category.GetInstanceNames())
-            {
-                if (name == "MS TCP Loopback interface") continue;
-                if (name.ToLowerInvariant().Contains("virtual")) continue;
-                if (name.ToLowerInvariant().Contains("hyper-v")) continue;
+//            foreach (string name in category.GetInstanceNames())
+//            {
+//                if (name == "MS TCP Loopback interface") continue;
+//                if (name.ToLowerInvariant().Contains("virtual")) continue;
+//                if (name.ToLowerInvariant().Contains("hyper-v")) continue;
 
-                NetworkAdapter adapter = new NetworkAdapter(name);
-                adapter.DownloadCounter = new PerformanceCounter("Network Interface", "Bytes Received/sec", name);
-                adapter.UploadCounter = new PerformanceCounter("Network Interface", "Bytes Sent/sec", name);
-                _adapters.Add(adapter);
-            }
-        }
+//                NetworkAdapter adapter = new NetworkAdapter(name);
+//                adapter.DownloadCounter = new PerformanceCounter("Network Interface", "Bytes Received/sec", name);
+//                adapter.UploadCounter = new PerformanceCounter("Network Interface", "Bytes Sent/sec", name);
+//                _adapters.Add(adapter);
+//            }
+//        }
 
-        private void timer_Elapsed(object sender, ElapsedEventArgs e)
-        {
-            foreach (NetworkAdapter adapter in this._monitoredAdapters)
-            {
-                adapter.Refresh();
-            }
-        }
+//        private void timer_Elapsed(object sender, ElapsedEventArgs e)
+//        {
+//            foreach (NetworkAdapter adapter in this._monitoredAdapters)
+//            {
+//                adapter.Refresh();
+//            }
+//        }
 
-        public NetworkAdapter[] Adapters
-        {
-            get { return (NetworkAdapter[])_adapters.ToArray(typeof(NetworkAdapter)); }
-        }
+//        public NetworkAdapter[] Adapters
+//        {
+//            get { return (NetworkAdapter[])_adapters.ToArray(typeof(NetworkAdapter)); }
+//        }
 
-        public void StartMonitoring()
-        {
-            if (_adapters.Count > 0)
-            {
-                foreach (NetworkAdapter adapter in _adapters)
-                {
-                    if (!_monitoredAdapters.Contains(adapter))
-                    {
-                        _monitoredAdapters.Add(adapter);
-                        adapter.Initialize();
-                    }
-                }
+//        public void StartMonitoring()
+//        {
+//            if (_adapters.Count > 0)
+//            {
+//                foreach (NetworkAdapter adapter in _adapters)
+//                {
+//                    if (!_monitoredAdapters.Contains(adapter))
+//                    {
+//                        _monitoredAdapters.Add(adapter);
+//                        adapter.Initialize();
+//                    }
+//                }
 
-                _timer.Enabled = true;
-            }
-        }
+//                _timer.Enabled = true;
+//            }
+//        }
 
-        public void StartMonitoring(NetworkAdapter adapter)
-        {
-            if (!_monitoredAdapters.Contains(adapter))
-            {
-                _monitoredAdapters.Add(adapter);
-                adapter.Initialize();
-            }
+//        public void StartMonitoring(NetworkAdapter adapter)
+//        {
+//            if (!_monitoredAdapters.Contains(adapter))
+//            {
+//                _monitoredAdapters.Add(adapter);
+//                adapter.Initialize();
+//            }
 
-            _timer.Enabled = true;
-        }
+//            _timer.Enabled = true;
+//        }
 
-        public void StopMonitoring()
-        {
-            _monitoredAdapters.Clear();
-            _timer.Enabled = false;
-        }
+//        public void StopMonitoring()
+//        {
+//            _monitoredAdapters.Clear();
+//            _timer.Enabled = false;
+//        }
 
-        public void StopMonitoring(NetworkAdapter adapter)
-        {
-            if (_monitoredAdapters.Contains(adapter))
-            {
-                _monitoredAdapters.Remove(adapter);
-            }
+//        public void StopMonitoring(NetworkAdapter adapter)
+//        {
+//            if (_monitoredAdapters.Contains(adapter))
+//            {
+//                _monitoredAdapters.Remove(adapter);
+//            }
 
-            if (_monitoredAdapters.Count == 0)
-            {
-                _timer.Enabled = false;
-            }
-        }
-    }
-}
+//            if (_monitoredAdapters.Count == 0)
+//            {
+//                _timer.Enabled = false;
+//            }
+//        }
+//    }
+//}

+ 3 - 3
README.md

@@ -77,6 +77,6 @@ https://github.com/hellzerg/optimizer/blob/master/FEED.md
 
 ## Details: ##
 
-* Latest version: 9.9
-* Released: August 23, 2021
-* SHA256: 09787A03483735FBC3CF4D71A45018C4277FA57DC3A10F5BE048AF18DA15051F
+* Latest version: 10.0
+* Released: September 14, 2021
+* SHA256: B43EC609D4EC51269ED8831091AF840950295E8DF09099C1452236151A5A4358

+ 1 - 1
version.txt

@@ -1 +1 @@
-9.9
+10.0