Skip to content

Commit

Permalink
Merge pull request #50 from Lion-Craft/28-network-adapter-info
Browse files Browse the repository at this point in the history
28 network adapter info
  • Loading branch information
Lion-Craft authored Oct 13, 2023
2 parents bcfcd72 + 369b91b commit c5f0f6a
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions Tinyinfo/MainWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ public void getdata(bool loop)
hardwareInfo.RefreshVideoControllerList();
hardwareInfo.RefreshBatteryList();
hardwareInfo.RefreshDriveList();
hardwareInfo.RefreshNetworkAdapterList();

// CPU Info
WriteTextSafe("CPU:" + nl);
Expand Down Expand Up @@ -243,6 +244,32 @@ public void getdata(bool loop)
// Partition Count
AppendTextSafe("\t\tPartition Count: " + drive.Partitions);
}

// Network Adapter Info
AppendTextSafe(nl + "Network Adapter: ");
// Create Network Adapter ID
int netadaptid = 0;
foreach (var netadapt in hardwareInfo.NetworkAdapterList)
{
// NIC ID
AppendTextSafe(nl + "\tNIC " + netadaptid + ":" + nl);
// Name
AppendTextSafe("\t\tName: " + netadapt.Name + nl);
// Product Name
AppendTextSafe("\t\tProduct Name: " + netadapt.ProductName + nl);
// Adapter Type
AppendTextSafe("\t\tType: " + netadapt.NetConnectionID + nl);
// Manufacturer
AppendTextSafe("\t\tManufacturer: " + netadapt.Manufacturer + nl);
// MAC Adress
AppendTextSafe("\t\tMAC Adress: " + netadapt.MACAddress + nl);
// Bytes sent per Second
AppendTextSafe("\t\tBytes sent per Second: " + netadapt.BytesSentPersec + nl);
// Bytes recieved per Second
AppendTextSafe("\t\tBytes recieved per Second: " + netadapt.BytesReceivedPersec);

netadaptid++;
}
}

ShowInfo("");
Expand Down

0 comments on commit c5f0f6a

Please sign in to comment.