|
using System.Windows.Forms;
using System.ComponentModel;
namespace SysInfoLib
{
public class SysInfo: Component{
public SysInfo(){}
public string UserName
{
get
{
return SystemInformation.UserName;
}
}
public string ComputerName
{
get
{
return SystemInformation.ComputerName;
}
}
public string Network
{
get
{
if(SystemInformation.Network)
return "Connected";
else
return "Disconnected";
}
}
public string MonitorInfo
{
get
{
return SystemInformation.MonitorCount.ToString();
}
}
public string MouseInfo
{
get
{
if(SystemInformation.MousePresent)
{
return SystemInformation.MouseButtons.ToString() + " Button Mouse";
}
else
return "No Mouse Connected";
}
}
public string BootInfo
{
get
{
if(SystemInformation.BootMode==BootMode.Normal)
return "Normal";
else if(SystemInformation.BootMode==BootMode.FailSafe)
return "Started In Safe Mode";
else if(SystemInformation.BootMode==BootMode.FailSafeWithNetwork)
return "Started In Safe Mode with Network Support";
else
return "No info";
}
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
Chandra Hundigam-Venkat has Master degree in Computer Application, Microsoft Certified Professional and Cloud & Software Architect. Significantly involved in Cloud solutions, Cloud native application, Cloud migration, Enterprise application development distributed object oriented system development. Started computer career at the early age of eighteen as an intern in computer labs and had the opportunity to work with various USA fortune 500 companies in various technology and leadership roles.