Fixed Issue 164.
This commit is contained in:
+15
-14
@@ -151,42 +151,43 @@ namespace OpenHardwareMonitor.Hardware {
|
||||
IHardware hardware, TextWriter w, string space)
|
||||
{
|
||||
w.WriteLine("{0}|", space);
|
||||
w.WriteLine("{0}+-+ {1} ({2})",
|
||||
w.WriteLine("{0}+- {1} ({2})",
|
||||
space, hardware.Name, hardware.Identifier);
|
||||
ISensor[] sensors = hardware.Sensors;
|
||||
Array.Sort(sensors, CompareSensor);
|
||||
foreach (ISensor sensor in sensors) {
|
||||
w.WriteLine("{0}| +- {1}[{2}] : {3} : {4}",
|
||||
space, sensor.SensorType, sensor.Index,
|
||||
string.Format(CultureInfo.InvariantCulture, "{0} : {1} : {2}",
|
||||
sensor.Value, sensor.Min, sensor.Max), sensor.Name);
|
||||
w.WriteLine("{0}| +- {1,-14} : {2,8:G6} {3,8:G6} {4,8:G6} ({5})",
|
||||
space, sensor.Name, sensor.Value, sensor.Min, sensor.Max,
|
||||
sensor.Identifier);
|
||||
}
|
||||
foreach (IHardware subHardware in hardware.SubHardware)
|
||||
ReportHardwareSensorTree(subHardware, w, "| ");
|
||||
ReportHardwareSensorTree(subHardware, w, "| ");
|
||||
}
|
||||
|
||||
private static void ReportHardwareParameterTree(
|
||||
IHardware hardware, TextWriter w, string space)
|
||||
{
|
||||
IHardware hardware, TextWriter w, string space) {
|
||||
w.WriteLine("{0}|", space);
|
||||
w.WriteLine("{0}+-+ {1} ({2})",
|
||||
w.WriteLine("{0}+- {1} ({2})",
|
||||
space, hardware.Name, hardware.Identifier);
|
||||
ISensor[] sensors = hardware.Sensors;
|
||||
Array.Sort(sensors, CompareSensor);
|
||||
foreach (ISensor sensor in sensors) {
|
||||
string innerSpace = space + "| ";
|
||||
if (sensor.Parameters.Length > 0) {
|
||||
w.WriteLine("{0}| +- {1}[{2}] : {3}",
|
||||
space, sensor.SensorType, sensor.Index, sensor.Name);
|
||||
w.WriteLine("{0}|", innerSpace);
|
||||
w.WriteLine("{0}+- {1} ({2})",
|
||||
innerSpace, sensor.Name, sensor.Identifier);
|
||||
foreach (IParameter parameter in sensor.Parameters) {
|
||||
w.WriteLine("{0}| +- {1} : {2}",
|
||||
space, parameter.Name,
|
||||
string innerInnerSpace = innerSpace + "| ";
|
||||
w.WriteLine("{0}+- {1} : {2}",
|
||||
innerInnerSpace, parameter.Name,
|
||||
string.Format(CultureInfo.InvariantCulture, "{0} : {1}",
|
||||
parameter.DefaultValue, parameter.Value));
|
||||
}
|
||||
}
|
||||
}
|
||||
foreach (IHardware subHardware in hardware.SubHardware)
|
||||
ReportHardwareParameterTree(subHardware, w, "| ");
|
||||
ReportHardwareParameterTree(subHardware, w, "| ");
|
||||
}
|
||||
|
||||
private static void ReportHardware(IHardware hardware, TextWriter w) {
|
||||
|
||||
@@ -182,10 +182,12 @@ namespace OpenHardwareMonitor.Hardware.Heatmaster {
|
||||
|
||||
public string GetReport() {
|
||||
if (report.Length > 0) {
|
||||
report.Insert(0, "Serial Port Heatmaster" + Environment.NewLine +
|
||||
Environment.NewLine);
|
||||
report.AppendLine();
|
||||
return report.ToString();
|
||||
StringBuilder r = new StringBuilder();
|
||||
r.AppendLine("Serial Port Heatmaster");
|
||||
r.AppendLine();
|
||||
r.Append(report);
|
||||
r.AppendLine();
|
||||
return r.ToString();
|
||||
} else
|
||||
return null;
|
||||
}
|
||||
|
||||
+6
-4
@@ -168,10 +168,12 @@ namespace OpenHardwareMonitor.Hardware {
|
||||
|
||||
public static string GetReport() {
|
||||
if (report.Length > 0) {
|
||||
report.Insert(0, "Ring0" + Environment.NewLine +
|
||||
Environment.NewLine);
|
||||
report.AppendLine();
|
||||
return report.ToString();
|
||||
StringBuilder r = new StringBuilder();
|
||||
r.AppendLine("Ring0");
|
||||
r.AppendLine();
|
||||
r.Append(report);
|
||||
r.AppendLine();
|
||||
return r.ToString();
|
||||
} else
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -163,10 +163,12 @@ namespace OpenHardwareMonitor.Hardware.TBalancer {
|
||||
|
||||
public string GetReport() {
|
||||
if (report.Length > 0) {
|
||||
report.Insert(0, "FTD2XX" + Environment.NewLine +
|
||||
Environment.NewLine);
|
||||
report.AppendLine();
|
||||
return report.ToString();
|
||||
StringBuilder r = new StringBuilder();
|
||||
r.AppendLine("FTD2XX");
|
||||
r.AppendLine();
|
||||
r.Append(report);
|
||||
r.AppendLine();
|
||||
return r.ToString();
|
||||
} else
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user