private void button1_Click(object sender, EventArgs e) { this.Hide(); CPInfo cp_info = new CPInfo(); cp_info.Show(); }
public ConstantValueAttribute(ref ReadOnlySpan <byte> data, CPInfo[] constants) : base(ref data, constants) { ReadOnlySpan <byte> infoAsSpan = info.AsSpan(); ConstantValueIndex = infoAsSpan.ReadTwo(); ConstantValue = constants[ConstantValueIndex]; }
private void MotherBoard_Load(object sender, EventArgs e) { CollectingData loadForm = new CollectingData(); loadForm.Show(); textBox6.Text = CPInfo.OutputResult(CPInfo.GetHardwareInfo("Win32_BaseBoard", "Manufacturer")); textBox5.Text = CPInfo.OutputResult(CPInfo.GetHardwareInfo("Win32_BaseBoard", "Product")); textBox4.Text = CPInfo.OutputResult(CPInfo.GetHardwareInfo("Win32_BaseBoard", "Version")); textBox11.Text = CPInfo.OutputResult(CPInfo.GetHardwareInfo("Win32_BaseBoard", "SerialNumber")); textBox9.Text = CPInfo.OutputResult(CPInfo.GetHardwareInfo("Win32_BIOS", "Manufacturer")); textBox8.Text = GetDate(CPInfo.OutputResult(CPInfo.GetHardwareInfo("Win32_BIOS", "ReleaseDate"))); textBox7.Text = CPInfo.OutputResult(CPInfo.GetHardwareInfo("Win32_BIOS", "Description")); textBox10.Text = CPInfo.OutputResult(CPInfo.GetHardwareInfo("Win32_BIOS", "SerialNumber")); loadForm.Close(); }
public ElementValue(ref ReadOnlySpan <byte> data, CPInfo[] Constants) { Tag = data.ReadOne(); switch ((char)Tag) { case 'B': case 'C': case 'D': case 'F': case 'I': case 'J': case 'S': case 'Z': case 's': ConstValueIndex = data.ReadTwo(); ConstantValue = Constants[ConstValueIndex]; break; case 'e': TypeNameIndex = data.ReadTwo(); ConstNameIndex = data.ReadTwo(); TypeName = ((CUtf8Info)Constants[TypeNameIndex]).String; ConstName = ((CUtf8Info)Constants[ConstNameIndex]).String; break; case 'c': ClassInfoIndex = data.ReadTwo(); ClassInfo = (CClassInfo)Constants[ClassInfoIndex]; break; case '@': AnnotationValue = new Annotation(ref data, Constants); break; case '[': NumValues = data.ReadTwo(); Values = new ElementValue[NumValues]; for (int i = 0; i < NumValues; i++) { Values[i] = new ElementValue(ref data, Constants); } break; default: throw new InvalidOperationException(); } }
private void GeneralInfo_Load(object sender, EventArgs e) { long ROM = 0; ROM = (long)Convert.ToUInt64(CPInfo.OutputResult(CPInfo.GetHardwareInfo("Win32_DiskDrive", "Size"))); ROM = ROM / 1000000000; CollectingData loadForm = new CollectingData(); loadForm.Show(); textBox1.Text = "" + Environment.OSVersion; textBox2.Text = "" + Environment.MachineName; textBox3.Text = "" + Environment.ProcessorCount; textBox4.Text = "" + Environment.SystemDirectory; textBox5.Text = String.Join(", ", Environment.GetLogicalDrives()) .TrimEnd(',', ' ') .Replace("\\", String.Empty); textBox6.Text = "" + ROM + " Gb"; textBox7.Text = CPInfo.OutputResult(CPInfo.GetHardwareInfo("Win32_VideoController", "Name")); textBox8.Text = "" + GetTotalMemoryInBytes() + " GB"; loadForm.Close(); }
private void Graphics_Load(object sender, EventArgs e) { CollectingData loadForm = new CollectingData(); loadForm.Show(); int adapterRAM = Convert.ToInt32(CPInfo.OutputResult(CPInfo.GetHardwareInfo("Win32_VideoController", "AdapterRAM"))) / 1000000000; textBox1.Text = CPInfo.OutputResult(CPInfo.GetHardwareInfo("Win32_VideoController", "Name")); textBox2.Text = CPInfo.OutputResult(CPInfo.GetHardwareInfo("Win32_VideoController", "VideoProcessor")); textBox3.Text = CPInfo.OutputResult(CPInfo.GetHardwareInfo("Win32_VideoController", "AdapterCompatibility")); textBox5.Text = CPInfo.OutputResult(CPInfo.GetHardwareInfo("Win32_VideoController", "AdapterDACType")); textBox6.Text = CPInfo.OutputResult(CPInfo.GetHardwareInfo("Win32_VideoController", "CurrentHorizontalResolution")); textBox7.Text = CPInfo.OutputResult(CPInfo.GetHardwareInfo("Win32_VideoController", "CurrentNumberOfColors")); textBox10.Text = CPInfo.OutputResult(CPInfo.GetHardwareInfo("Win32_VideoController", "CurrentVerticalResolution")); textBox9.Text = CPInfo.OutputResult(CPInfo.GetHardwareInfo("Win32_VideoController", "DriverVersion")); textBox4.Text = "" + adapterRAM + " Gb"; textBox8.Text = MotherBoard.GetDate(CPInfo.OutputResult(CPInfo.GetHardwareInfo("Win32_VideoController", "DriverDate"))); textBox11.Text = CPInfo.OutputResult(CPInfo.GetHardwareInfo("Win32_VideoController", "CurrentBitsPerPixel")) + " Kb"; textBox13.Text = CPInfo.OutputResult(CPInfo.GetHardwareInfo("Win32_VideoController", "MaxRefreshRate")) + " fps"; textBox12.Text = CPInfo.OutputResult(CPInfo.GetHardwareInfo("Win32_VideoController", "MinRefreshRate")) + " fps"; loadForm.Close(); }