/// <summary> /// Checks notification conditions for all of GPU hardware. /// </summary> /// <returns>true if condition is positive for one of the gpu.</returns> public bool Check() { foreach (var hardware in computer.Hardware.Where(x => x.HardwareType == HardwareType.RAM).ToList()) { ISensor memoryUsageSensor = hardware.Sensors.FirstOrDefault(x => x.SensorType == SensorType.Load); if (memoryUsageSensor != null) { var graterLessSignMemoryUsage = settings.GetValue(GraterLessSignIdentifier.ToString(), 0); var memoryUsageThreshold = settings.GetValue(ThresholdIdentifier.ToString(), -1); if (base.CheckValue(memoryUsageSensor, graterLessSignMemoryUsage, memoryUsageThreshold)) { return(true); } } } return(false); }
/// <summary> /// Checks notification conditions for all of GPU hardware. /// </summary> /// <returns>true if condition is positive for one of the gpu.</returns> public bool Check() { foreach (var hardware in computer.Hardware.Where(x => x.HardwareType == HardwareType.GpuNvidia || x.HardwareType == HardwareType.GpuAti).ToList()) { ISensor gpuLoadSensor = hardware.Sensors.FirstOrDefault(x => x.SensorType == SensorType.Load && x.DefaultName == "GPU Core"); if (gpuLoadSensor != null) { var graterLessSignGPULoad = settings.GetValue(GraterLessSignIdentifier.ToString(), 0); var gpuLoadThreshold = settings.GetValue(ThresholdIdentifier.ToString(), -1); if (base.CheckValue(gpuLoadSensor, graterLessSignGPULoad, gpuLoadThreshold)) { return(true); } } } return(false); }
/// <summary> /// Checks notification conditions for all of GPU hardware. /// </summary> /// <returns>true if condition is positive for one of the gpu.</returns> public bool Check() { foreach (var hardware in computer.Hardware.Where(x => x.HardwareType == HardwareType.CPU).ToList()) { ISensor cpuTemperatureSensor = hardware.Sensors.FirstOrDefault(x => x.SensorType == SensorType.Temperature); if (cpuTemperatureSensor != null) { var graterLessSignCPUTemperature = settings.GetValue(GraterLessSignIdentifier.ToString(), 0); var cpuTemperatureThreshold = settings.GetValue(ThresholdIdentifier.ToString(), -1); if (base.CheckValue(cpuTemperatureSensor, graterLessSignCPUTemperature, cpuTemperatureThreshold)) { return(true); } } } return(false); }