GUI/ResetMinMaxVisitor.cs
author moel.mich
Sun, 18 Jul 2010 17:08:33 +0000
changeset 157 0b5cc38501e1
permissions -rw-r--r--
Delete the config file if it can not be parsed, and restart with a new one.
moel@151
     1
/*
moel@151
     2
  
moel@151
     3
  Version: MPL 1.1/GPL 2.0/LGPL 2.1
moel@151
     4
moel@151
     5
  The contents of this file are subject to the Mozilla Public License Version
moel@151
     6
  1.1 (the "License"); you may not use this file except in compliance with
moel@151
     7
  the License. You may obtain a copy of the License at
moel@151
     8
 
moel@151
     9
  http://www.mozilla.org/MPL/
moel@151
    10
moel@151
    11
  Software distributed under the License is distributed on an "AS IS" basis,
moel@151
    12
  WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
moel@151
    13
  for the specific language governing rights and limitations under the License.
moel@151
    14
moel@151
    15
  The Original Code is the Open Hardware Monitor code.
moel@151
    16
moel@151
    17
  The Initial Developer of the Original Code is 
moel@151
    18
  Michael Möller <m.moeller@gmx.ch>.
moel@151
    19
  Portions created by the Initial Developer are Copyright (C) 2009-2010
moel@151
    20
  the Initial Developer. All Rights Reserved.
moel@151
    21
moel@151
    22
  Contributor(s):
moel@151
    23
moel@151
    24
  Alternatively, the contents of this file may be used under the terms of
moel@151
    25
  either the GNU General Public License Version 2 or later (the "GPL"), or
moel@151
    26
  the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
moel@151
    27
  in which case the provisions of the GPL or the LGPL are applicable instead
moel@151
    28
  of those above. If you wish to allow use of your version of this file only
moel@151
    29
  under the terms of either the GPL or the LGPL, and not to allow others to
moel@151
    30
  use your version of this file under the terms of the MPL, indicate your
moel@151
    31
  decision by deleting the provisions above and replace them with the notice
moel@151
    32
  and other provisions required by the GPL or the LGPL. If you do not delete
moel@151
    33
  the provisions above, a recipient may use your version of this file under
moel@151
    34
  the terms of any one of the MPL, the GPL or the LGPL.
moel@151
    35
 
moel@151
    36
*/
moel@151
    37
moel@151
    38
using System;
moel@151
    39
using System.Collections.Generic;
moel@151
    40
using OpenHardwareMonitor.Hardware;
moel@151
    41
moel@151
    42
namespace OpenHardwareMonitor.GUI {
moel@151
    43
  public class ResetMinMaxVisitor : IVisitor {
moel@151
    44
    public void VisitComputer(IComputer computer) {
moel@151
    45
      computer.Traverse(this);
moel@151
    46
    }
moel@151
    47
moel@151
    48
    public void VisitHardware(IHardware hardware) {
moel@151
    49
      hardware.Traverse(this);
moel@151
    50
    }
moel@151
    51
moel@151
    52
    public void VisitSensor(ISensor sensor) {
moel@151
    53
      sensor.ResetMin();
moel@151
    54
      sensor.ResetMax();
moel@151
    55
    }
moel@151
    56
moel@151
    57
    public void VisitParameter(IParameter parameter) { }
moel@151
    58
  }
moel@151
    59
}