Skip to content

Commit

Permalink
Added the new OxyPlot based plot implementation.
Browse files Browse the repository at this point in the history
  • Loading branch information
moellerm committed Jun 9, 2013
1 parent 27fe8ea commit ea68316
Show file tree
Hide file tree
Showing 8 changed files with 182 additions and 249 deletions.
8 changes: 7 additions & 1 deletion Collections/ListSet.cs
Expand Up @@ -4,7 +4,7 @@
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
Copyright (C) 2009-2010 Michael Möller <mmoeller@openhardwaremonitor.org>
Copyright (C) 2009-2013 Michael Möller <mmoeller@openhardwaremonitor.org>
*/

Expand Down Expand Up @@ -48,5 +48,11 @@ public class ListSet<T> : IEnumerable<T> {
IEnumerator IEnumerable.GetEnumerator() {
return list.GetEnumerator();
}

public int Count {
get {
return list.Count;
}
}
}
}
4 changes: 2 additions & 2 deletions GUI/AboutBox.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 5 additions & 7 deletions GUI/MainForm.cs
Expand Up @@ -4,7 +4,7 @@
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
Copyright (C) 2009-2012 Michael Möller <mmoeller@openhardwaremonitor.org>
Copyright (C) 2009-2013 Michael Möller <mmoeller@openhardwaremonitor.org>
Copyright (C) 2010 Paul Werelds <paul@werelds.net>
Copyright (C) 2012 Prince Samuel <prince.samuel@gmail.com>
Expand Down Expand Up @@ -459,8 +459,7 @@ public partial class MainForm : Form {
int colorIndex = 0;
foreach (TreeNodeAdv node in treeView.AllNodes) {
SensorNode sensorNode = node.Tag as SensorNode;
if (sensorNode != null &&
sensorNode.Sensor.SensorType == SensorType.Temperature) {
if (sensorNode != null) {
if (sensorNode.Plot) {
colors.Add(sensorNode.Sensor,
plotColorPalette[colorIndex % plotColorPalette.Length]);
Expand All @@ -484,9 +483,7 @@ public partial class MainForm : Form {
private void nodeCheckBox_IsVisibleValueNeeded(object sender,
NodeControlValueEventArgs e) {
SensorNode node = e.Node.Tag as SensorNode;
e.Value = (node != null) &&
(node.Sensor.SensorType == SensorType.Temperature) &&
plotMenuItem.Checked;
e.Value = (node != null) && plotMenuItem.Checked;
}

private void exitClick(object sender, EventArgs e) {
Expand All @@ -496,7 +493,7 @@ public partial class MainForm : Form {
private void timer_Tick(object sender, EventArgs e) {
computer.Accept(updateVisitor);
treeView.Invalidate();
plotPanel.Invalidate();
plotPanel.InvalidatePlot();
systemTray.Redraw();
if (gadget != null)
gadget.Redraw();
Expand All @@ -506,6 +503,7 @@ public partial class MainForm : Form {
}

private void SaveConfiguration() {
plotPanel.SetCurrentSettings();
foreach (TreeColumn column in treeView.Columns)
settings.SetValue("treeView.Columns." + column.Header + ".Width",
column.Width);
Expand Down

0 comments on commit ea68316

Please sign in to comment.