Cleanup around base collection types. (#59)

* Hardware in IGroup is now IEnumerable. No point to call ToArray each time.

* Use ValueTuple insead of custom pair.

* ListSet -> HashSet

* Ring Collection -> List

* ReadOnlyArray -> ReadOnlyList
This commit is contained in:
Michal
2018-10-30 14:44:41 +01:00
committed by Phyxion
parent 9900f5c0de
commit 5d89cdc43d
32 changed files with 74 additions and 497 deletions
+2 -2
View File
@@ -678,7 +678,7 @@ namespace OpenHardwareMonitor.GUI {
SensorNode node = info.Node.Tag as SensorNode;
if (node != null && node.Sensor != null) {
treeContextMenu.MenuItems.Clear();
if (node.Sensor.Parameters.Length > 0) {
if (node.Sensor.Parameters.Count > 0) {
MenuItem item = new MenuItem("Parameters...");
item.Click += delegate(object obj, EventArgs args) {
ShowParameterForm(node.Sensor);
@@ -854,7 +854,7 @@ namespace OpenHardwareMonitor.GUI {
TreeNodeAdvMouseEventArgs e) {
SensorNode node = e.Node.Tag as SensorNode;
if (node != null && node.Sensor != null &&
node.Sensor.Parameters.Length > 0) {
node.Sensor.Parameters.Count > 0) {
ShowParameterForm(node.Sensor);
}
}