New node property, penColor, is null by default; this means that color
will be picked using the existing plotColorPalette method.
New node context menu item, Pen color, lets user choose the color to be
used when plotting this particular node.
This property is also saved/loaded from settings based on sensor
identifier.
CURRENTLY: the code that sets plot line colors loops determines a
default color for the all sensors, such that, AFAIK, a given sensor will
always get the same plot color across different runs of the application
(as long as the list of all detected sensors stays the same). This
consistency is nice, but there's no duplicate handling so if the user is
unlucky they can end up with duplicate colors in their plot even when
the plot only contains 2 sensors.
MY CHANGE: I added a second step that attempts to find a new color for
sensors in the plot whose color is being used by another sensor.
However, I tried to keep as much of the old consistency as I could, so
the default color for each sensor is still calculated in the same way as
before. That way if there aren't any duplicate colors, all sensors will
keep the same color they had before the change, so I'm guessing most
users won't even notice the change.
That said, in certain circumstances this change can cause plot colors to
jump around a bit as sensors get added/removed from the plot. For
Example, if sensors A & B have the same default color and you add both
to the plot, sensor B will get assigned a different color in order to
prevent a duplicate color. However if you then remove sensor A from the
plot, sensor B will suddenly revert to it's default color, which may
seem to the user like mysterious action at a distance. Should be rare
though.
Version: 0.7.0.0
System.NullReferenceException: Object reference not set to an instance of an object.
at OpenHardwareMonitor.GUI.MainForm.timer_Tick(Object sender, EventArgs e)
at System.Windows.Forms.Timer.OnTick(EventArgs e)
at System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Common Language Runtime: 4.0.30319.18444
Operating System: Microsoft Windows NT 6.1.7601 Service Pack 1
Process Type: 32-Bit