Added code to save and restore the plot sensor selection.

This commit is contained in:
Michael Möller
2012-01-01 17:12:34 +00:00
parent 0b184bb65e
commit 7b66e3f1b5
3 changed files with 55 additions and 29 deletions
+12 -1
View File
@@ -82,6 +82,9 @@ namespace OpenHardwareMonitor.GUI {
bool hidden = settings.GetValue(new Identifier(sensor.Identifier,
"hidden").ToString(), sensor.IsDefaultHidden);
base.IsVisible = !hidden;
this.Plot = settings.GetValue(new Identifier(sensor.Identifier,
"plot").ToString(), false);
}
public override string Text {
@@ -100,9 +103,17 @@ namespace OpenHardwareMonitor.GUI {
public bool Plot {
get { return plot; }
set { plot = value; }
set {
plot = value;
settings.SetValue(new Identifier(sensor.Identifier, "plot").ToString(),
value);
if (PlotSelectionChanged != null)
PlotSelectionChanged(this, null);
}
}
public event EventHandler PlotSelectionChanged;
public ISensor Sensor {
get { return sensor; }
}