Обновить Program.cs

This commit is contained in:
2026-07-31 13:12:54 +03:00
parent 30a4f05ee1
commit 1529786d39
+5 -5
View File
@@ -11,7 +11,7 @@ class View_driver
static void Main(string[] args)
{
List<Drivers> drivers = new List<Drivers>();
string unknownName = "Неизвестное устройство";
string unknownName = "Unknown Device";
var searcher = new ManagementObjectSearcher("SELECT * FROM Win32_PnPEntity");
foreach (ManagementObject obj in searcher.Get())
{
@@ -25,7 +25,7 @@ class View_driver
var statusColor = driver.Status_Device_driver switch
{
"OK" => ConsoleColor.Green,
"Error" => ConsoleColor.Red,
"Error" => ConsoleColor.DarkRed,
"Degraded" => ConsoleColor.Yellow,
_ => ConsoleColor.Gray
};
@@ -33,17 +33,17 @@ class View_driver
? ConsoleColor.Red
: ConsoleColor.DarkGray;
Console.Write("Имя: ");
Console.Write("Name: ");
Console.ForegroundColor = nameColor;
Console.Write(driver.Name_Device_driver);
Console.ResetColor();
Console.Write(" | Статус: ");
Console.Write(" | Status: ");
Console.ForegroundColor = statusColor;
Console.Write(driver.Status_Device_driver);
Console.ResetColor();
Console.Write(" | Путь: ");
Console.Write(" | Path: ");
Console.ForegroundColor = ConsoleColor.DarkYellow;
Console.Write($"{driver.Path_Device_driver}\n");
Console.ResetColor();