using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO;
using Microsoft.Win32;
using System.Management;
using System.Management.Instrumentation;
namespace MRC_Pc_Information
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
label11.Text = System.Environment.ProcessorCount.ToString();
#region İşletim Sistemi
RegistryKey Rkey = Registry.LocalMachine;
Rkey = Rkey.OpenSubKey("HARDWARE\\DESCRIPTION\\System\\BIOS");
label1.Text = (string)Rkey.GetValue("SystemVersion").ToString();
RegistryKey Rkey1 = Registry.LocalMachine;
Rkey1 = Rkey1.OpenSubKey("HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0");
label2.Text = (string)Rkey1.GetValue("ProcessorNameString").ToString();
#endregion
#region RAM
ManagementObjectSearcher Search = new ManagementObjectSearcher("Select * From Win32_ComputerSystem");
foreach (ManagementObject Mobject in Search.Get())
{
double Ram_Bytes = (Convert.ToDouble(Mobject["TotalPhysicalMemory"]));
double ramgb = Ram_Bytes / 1073741824;
double islem = Math.Ceiling(ramgb);
string mesaj = " GB";
label5.Text = islem.ToString() + mesaj;
}
#endregion
#region EKRAN KARTI
ManagementObjectSearcher ekran = new ManagementObjectSearcher("Select * From Win32_VideoController");
foreach (ManagementObject Mobject in ekran.Get())
{
label7.Text = Mobject["name"].ToString() + " " + Mobject["AdapterRam"].ToString();
}
#endregion
label9.Text=System.Environment.UserName.ToString();
label16.Text = System.Environment.OSVersion.ToString();
}
private void label9_Click(object sender, EventArgs e)
{
label11.Text=System.Environment.ProcessorCount.ToString();
}
}
}