예제 #1
0
파일: Memory.cs 프로젝트: khrpnv/PCData
        private void Memory_Load(object sender, EventArgs e)
        {
            CollectingData loadForm = new CollectingData();

            loadForm.Show();
            int slotCount = CPInfo.GetHardwareInfo("Win32_PhysicalMemory", "MaxVoltage").Count;

            textBox1.Text       = "" + slotCount;
            richTextBox1.Height = 21 * slotCount;
            richTextBox1.Text   = GenerateResult(CPInfo.GetHardwareInfo("Win32_PhysicalMemory", "Capacity"), "bytes");
            richTextBox2.Height = 21 * slotCount;
            richTextBox2.Text   = GenerateResult(CPInfo.GetHardwareInfo("Win32_PhysicalMemory", "ConfiguredClockSpeed"), "MHz");
            richTextBox3.Height = 21 * slotCount;
            richTextBox3.Text   = GenerateResult(CPInfo.GetHardwareInfo("Win32_PhysicalMemory", "MinVoltage"), "B");
            richTextBox4.Height = 21 * slotCount;
            richTextBox4.Text   = GenerateResult(CPInfo.GetHardwareInfo("Win32_PhysicalMemory", "MaxVoltage"), "B");
            richTextBox5.Height = 21 * slotCount;
            richTextBox5.Text   = GenerateResult(CPInfo.GetHardwareInfo("Win32_PhysicalMemory", "DeviceLocator"), "");
            richTextBox6.Height = 21 * slotCount;
            richTextBox6.Text   = GenerateResult(CPInfo.GetHardwareInfo("Win32_PhysicalMemory", "Manufacturer"), "");
            richTextBox7.Height = 21 * slotCount;
            richTextBox7.Text   = GenerateResult(CPInfo.GetHardwareInfo("Win32_PhysicalMemory", "SerialNumber"), "");
            richTextBox8.Height = 21 * slotCount;
            richTextBox8.Text   = GenerateResult(CPInfo.GetHardwareInfo("Win32_PhysicalMemory", "FormFactor"), "");
            loadForm.Close();
        }
예제 #2
0
 private void DynamicParams_Load(object sender, EventArgs e)
 {
     textBox4.Text = CPInfo.OutputResult(CPInfo.GetHardwareInfo("Win32_Processor", "LoadPercentage")) + "%";
     textBox1.Text = CPInfo.OutputResult(CPInfo.GetHardwareInfo("Win32_Processor", "CurrentClockSpeed")) + " MHz";
 }
예제 #3
0
 private void timer2_Tick(object sender, EventArgs e)
 {
     textBox1.Text = CPInfo.OutputResult(CPInfo.GetHardwareInfo("Win32_Processor", "CurrentClockSpeed")) + " MHz";
 }
예제 #4
0
 private void timer1_Tick(object sender, EventArgs e)
 {
     textBox4.Text = CPInfo.OutputResult(CPInfo.GetHardwareInfo("Win32_Processor", "LoadPercentage")) + "%";
 }