Update floating status window lib
All checks were successful
Deploy to Gitea Releases / deploy-to-gitea-releases (push) Successful in 2m34s
All checks were successful
Deploy to Gitea Releases / deploy-to-gitea-releases (push) Successful in 2m34s
- Pad labels
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
using System;
|
||||
using HardwareMonitorStatusWindow.Service;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text.Json.Serialization;
|
||||
using HardwareMonitorStatusWindow.Service;
|
||||
|
||||
namespace HardwareMonitorStatusWindow.StatusWindow;
|
||||
|
||||
@@ -18,7 +18,7 @@ public class SensorEntry : INotifyDataErrorInfo, INotifyPropertyChanged
|
||||
_dataErrorDictionary.ErrorsChanged += DataErrorDictionaryErrorsChanged;
|
||||
}
|
||||
|
||||
public string? Label
|
||||
public string Label
|
||||
{
|
||||
get;
|
||||
set
|
||||
@@ -28,7 +28,7 @@ public class SensorEntry : INotifyDataErrorInfo, INotifyPropertyChanged
|
||||
|
||||
SetField(ref field, value);
|
||||
}
|
||||
}
|
||||
} = string.Empty;
|
||||
|
||||
public string? HardwareId
|
||||
{
|
||||
@@ -51,7 +51,7 @@ public class SensorEntry : INotifyDataErrorInfo, INotifyPropertyChanged
|
||||
}
|
||||
|
||||
[JsonIgnore]
|
||||
public Hardware? Hardware => Data.ComputerHardware?.FirstOrDefault(h => h.Identifier.ToString() == HardwareId);
|
||||
public Hardware? Hardware => Data.ComputerHardware.FirstOrDefault(h => h.Identifier.ToString() == HardwareId);
|
||||
|
||||
[JsonIgnore]
|
||||
public Sensor? Sensor => Hardware?.Sensors.FirstOrDefault(s => s.Identifier.ToString() == SensorId);
|
||||
@@ -88,17 +88,16 @@ public class SensorEntry : INotifyDataErrorInfo, INotifyPropertyChanged
|
||||
|
||||
public event PropertyChangedEventHandler? PropertyChanged;
|
||||
|
||||
protected virtual void OnPropertyChanged([CallerMemberName] string? propertyName = null)
|
||||
private void OnPropertyChanged([CallerMemberName] string? propertyName = null)
|
||||
{
|
||||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
||||
}
|
||||
|
||||
protected bool SetField<T>(ref T field, T value, [CallerMemberName] string? propertyName = null)
|
||||
private void SetField<T>(ref T field, T value, [CallerMemberName] string? propertyName = null)
|
||||
{
|
||||
if (EqualityComparer<T>.Default.Equals(field, value)) return false;
|
||||
if (EqualityComparer<T>.Default.Equals(field, value)) return;
|
||||
field = value;
|
||||
OnPropertyChanged(propertyName);
|
||||
return true;
|
||||
}
|
||||
|
||||
public string SensorValueFormat
|
||||
|
||||
Reference in New Issue
Block a user