AnkhSVN fails, TortoiseSVN to the rescue..
1.1 --- a/WMIProvider/Hardware.cs Sat Oct 16 18:24:20 2010 +0000
1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1.3 @@ -1,60 +0,0 @@
1.4 -/*
1.5 -
1.6 - Version: MPL 1.1/GPL 2.0/LGPL 2.1
1.7 -
1.8 - The contents of this file are subject to the Mozilla Public License Version
1.9 - 1.1 (the "License"); you may not use this file except in compliance with
1.10 - the License. You may obtain a copy of the License at
1.11 -
1.12 - http://www.mozilla.org/MPL/
1.13 -
1.14 - Software distributed under the License is distributed on an "AS IS" basis,
1.15 - WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
1.16 - for the specific language governing rights and limitations under the License.
1.17 -
1.18 - The Original Code is the Open Hardware Monitor code.
1.19 -
1.20 - The Initial Developer of the Original Code is
1.21 - Paul Werelds <paul@werelds.net>.
1.22 - Portions created by the Initial Developer are Copyright (C) 2009-2010
1.23 - the Initial Developer. All Rights Reserved.
1.24 -
1.25 - Contributor(s):
1.26 -
1.27 - Alternatively, the contents of this file may be used under the terms of
1.28 - either the GNU General Public License Version 2 or later (the "GPL"), or
1.29 - the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
1.30 - in which case the provisions of the GPL or the LGPL are applicable instead
1.31 - of those above. If you wish to allow use of your version of this file only
1.32 - under the terms of either the GPL or the LGPL, and not to allow others to
1.33 - use your version of this file under the terms of the MPL, indicate your
1.34 - decision by deleting the provisions above and replace them with the notice
1.35 - and other provisions required by the GPL or the LGPL. If you do not delete
1.36 - the provisions above, a recipient may use your version of this file under
1.37 - the terms of any one of the MPL, the GPL or the LGPL.
1.38 -
1.39 -*/
1.40 -
1.41 -using System.Management.Instrumentation;
1.42 -using OpenHardwareMonitor.Hardware;
1.43 -
1.44 -namespace OpenHardwareMonitor.WMIProvider {
1.45 - [InstrumentationClass(InstrumentationType.Instance)]
1.46 - public class Hardware : IWmiObject {
1.47 - #region WMI Exposed
1.48 -
1.49 - public string HardwareType { get; private set; }
1.50 - public string Identifier { get; private set; }
1.51 - public string Name { get; private set; }
1.52 -
1.53 - #endregion
1.54 -
1.55 - public Hardware(IHardware hardware) {
1.56 - Name = hardware.Name;
1.57 - Identifier = hardware.Identifier.ToString();
1.58 - HardwareType = hardware.HardwareType.ToString();
1.59 - }
1.60 -
1.61 - public void Update() { }
1.62 - }
1.63 -}
2.1 --- a/WMIProvider/IWmiObject.cs Sat Oct 16 18:24:20 2010 +0000
2.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
2.3 @@ -1,47 +0,0 @@
2.4 -/*
2.5 -
2.6 - Version: MPL 1.1/GPL 2.0/LGPL 2.1
2.7 -
2.8 - The contents of this file are subject to the Mozilla Public License Version
2.9 - 1.1 (the "License"); you may not use this file except in compliance with
2.10 - the License. You may obtain a copy of the License at
2.11 -
2.12 - http://www.mozilla.org/MPL/
2.13 -
2.14 - Software distributed under the License is distributed on an "AS IS" basis,
2.15 - WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
2.16 - for the specific language governing rights and limitations under the License.
2.17 -
2.18 - The Original Code is the Open Hardware Monitor code.
2.19 -
2.20 - The Initial Developer of the Original Code is
2.21 - Paul Werelds <paul@werelds.net>.
2.22 - Portions created by the Initial Developer are Copyright (C) 2009-2010
2.23 - the Initial Developer. All Rights Reserved.
2.24 -
2.25 - Contributor(s):
2.26 -
2.27 - Alternatively, the contents of this file may be used under the terms of
2.28 - either the GNU General Public License Version 2 or later (the "GPL"), or
2.29 - the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
2.30 - in which case the provisions of the GPL or the LGPL are applicable instead
2.31 - of those above. If you wish to allow use of your version of this file only
2.32 - under the terms of either the GPL or the LGPL, and not to allow others to
2.33 - use your version of this file under the terms of the MPL, indicate your
2.34 - decision by deleting the provisions above and replace them with the notice
2.35 - and other provisions required by the GPL or the LGPL. If you do not delete
2.36 - the provisions above, a recipient may use your version of this file under
2.37 - the terms of any one of the MPL, the GPL or the LGPL.
2.38 -
2.39 -*/
2.40 -
2.41 -namespace OpenHardwareMonitor.WMIProvider {
2.42 - interface IWmiObject {
2.43 - // Both of these get exposed to WMI
2.44 - string Name { get; }
2.45 - string Identifier { get; }
2.46 -
2.47 - // Not exposed.
2.48 - void Update();
2.49 - }
2.50 -}
3.1 --- a/WMIProvider/Sensor.cs Sat Oct 16 18:24:20 2010 +0000
3.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
3.3 @@ -1,80 +0,0 @@
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 - Paul Werelds <paul@werelds.net>.
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.Management.Instrumentation;
3.42 -using OpenHardwareMonitor.Hardware;
3.43 -
3.44 -namespace OpenHardwareMonitor.WMIProvider {
3.45 - [InstrumentationClass(InstrumentationType.Instance)]
3.46 - public class Sensor : IWmiObject {
3.47 - private ISensor sensor;
3.48 -
3.49 - #region WMI Exposed
3.50 -
3.51 - public string SensorType { get; private set; }
3.52 - public string Identifier { get; private set; }
3.53 - public string Parent { get; private set; }
3.54 - public string Name { get; private set; }
3.55 - public float Value { get; private set; }
3.56 - public float Min { get; private set; }
3.57 - public float Max { get; private set; }
3.58 - public int Index { get; private set; }
3.59 -
3.60 - #endregion
3.61 -
3.62 - public Sensor(ISensor data) {
3.63 - Name = data.Name;
3.64 - Index = data.Index;
3.65 -
3.66 - SensorType = data.SensorType.ToString();
3.67 - Identifier = data.Identifier.ToString();
3.68 - Parent = data.Hardware.Identifier.ToString();
3.69 -
3.70 - sensor = data;
3.71 - }
3.72 -
3.73 - public void Update() {
3.74 - Value = (sensor.Value != null) ? (float)sensor.Value : 0;
3.75 -
3.76 - if (sensor.Min != null)
3.77 - Min = (float)sensor.Min;
3.78 -
3.79 - if (sensor.Max != null)
3.80 - Max = (float)sensor.Max;
3.81 - }
3.82 - }
3.83 -}