Skip to content

Commit ea68316

Browse files
committed
Added the new OxyPlot based plot implementation.
1 parent 27fe8ea commit ea68316

8 files changed

+182
-249
lines changed

Collections/ListSet.cs

+7-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This Source Code Form is subject to the terms of the Mozilla Public
44
License, v. 2.0. If a copy of the MPL was not distributed with this
55
file, You can obtain one at http://mozilla.org/MPL/2.0/.
66
7-
Copyright (C) 2009-2010 Michael Möller <[email protected]>
7+
Copyright (C) 2009-2013 Michael Möller <[email protected]>
88
99
*/
1010

@@ -48,5 +48,11 @@ public IEnumerator<T> GetEnumerator() {
4848
IEnumerator IEnumerable.GetEnumerator() {
4949
return list.GetEnumerator();
5050
}
51+
52+
public int Count {
53+
get {
54+
return list.Count;
55+
}
56+
}
5157
}
5258
}

GUI/AboutBox.Designer.cs

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

GUI/MainForm.cs

+5-7
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This Source Code Form is subject to the terms of the Mozilla Public
44
License, v. 2.0. If a copy of the MPL was not distributed with this
55
file, You can obtain one at http://mozilla.org/MPL/2.0/.
66
7-
Copyright (C) 2009-2012 Michael Möller <[email protected]>
7+
Copyright (C) 2009-2013 Michael Möller <[email protected]>
88
Copyright (C) 2010 Paul Werelds <[email protected]>
99
Copyright (C) 2012 Prince Samuel <[email protected]>
1010
@@ -459,8 +459,7 @@ private void PlotSelectionChanged(object sender, EventArgs e) {
459459
int colorIndex = 0;
460460
foreach (TreeNodeAdv node in treeView.AllNodes) {
461461
SensorNode sensorNode = node.Tag as SensorNode;
462-
if (sensorNode != null &&
463-
sensorNode.Sensor.SensorType == SensorType.Temperature) {
462+
if (sensorNode != null) {
464463
if (sensorNode.Plot) {
465464
colors.Add(sensorNode.Sensor,
466465
plotColorPalette[colorIndex % plotColorPalette.Length]);
@@ -484,9 +483,7 @@ private void nodeTextBoxText_EditorShowing(object sender,
484483
private void nodeCheckBox_IsVisibleValueNeeded(object sender,
485484
NodeControlValueEventArgs e) {
486485
SensorNode node = e.Node.Tag as SensorNode;
487-
e.Value = (node != null) &&
488-
(node.Sensor.SensorType == SensorType.Temperature) &&
489-
plotMenuItem.Checked;
486+
e.Value = (node != null) && plotMenuItem.Checked;
490487
}
491488

492489
private void exitClick(object sender, EventArgs e) {
@@ -496,7 +493,7 @@ private void exitClick(object sender, EventArgs e) {
496493
private void timer_Tick(object sender, EventArgs e) {
497494
computer.Accept(updateVisitor);
498495
treeView.Invalidate();
499-
plotPanel.Invalidate();
496+
plotPanel.InvalidatePlot();
500497
systemTray.Redraw();
501498
if (gadget != null)
502499
gadget.Redraw();
@@ -506,6 +503,7 @@ private void timer_Tick(object sender, EventArgs e) {
506503
}
507504

508505
private void SaveConfiguration() {
506+
plotPanel.SetCurrentSettings();
509507
foreach (TreeColumn column in treeView.Columns)
510508
settings.SetValue("treeView.Columns." + column.Header + ".Width",
511509
column.Width);

0 commit comments

Comments
 (0)