mirror of
https://github.com/openhardwaremonitor/openhardwaremonitor
synced 2025-08-30 22:05:08 +00:00
Changed a few context menu items to display a radio option style. Added additional information from the SMBIOS to the report.
This commit is contained in:
17
GUI/MainForm.Designer.cs
generated
17
GUI/MainForm.Designer.cs
generated
@@ -54,6 +54,7 @@ namespace OpenHardwareMonitor.GUI {
|
||||
this.menuItem5 = new System.Windows.Forms.MenuItem();
|
||||
this.mainboardMenuItem = new System.Windows.Forms.MenuItem();
|
||||
this.cpuMenuItem = new System.Windows.Forms.MenuItem();
|
||||
this.ramMenuItem = new System.Windows.Forms.MenuItem();
|
||||
this.gpuMenuItem = new System.Windows.Forms.MenuItem();
|
||||
this.fanControllerMenuItem = new System.Windows.Forms.MenuItem();
|
||||
this.hddMenuItem = new System.Windows.Forms.MenuItem();
|
||||
@@ -94,7 +95,6 @@ namespace OpenHardwareMonitor.GUI {
|
||||
this.timer = new System.Windows.Forms.Timer(this.components);
|
||||
this.splitContainer = new OpenHardwareMonitor.GUI.SplitContainerAdv();
|
||||
this.treeView = new Aga.Controls.Tree.TreeViewAdv();
|
||||
this.ramMenuItem = new System.Windows.Forms.MenuItem();
|
||||
this.splitContainer.Panel1.SuspendLayout();
|
||||
this.splitContainer.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
@@ -244,6 +244,11 @@ namespace OpenHardwareMonitor.GUI {
|
||||
this.cpuMenuItem.Index = 1;
|
||||
this.cpuMenuItem.Text = "CPU";
|
||||
//
|
||||
// ramMenuItem
|
||||
//
|
||||
this.ramMenuItem.Index = 2;
|
||||
this.ramMenuItem.Text = "RAM";
|
||||
//
|
||||
// gpuMenuItem
|
||||
//
|
||||
this.gpuMenuItem.Index = 3;
|
||||
@@ -389,12 +394,14 @@ namespace OpenHardwareMonitor.GUI {
|
||||
// celsiusMenuItem
|
||||
//
|
||||
this.celsiusMenuItem.Index = 0;
|
||||
this.celsiusMenuItem.RadioCheck = true;
|
||||
this.celsiusMenuItem.Text = "Celsius";
|
||||
this.celsiusMenuItem.Click += new System.EventHandler(this.celsiusMenuItem_Click);
|
||||
//
|
||||
// fahrenheitMenuItem
|
||||
//
|
||||
this.fahrenheitMenuItem.Index = 1;
|
||||
this.fahrenheitMenuItem.RadioCheck = true;
|
||||
this.fahrenheitMenuItem.Text = "Fahrenheit";
|
||||
this.fahrenheitMenuItem.Click += new System.EventHandler(this.fahrenheitMenuItem_Click);
|
||||
//
|
||||
@@ -410,16 +417,19 @@ namespace OpenHardwareMonitor.GUI {
|
||||
// plotWindowMenuItem
|
||||
//
|
||||
this.plotWindowMenuItem.Index = 0;
|
||||
this.plotWindowMenuItem.RadioCheck = true;
|
||||
this.plotWindowMenuItem.Text = "Window";
|
||||
//
|
||||
// plotBottomMenuItem
|
||||
//
|
||||
this.plotBottomMenuItem.Index = 1;
|
||||
this.plotBottomMenuItem.RadioCheck = true;
|
||||
this.plotBottomMenuItem.Text = "Bottom";
|
||||
//
|
||||
// plotRightMenuItem
|
||||
//
|
||||
this.plotRightMenuItem.Index = 2;
|
||||
this.plotRightMenuItem.RadioCheck = true;
|
||||
this.plotRightMenuItem.Text = "Right";
|
||||
//
|
||||
// MenuItem4
|
||||
@@ -527,11 +537,6 @@ namespace OpenHardwareMonitor.GUI {
|
||||
this.treeView.MouseMove += new System.Windows.Forms.MouseEventHandler(this.treeView_MouseMove);
|
||||
this.treeView.MouseUp += new System.Windows.Forms.MouseEventHandler(this.treeView_MouseUp);
|
||||
//
|
||||
// ramMenuItem
|
||||
//
|
||||
this.ramMenuItem.Index = 2;
|
||||
this.ramMenuItem.Text = "RAM";
|
||||
//
|
||||
// MainForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
|
@@ -647,6 +647,7 @@ namespace OpenHardwareMonitor.GUI {
|
||||
if (i <= control.MaxSoftwareValue &&
|
||||
i >= control.MinSoftwareValue) {
|
||||
MenuItem item = new MenuItem(i + " %");
|
||||
item.RadioCheck = true;
|
||||
manualItem.MenuItems.Add(item);
|
||||
item.Checked = control.ControlMode == ControlMode.Software &&
|
||||
Math.Round(control.SoftwareValue) == i;
|
||||
|
@@ -25,6 +25,7 @@ namespace OpenHardwareMonitor.Hardware {
|
||||
private readonly BIOSInformation biosInformation;
|
||||
private readonly SystemInformation systemInformation;
|
||||
private readonly BaseBoardInformation baseBoardInformation;
|
||||
private readonly ProcessorInformation processorInformation;
|
||||
private readonly MemoryDevice[] memoryDevices;
|
||||
|
||||
private static string ReadSysFS(string path) {
|
||||
@@ -129,6 +130,9 @@ namespace OpenHardwareMonitor.Hardware {
|
||||
case 0x02: this.baseBoardInformation = new BaseBoardInformation(
|
||||
type, handle, data, stringsList.ToArray());
|
||||
structureList.Add(this.baseBoardInformation); break;
|
||||
case 0x04: this.processorInformation = new ProcessorInformation(
|
||||
type, handle, data, stringsList.ToArray());
|
||||
structureList.Add(this.processorInformation); break;
|
||||
case 0x11: MemoryDevice m = new MemoryDevice(
|
||||
type, handle, data, stringsList.ToArray());
|
||||
memoryDeviceList.Add(m);
|
||||
@@ -178,6 +182,23 @@ namespace OpenHardwareMonitor.Hardware {
|
||||
r.AppendLine();
|
||||
}
|
||||
|
||||
if (Processor != null) {
|
||||
r.Append("Processor Manufacturer: ");
|
||||
r.AppendLine(Processor.ManufacturerName);
|
||||
r.Append("Processor Version: ");
|
||||
r.AppendLine(Processor.Version);
|
||||
r.Append("Processor Core Count: ");
|
||||
r.AppendLine(Processor.CoreCount.ToString());
|
||||
r.Append("Processor Core Enabled: ");
|
||||
r.AppendLine(Processor.CoreEnabled.ToString());
|
||||
r.Append("Processor Thread Count: ");
|
||||
r.AppendLine(Processor.ThreadCount.ToString());
|
||||
r.Append("Processor External Clock: ");
|
||||
r.Append(Processor.ExternalClock);
|
||||
r.AppendLine(" Mhz");
|
||||
r.AppendLine();
|
||||
}
|
||||
|
||||
for (int i = 0; i < MemoryDevices.Length; i++) {
|
||||
r.Append("Memory Device [" + i + "] Manufacturer: ");
|
||||
r.AppendLine(MemoryDevices[i].ManufacturerName);
|
||||
@@ -187,6 +208,9 @@ namespace OpenHardwareMonitor.Hardware {
|
||||
r.AppendLine(MemoryDevices[i].DeviceLocator);
|
||||
r.Append("Memory Device [" + i + "] Bank Locator: ");
|
||||
r.AppendLine(MemoryDevices[i].BankLocator);
|
||||
r.Append("Memory Device [" + i + "] Speed: ");
|
||||
r.Append(MemoryDevices[i].Speed);
|
||||
r.AppendLine(" MHz");
|
||||
r.AppendLine();
|
||||
}
|
||||
|
||||
@@ -223,6 +247,11 @@ namespace OpenHardwareMonitor.Hardware {
|
||||
get { return baseBoardInformation; }
|
||||
}
|
||||
|
||||
|
||||
public ProcessorInformation Processor {
|
||||
get { return processorInformation; }
|
||||
}
|
||||
|
||||
public MemoryDevice[] MemoryDevices {
|
||||
get { return memoryDevices; }
|
||||
}
|
||||
@@ -234,6 +263,20 @@ namespace OpenHardwareMonitor.Hardware {
|
||||
private readonly byte[] data;
|
||||
private readonly string[] strings;
|
||||
|
||||
protected int GetByte(int offset) {
|
||||
if (offset < data.Length && offset >= 0)
|
||||
return data[offset];
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
protected int GetWord(int offset) {
|
||||
if (offset + 1 < data.Length && offset >= 0)
|
||||
return (data[offset + 1] << 8) | data[offset];
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
protected string GetString(int offset) {
|
||||
if (offset < data.Length && data[offset] > 0 &&
|
||||
data[offset] <= strings.Length)
|
||||
@@ -359,6 +402,33 @@ namespace OpenHardwareMonitor.Hardware {
|
||||
|
||||
}
|
||||
|
||||
public class ProcessorInformation : Structure {
|
||||
|
||||
public ProcessorInformation(byte type, ushort handle, byte[] data,
|
||||
string[] strings)
|
||||
: base(type, handle, data, strings)
|
||||
{
|
||||
this.ManufacturerName = GetString(0x07).Trim();
|
||||
this.Version = GetString(0x10).Trim();
|
||||
this.CoreCount = GetByte(0x23);
|
||||
this.CoreEnabled = GetByte(0x24);
|
||||
this.ThreadCount = GetByte(0x25);
|
||||
this.ExternalClock = GetWord(0x12);
|
||||
}
|
||||
|
||||
public string ManufacturerName { get; private set; }
|
||||
|
||||
public string Version { get; private set; }
|
||||
|
||||
public int CoreCount { get; private set; }
|
||||
|
||||
public int CoreEnabled { get; private set; }
|
||||
|
||||
public int ThreadCount { get; private set; }
|
||||
|
||||
public int ExternalClock { get; private set; }
|
||||
}
|
||||
|
||||
public class MemoryDevice : Structure {
|
||||
|
||||
private readonly string deviceLocator;
|
||||
@@ -366,6 +436,7 @@ namespace OpenHardwareMonitor.Hardware {
|
||||
private readonly string manufacturerName;
|
||||
private readonly string serialNumber;
|
||||
private readonly string partNumber;
|
||||
private readonly int speed;
|
||||
|
||||
public MemoryDevice(byte type, ushort handle, byte[] data,
|
||||
string[] strings)
|
||||
@@ -376,6 +447,7 @@ namespace OpenHardwareMonitor.Hardware {
|
||||
this.manufacturerName = GetString(0x17).Trim();
|
||||
this.serialNumber = GetString(0x18).Trim();
|
||||
this.partNumber = GetString(0x1A).Trim();
|
||||
this.speed = GetWord(0x15);
|
||||
}
|
||||
|
||||
public string DeviceLocator { get { return deviceLocator; } }
|
||||
@@ -388,7 +460,7 @@ namespace OpenHardwareMonitor.Hardware {
|
||||
|
||||
public string PartNumber { get { return partNumber; } }
|
||||
|
||||
|
||||
public int Speed { get { return speed; } }
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -10,5 +10,5 @@
|
||||
|
||||
using System.Reflection;
|
||||
|
||||
[assembly: AssemblyVersion("0.5.1.0")]
|
||||
[assembly: AssemblyInformationalVersion("0.5.1 Beta")]
|
||||
[assembly: AssemblyVersion("0.5.1.1")]
|
||||
[assembly: AssemblyInformationalVersion("0.5.1.1 Alpha")]
|
Reference in New Issue
Block a user