Fixed Issue 82.
1.1 --- a/GUI/MainForm.Designer.cs Sun Jul 04 12:12:37 2010 +0000
1.2 +++ b/GUI/MainForm.Designer.cs Sun Jul 04 12:49:16 2010 +0000
1.3 @@ -76,6 +76,8 @@
1.4 this.menuStrip = new System.Windows.Forms.MenuStrip();
1.5 this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
1.6 this.saveReportToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
1.7 + this.sumbitReportToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
1.8 + this.toolStripMenuItem2 = new System.Windows.Forms.ToolStripSeparator();
1.9 this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
1.10 this.viewToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
1.11 this.hiddenMenuItem = new System.Windows.Forms.ToolStripMenuItem();
1.12 @@ -102,8 +104,8 @@
1.13 this.sensorContextMenuStrip = new System.Windows.Forms.ContextMenuStrip(this.components);
1.14 this.saveFileDialog = new System.Windows.Forms.SaveFileDialog();
1.15 this.timer = new System.Windows.Forms.Timer(this.components);
1.16 - this.toolStripMenuItem2 = new System.Windows.Forms.ToolStripSeparator();
1.17 - this.sumbitReportToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
1.18 + this.toolStripMenuItem3 = new System.Windows.Forms.ToolStripSeparator();
1.19 + this.resetMinMaxMenuItem = new System.Windows.Forms.ToolStripMenuItem();
1.20 this.menuStrip.SuspendLayout();
1.21 this.splitContainer.Panel1.SuspendLayout();
1.22 this.splitContainer.Panel2.SuspendLayout();
1.23 @@ -243,6 +245,18 @@
1.24 this.saveReportToolStripMenuItem.Text = "Save Report...";
1.25 this.saveReportToolStripMenuItem.Click += new System.EventHandler(this.saveReportToolStripMenuItem_Click);
1.26 //
1.27 + // sumbitReportToolStripMenuItem
1.28 + //
1.29 + this.sumbitReportToolStripMenuItem.Name = "sumbitReportToolStripMenuItem";
1.30 + this.sumbitReportToolStripMenuItem.Size = new System.Drawing.Size(159, 22);
1.31 + this.sumbitReportToolStripMenuItem.Text = "Submit Report...";
1.32 + this.sumbitReportToolStripMenuItem.Click += new System.EventHandler(this.sumbitReportToolStripMenuItem_Click);
1.33 + //
1.34 + // toolStripMenuItem2
1.35 + //
1.36 + this.toolStripMenuItem2.Name = "toolStripMenuItem2";
1.37 + this.toolStripMenuItem2.Size = new System.Drawing.Size(156, 6);
1.38 + //
1.39 // exitToolStripMenuItem
1.40 //
1.41 this.exitToolStripMenuItem.Name = "exitToolStripMenuItem";
1.42 @@ -253,6 +267,8 @@
1.43 // viewToolStripMenuItem
1.44 //
1.45 this.viewToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
1.46 + this.resetMinMaxMenuItem,
1.47 + this.toolStripMenuItem3,
1.48 this.hiddenMenuItem,
1.49 this.plotMenuItem,
1.50 this.toolStripMenuItem1,
1.51 @@ -464,17 +480,17 @@
1.52 this.timer.Interval = 1000;
1.53 this.timer.Tick += new System.EventHandler(this.timer_Tick);
1.54 //
1.55 - // toolStripMenuItem2
1.56 + // toolStripMenuItem3
1.57 //
1.58 - this.toolStripMenuItem2.Name = "toolStripMenuItem2";
1.59 - this.toolStripMenuItem2.Size = new System.Drawing.Size(156, 6);
1.60 + this.toolStripMenuItem3.Name = "toolStripMenuItem3";
1.61 + this.toolStripMenuItem3.Size = new System.Drawing.Size(185, 6);
1.62 //
1.63 - // sumbitReportToolStripMenuItem
1.64 + // resetMinMaxMenuItem
1.65 //
1.66 - this.sumbitReportToolStripMenuItem.Name = "sumbitReportToolStripMenuItem";
1.67 - this.sumbitReportToolStripMenuItem.Size = new System.Drawing.Size(159, 22);
1.68 - this.sumbitReportToolStripMenuItem.Text = "Submit Report...";
1.69 - this.sumbitReportToolStripMenuItem.Click += new System.EventHandler(this.sumbitReportToolStripMenuItem_Click);
1.70 + this.resetMinMaxMenuItem.Name = "resetMinMaxMenuItem";
1.71 + this.resetMinMaxMenuItem.Size = new System.Drawing.Size(188, 22);
1.72 + this.resetMinMaxMenuItem.Text = "Reset Min/Max";
1.73 + this.resetMinMaxMenuItem.Click += new System.EventHandler(this.resetMinMaxMenuItem_Click);
1.74 //
1.75 // MainForm
1.76 //
1.77 @@ -543,6 +559,8 @@
1.78 private System.Windows.Forms.ToolStripMenuItem fahrenheitToolStripMenuItem;
1.79 private System.Windows.Forms.ToolStripMenuItem sumbitReportToolStripMenuItem;
1.80 private System.Windows.Forms.ToolStripSeparator toolStripMenuItem2;
1.81 + private System.Windows.Forms.ToolStripMenuItem resetMinMaxMenuItem;
1.82 + private System.Windows.Forms.ToolStripSeparator toolStripMenuItem3;
1.83 }
1.84 }
1.85
2.1 --- a/GUI/MainForm.cs Sun Jul 04 12:12:37 2010 +0000
2.2 +++ b/GUI/MainForm.cs Sun Jul 04 12:49:16 2010 +0000
2.3 @@ -462,5 +462,10 @@
2.4 form.Report = computer.GetReport();
2.5 form.ShowDialog();
2.6 }
2.7 +
2.8 + private void resetMinMaxMenuItem_Click(object sender, EventArgs e) {
2.9 + IVisitor visitor = new ResetMinMaxVisitor();
2.10 + computer.Accept(visitor);
2.11 + }
2.12 }
2.13 }
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
3.2 +++ b/GUI/ResetMinMaxVisitor.cs Sun Jul 04 12:49:16 2010 +0000
3.3 @@ -0,0 +1,59 @@
3.4 +/*
3.5 +
3.6 + Version: MPL 1.1/GPL 2.0/LGPL 2.1
3.7 +
3.8 + The contents of this file are subject to the Mozilla Public License Version
3.9 + 1.1 (the "License"); you may not use this file except in compliance with
3.10 + the License. You may obtain a copy of the License at
3.11 +
3.12 + http://www.mozilla.org/MPL/
3.13 +
3.14 + Software distributed under the License is distributed on an "AS IS" basis,
3.15 + WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
3.16 + for the specific language governing rights and limitations under the License.
3.17 +
3.18 + The Original Code is the Open Hardware Monitor code.
3.19 +
3.20 + The Initial Developer of the Original Code is
3.21 + Michael Möller <m.moeller@gmx.ch>.
3.22 + Portions created by the Initial Developer are Copyright (C) 2009-2010
3.23 + the Initial Developer. All Rights Reserved.
3.24 +
3.25 + Contributor(s):
3.26 +
3.27 + Alternatively, the contents of this file may be used under the terms of
3.28 + either the GNU General Public License Version 2 or later (the "GPL"), or
3.29 + the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
3.30 + in which case the provisions of the GPL or the LGPL are applicable instead
3.31 + of those above. If you wish to allow use of your version of this file only
3.32 + under the terms of either the GPL or the LGPL, and not to allow others to
3.33 + use your version of this file under the terms of the MPL, indicate your
3.34 + decision by deleting the provisions above and replace them with the notice
3.35 + and other provisions required by the GPL or the LGPL. If you do not delete
3.36 + the provisions above, a recipient may use your version of this file under
3.37 + the terms of any one of the MPL, the GPL or the LGPL.
3.38 +
3.39 +*/
3.40 +
3.41 +using System;
3.42 +using System.Collections.Generic;
3.43 +using OpenHardwareMonitor.Hardware;
3.44 +
3.45 +namespace OpenHardwareMonitor.GUI {
3.46 + public class ResetMinMaxVisitor : IVisitor {
3.47 + public void VisitComputer(IComputer computer) {
3.48 + computer.Traverse(this);
3.49 + }
3.50 +
3.51 + public void VisitHardware(IHardware hardware) {
3.52 + hardware.Traverse(this);
3.53 + }
3.54 +
3.55 + public void VisitSensor(ISensor sensor) {
3.56 + sensor.ResetMin();
3.57 + sensor.ResetMax();
3.58 + }
3.59 +
3.60 + public void VisitParameter(IParameter parameter) { }
3.61 + }
3.62 +}
4.1 --- a/Hardware/ISensor.cs Sun Jul 04 12:12:37 2010 +0000
4.2 +++ b/Hardware/ISensor.cs Sun Jul 04 12:49:16 2010 +0000
4.3 @@ -72,7 +72,10 @@
4.4
4.5 float? Value { get; }
4.6 float? Min { get; }
4.7 - float? Max { get; }
4.8 + float? Max { get; }
4.9 +
4.10 + void ResetMin();
4.11 + void ResetMax();
4.12
4.13 IEnumerable<ISensorEntry> Plot { get; }
4.14 }
5.1 --- a/Hardware/Sensor.cs Sun Jul 04 12:12:37 2010 +0000
5.2 +++ b/Hardware/Sensor.cs Sun Jul 04 12:49:16 2010 +0000
5.3 @@ -163,6 +163,14 @@
5.4 public float? Min { get { return min; } }
5.5 public float? Max { get { return max; } }
5.6
5.7 + public void ResetMin() {
5.8 + min = null;
5.9 + }
5.10 +
5.11 + public void ResetMax() {
5.12 + max = null;
5.13 + }
5.14 +
5.15 public IEnumerable<ISensorEntry> Plot {
5.16 get { return entries; }
5.17 }
6.1 --- a/OpenHardwareMonitor.csproj Sun Jul 04 12:12:37 2010 +0000
6.2 +++ b/OpenHardwareMonitor.csproj Sun Jul 04 12:49:16 2010 +0000
6.3 @@ -80,6 +80,7 @@
6.4 <Compile Include="GUI\ParameterForm.Designer.cs">
6.5 <DependentUpon>ParameterForm.cs</DependentUpon>
6.6 </Compile>
6.7 + <Compile Include="GUI\ResetMinMaxVisitor.cs" />
6.8 <Compile Include="GUI\SensorNotifyIcon.cs" />
6.9 <Compile Include="GUI\SystemTray.cs" />
6.10 <Compile Include="GUI\StartupManager.cs" />
7.1 --- a/Properties/AssemblyInfo.cs Sun Jul 04 12:12:37 2010 +0000
7.2 +++ b/Properties/AssemblyInfo.cs Sun Jul 04 12:49:16 2010 +0000
7.3 @@ -69,5 +69,5 @@
7.4 // You can specify all the values or you can default the Build and Revision Numbers
7.5 // by using the '*' as shown below:
7.6 // [assembly: AssemblyVersion("1.0.*")]
7.7 -[assembly: AssemblyVersion("0.1.36.0")]
7.8 -[assembly: AssemblyFileVersion("0.1.36.0")]
7.9 +[assembly: AssemblyVersion("0.1.37.0")]
7.10 +[assembly: AssemblyFileVersion("0.1.37.0")]