Beispiel #1
0
        /// <summary>
        /// Timer-Tick-Event of the OHM-Service
        /// </summary>
        /// <param name="args"></param>
        private void OpenHardwareMonitorManagementServiceTimerTickEventHandler(OpenHardwareMonitorManagementServiceTimerTickEventArgs args)
        {
            if (this.openHardwareManagementService.CPU != null)
            {
                // Get core workload
                foreach (var sensor in this.openHardwareManagementService.CPUCoreWorkloadSensors)
                {
                    var chart = (from r in this.MainContent.Children.OfType <CPUCoreWorkloadChartUserControl>()
                                 where r.CoreName == sensor.Name
                                 select r).FirstOrDefault();

                    if (chart == null)
                    {
                        var newChart = new CPUCoreWorkloadChartUserControl();
                        newChart.CoreName            = sensor.Name;
                        newChart.CurrentCoreWorkload = (sensor.Value != null) ? (double)sensor.Value.Value : default(double);
                        this.MainContent.Children.Add(newChart);
                    }
                    else
                    {
                        chart.CurrentCoreWorkload = (sensor.Value != null) ? (double)sensor.Value.Value : default(double);
                    }
                }
            }
        }
Beispiel #2
0
 /// <summary>
 /// Timer-Tick-Event of the OHM-Service
 /// </summary>
 /// <param name="args"></param>
 private void OpenHardwareMonitorManagementServiceTimerTickEventHandler(OpenHardwareMonitorManagementServiceTimerTickEventArgs args)
 {
     foreach (var c in this.MainGrid.Children)
     {
         if (c is SensorTile)
         {
             ((SensorTile)c).UpdateValues();
         }
     }
 }
        /// <summary>
        /// Timer-Tick-Event of the OHM-Service
        /// </summary>
        /// <param name="args"></param>
        private void OpenHardwareMonitorManagementServiceTimerTickEventHandler(OpenHardwareMonitorManagementServiceTimerTickEventArgs args)
        {
            foreach (var st in this.MainboardVoltageSensors)
            {
                st.UpdateValues();
            }

            foreach (var st in this.MainboardTemperatureSensors)
            {
                st.UpdateValues();
            }
        }
Beispiel #4
0
        /// <summary>
        /// Timer-Tick-Event of the OHM-Service
        /// </summary>
        /// <param name="args"></param>
        private void OpenHardwareMonitorManagementServiceTimerTickEventHandler(OpenHardwareMonitorManagementServiceTimerTickEventArgs args)
        {
            // Update values
            this.OnPropertyChanged(() => this.GPUCoreClockSpeed);
            this.OnPropertyChanged(() => this.GPUCoreTemperature);
            this.OnPropertyChanged(() => this.GPUCoreWorkload);
            this.OnPropertyChanged(() => this.GPUMemoryClockSpeed);

            this.UpdateGPUCoreWorkloadPlot();
            this.UpdateGPUCoreTemperaturePlot();
            time = time.AddSeconds(1);
        }
 /// <summary>
 /// Timer-Tick-Event of the OHM-Service
 /// </summary>
 /// <param name="args"></param>
 private void OpenHardwareMonitorManagementServiceTimerTickEventHandler(OpenHardwareMonitorManagementServiceTimerTickEventArgs args)
 {
     foreach (var fc in this.FanControllers.Where(f => f.IsAdvancedModeEnabled))
     {
         if (fc.FanControllerUserControl != null &&
             fc.FanControllerUserControl is MainboardFanControllerUserControl)
         {
             // Update values
             fc.UpdateValues();
             // Update control
             ((MainboardFanControllerUserControl)fc.FanControllerUserControl).UpdateChart();
         }
     }
 }
Beispiel #6
0
        /// <summary>
        /// Timer-Tick-Event of the OHM-Service
        /// </summary>
        /// <param name="args"></param>
        private void OpenHardwareMonitorManagementServiceTimerTickEventHandler(OpenHardwareMonitorManagementServiceTimerTickEventArgs args)
        {
            var areaSeries = (AreaSeries)this.CPUPlot.Series[0];

            if (areaSeries.Points.Count > 60)
            {
                areaSeries.Points.RemoveAt(0);
            }

            if (this.openHardwareManagementService.CPU != null)
            {
                // Update CPU-Values
                this.openHardwareManagementService.CPU.Update();

                // Get CPU-Temperature
                this.CPUTemperature = (this.openHardwareManagementService.CPUTemperatureSensor.Value != null) ? (double)this.openHardwareManagementService.CPUTemperatureSensor.Value : default(double);

                // Update values
                this.OnPropertyChanged(() => this.CPUPowerConsumption);
                this.OnPropertyChanged(() => this.CPUCoreWorkloadSensors);
                this.OnPropertyChanged(() => this.CPUCoreClockSpeedSensors);
                this.OnPropertyChanged(() => this.CPUCoreTemperatureSensors);
                this.OnPropertyChanged(() => this.CPUCorePowerConsumption);
            }

            // Update-Plot
            //double x = areaSeries.Points.Count > 0 ? areaSeries.Points[areaSeries.Points.Count - 1].X + 1 : 0;
            double percentage = default(double);

            if (this.openHardwareManagementService.CPUWorkloadSensor.Value != null && this.openHardwareManagementService.CPUWorkloadSensor.Value.HasValue)
            {
                percentage = (double)this.openHardwareManagementService.CPUWorkloadSensor.Value;
            }

            areaSeries.Points.Add(new DataPoint(DateTimeAxis.ToDouble(this.time), percentage));
            areaSeries.Points2.Add(DateTimeAxis.CreateDataPoint(this.time, 0));

            time = time.AddSeconds(1);

            this.CPUUtilization = percentage / 100;

            this.CPUClockSpeed = this.openHardwareManagementService.CPUClockSpeed;

            this.CPUPlot.InvalidatePlot(true);
        }
