Ejemplo n.º 1
0
 public OSDSensor(string id, string prefix, string name, OSDUnitType unitType)
 {
     ID       = id;
     Prefix   = prefix;
     Name     = name;
     UnitType = unitType;
 }
Ejemplo n.º 2
0
 public OSDSensor(OSDUnitType unitType, string name, int index, int subIndex) : base(SENSOR_TYPE.OSD)
 {
     LibraryType = OSDLibraryType.NvApiWrapper;
     UnitType    = unitType;
     Name        = name;
     mIndex      = index;
     mSubIndex   = subIndex;
 }
Ejemplo n.º 3
0
 public OSDSensor(OpenHardwareMonitor.Hardware.ISensor sensor, OSDUnitType unitType, string name, int index) : base(SENSOR_TYPE.OSD)
 {
     mOHMSensor  = sensor;
     LibraryType = OSDLibraryType.OpenHardwareMonitor;
     UnitType    = unitType;
     Name        = name;
     mIndex      = index;
 }
Ejemplo n.º 4
0
        private void setOSDSensor(ISensor[] sensorArray, SensorType sensorType, ref List <OSDSensor> osdList)
        {
            var sensorList = new List <ISensor>();

            for (int i = 0; i < sensorArray.Length; i++)
            {
                if (sensorArray[i].SensorType != sensorType)
                {
                    continue;
                }
                sensorList.Add(sensorArray[i]);
            }

            for (int i = 0; i < sensorList.Count; i++)
            {
                var sensor = sensorList[i];

                int         index      = osdList.Count;
                OSDUnitType unitType   = OSDUnitType.Unknown;
                string      sensorName = "";
                switch (sensorList[i].SensorType)
                {
                case SensorType.Voltage:
                    unitType   = OSDUnitType.Voltage;
                    sensorName = "[Voltage]  ";
                    break;

                case SensorType.Power:
                    unitType   = OSDUnitType.Power;
                    sensorName = "[Power] ";
                    break;

                case SensorType.Load:
                    unitType   = OSDUnitType.Percent;
                    sensorName = "[Load] ";
                    break;

                case SensorType.Clock:
                    unitType   = OSDUnitType.MHz;
                    sensorName = "[Clock] ";
                    break;

                case SensorType.Data:
                    unitType   = OSDUnitType.GB;
                    sensorName = "[Data] ";
                    break;

                case SensorType.SmallData:
                    unitType   = OSDUnitType.MB;
                    sensorName = "[Data] ";
                    break;

                case SensorType.Throughput:
                    unitType   = OSDUnitType.MBPerSec;
                    sensorName = "[Throughput] ";
                    break;

                default:
                    unitType = OSDUnitType.Unknown;
                    break;
                }

                if (unitType == OSDUnitType.Unknown)
                {
                    continue;
                }

                var osdSensor = new OSDSensor(sensorList[i], unitType, sensorName + sensorList[i].Name, index);
                osdList.Add(osdSensor);
            }
        }
Ejemplo n.º 5
0
 public LHMOSDSensor(string id, string prefix, string name, OSDUnitType unitType, ISensor sensor) : base(id, prefix, name, unitType)
 {
     mSensor = sensor;
 }
Ejemplo n.º 6
0
        private void setOSDSensor(ISensor[] sensorArray, SensorType sensorType, List <OSDSensor> osdList, Dictionary <string, OSDSensor> osdMap)
        {
            for (int i = 0; i < sensorArray.Length; i++)
            {
                var sensor = sensorArray[i];
                if (sensorArray[i].SensorType != sensorType)
                {
                    continue;
                }

                OSDUnitType unitType = OSDUnitType.Unknown;
                string      prefix   = "";
                switch (sensorArray[i].SensorType)
                {
                case SensorType.Voltage:
                    unitType = OSDUnitType.Voltage;
                    prefix   = "[Voltage] ";
                    break;

                case SensorType.Power:
                    unitType = OSDUnitType.Power;
                    prefix   = "[Power] ";
                    break;

                case SensorType.Load:
                    unitType = OSDUnitType.Percent;
                    prefix   = "[Load] ";
                    break;

                case SensorType.Clock:
                    unitType = OSDUnitType.MHz;
                    prefix   = "[Clock] ";
                    break;

                case SensorType.Data:
                    unitType = OSDUnitType.GB;
                    prefix   = "[Data] ";
                    break;

                case SensorType.SmallData:
                    unitType = OSDUnitType.MB;
                    prefix   = "[Data] ";
                    break;

                case SensorType.Throughput:
                    unitType = OSDUnitType.MBPerSec;
                    prefix   = "[Throughput] ";
                    break;

                default:
                    unitType = OSDUnitType.Unknown;
                    break;
                }

                if (unitType == OSDUnitType.Unknown)
                {
                    continue;
                }

                string id        = string.Format("{0}{1}", mIDPrefixOSD, sensor.Identifier.ToString());
                var    osdSensor = new OHMOSDSensor(id, prefix, sensorArray[i].Name, unitType, sensor);
                osdList.Add(osdSensor);
                osdMap.Add(id, osdSensor);
            }
        }
Ejemplo n.º 7
0
 public HWInfoOSDSensor(string id, string prefix, string name, OSDUnitType unitType, string categoryID, string deviceID) : base(id, prefix, name, unitType)
 {
     mCategoryID = categoryID;
     mDeviceID   = deviceID;
 }
Ejemplo n.º 8
0
 public NvAPIOSDSensor(string id, string prefix, string name, OSDUnitType unitType, int index, int subIndex) : base(id, prefix, name, unitType)
 {
     mIndex    = index;
     mSubIndex = subIndex;
 }