Beispiel #7
0
        /// <summary>
        /// Timer-Tick-Event of the OHM-Service
        /// </summary>
        /// <param name="args"></param>
        private void OpenHardwareMonitorManagementServiceTimerTickEventHandler(OpenHardwareMonitorManagementServiceTimerTickEventArgs args)
        {
            var areaSeries = (LineSeries)this.CPUPlot.Series[0];

            if (areaSeries.Points.Count > 60)
            {
                areaSeries.Points.RemoveAt(0);
            }

            if (this.openHardwareManagementService.CPU != null)
            {
                // Update CPU-Values
                this.openHardwareManagementService.CPU.Update();

                // Get CPU-Temperature
                this.CPUTemperature = (this.openHardwareManagementService.CPUTemperatureSensor.Value != null) ? (double)this.openHardwareManagementService.CPUTemperatureSensor.Value : default(double);

                // Update values
                this.OnPropertyChanged(() => this.CPUPowerConsumption);
                this.OnPropertyChanged(() => this.CPUCoreWorkloadSensors);
                this.OnPropertyChanged(() => this.CPUCoreClockSpeedSensors);
                this.OnPropertyChanged(() => this.CPUCoreTemperatureSensors);
                this.OnPropertyChanged(() => this.CPUCorePowerConsumption);
            }

            // Update-Plot
            //double x = areaSeries.Points.Count > 0 ? areaSeries.Points[areaSeries.Points.Count - 1].X + 1 : 0;
            double percentage = default(double);
            if (this.openHardwareManagementService.CPUWorkloadSensor.Value != null && this.openHardwareManagementService.CPUWorkloadSensor.Value.HasValue)
                percentage = (double)this.openHardwareManagementService.CPUWorkloadSensor.Value;

            areaSeries.Points.Add(new DataPoint(DateTimeAxis.ToDouble(this.time), percentage));
            time = time.AddSeconds(1);

            this.CPUUtilization = percentage / 100;

            this.CPUClockSpeed = this.openHardwareManagementService.CPUClockSpeed;

            this.CPUPlot.InvalidatePlot(true);
        }
 /// <summary>
 /// Timer-Tick-Event of the OHM-Service
 /// </summary>
 /// <param name="args"></param>
 private void OpenHardwareMonitorManagementServiceTimerTickEventHandler(OpenHardwareMonitorManagementServiceTimerTickEventArgs args)
 {
     foreach (var fc in this.FanControllers.Where(f => f.IsAdvancedModeEnabled))
     {
         if (fc.FanControllerUserControl != null &&
             fc.FanControllerUserControl is MainboardFanControllerUserControl)
         {
             // Update values
             fc.UpdateValues();
             // Update control
             ((MainboardFanControllerUserControl)fc.FanControllerUserControl).UpdateChart();
         }
     }
 }
        /// <summary>
        /// Timer-Tick-Event of the OHM-Service
        /// </summary>
        /// <param name="args"></param>
        private void OpenHardwareMonitorManagementServiceTimerTickEventHandler(OpenHardwareMonitorManagementServiceTimerTickEventArgs args)
        {
            if (this.openHardwareManagementService.CPU != null)
            {
                // Get core workload
                foreach (var sensor in this.openHardwareManagementService.CPUCoreWorkloadSensors)
                {
                    var chart = (from r in this.MainContent.Children.OfType<CPUCoreWorkloadChartUserControl>()
                                 where r.CoreName == sensor.Name
                                 select r).FirstOrDefault();

                    if (chart == null)
                    {
                        var newChart = new CPUCoreWorkloadChartUserControl();
                        newChart.CoreName = sensor.Name;
                        newChart.CurrentCoreWorkload = (sensor.Value != null) ? (double)sensor.Value.Value : default(double);
                        this.MainContent.Children.Add(newChart);
                    }
                    else
                    {
                        chart.CurrentCoreWorkload = (sensor.Value != null) ? (double)sensor.Value.Value : default(double);
                    }
                }
            }
        }
Beispiel #10
0
 /// <summary>
 /// Timer-Tick-Event of the OHM-Service
 /// </summary>
 /// <param name="args"></param>
 private void OpenHardwareMonitorManagementServiceTimerTickEventHandler(OpenHardwareMonitorManagementServiceTimerTickEventArgs args)
 {
     foreach (var c in this.MainGrid.Children)
     {
         if (c is SensorTile)
         {
             ((SensorTile)c).UpdateValues();
         }
     }
 }
        /// <summary>
        /// Timer-Tick-Event of the OHM-Service
        /// </summary>
        /// <param name="args"></param>
        private void OpenHardwareMonitorManagementServiceTimerTickEventHandler(OpenHardwareMonitorManagementServiceTimerTickEventArgs args)
        {
            // Update values
            this.OnPropertyChanged(() => this.GPUCoreClockSpeed);
            this.OnPropertyChanged(() => this.GPUCoreTemperature);
            this.OnPropertyChanged(() => this.GPUCoreWorkload);
            this.OnPropertyChanged(() => this.GPUMemoryClockSpeed);

            this.UpdateGPUCoreWorkloadPlot();
            this.UpdateGPUCoreTemperaturePlot();
            time = time.AddSeconds(1);
        }
        /// <summary>
        /// Timer-Tick-Event of the OHM-Service
        /// </summary>
        /// <param name="args"></param>
        private void OpenHardwareMonitorManagementServiceTimerTickEventHandler(OpenHardwareMonitorManagementServiceTimerTickEventArgs args)
        {
            foreach (var st in this.MainboardVoltageSensors)
                st.UpdateValues();

            foreach (var st in this.MainboardTemperatureSensors)
                st.UpdateValues();
        }