diff --git a/StatusWindow/Resources.Designer.cs b/StatusWindow/Resources.Designer.cs
index 0b49e09..7a44705 100644
--- a/StatusWindow/Resources.Designer.cs
+++ b/StatusWindow/Resources.Designer.cs
@@ -169,6 +169,15 @@ namespace HardwareMonitorStatusWindow.StatusWindow {
}
}
+ ///
+ /// Looks up a localized string similar to Current Value.
+ ///
+ public static string CurrentValueWatermark {
+ get {
+ return ResourceManager.GetString("CurrentValueWatermark", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Delete.
///
diff --git a/StatusWindow/Resources.resx b/StatusWindow/Resources.resx
index 51acf95..4848aad 100644
--- a/StatusWindow/Resources.resx
+++ b/StatusWindow/Resources.resx
@@ -248,4 +248,7 @@ Would you like to download and install it now?
Waiting for service to start...
+
+ Current Value
+
\ No newline at end of file
diff --git a/StatusWindow/SettingsWindow/SensorWindow.xaml b/StatusWindow/SettingsWindow/SensorWindow.xaml
index d696f40..7fd7eae 100644
--- a/StatusWindow/SettingsWindow/SensorWindow.xaml
+++ b/StatusWindow/SettingsWindow/SensorWindow.xaml
@@ -68,8 +68,14 @@
DisplayMemberPath="Name"
VirtualizingPanel.IsVirtualizing="False"
mah:TextBoxHelper.UseFloatingWatermark="True"
- mah:TextBoxHelper.Watermark="{x:Static hardwareMonitorStatusWindow:Resources.SensorWatermark}">
+ mah:TextBoxHelper.Watermark="{x:Static hardwareMonitorStatusWindow:Resources.SensorWatermark}"
+ SelectionChanged="SensorComboBox_SelectionChanged">
+
s.Type == sensorType.Value);
}
+
+ private void SensorComboBox_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
+ {
+ UpdateCurrentSensorValue();
+ }
+
+ private void UpdateCurrentSensorValue()
+ {
+ var sensor = (Sensor)SensorComboBox.SelectedItem;
+
+ if (sensor?.Value == null)
+ {
+ CurrentValueTextBox.Text = string.Empty;
+ return;
+ }
+
+ var hardware = (Hardware)HardwareComboBox.SelectedItem;
+
+ var displaySensorEntry = new SensorEntry { HardwareId = hardware.Identifier, SensorId = sensor.Identifier };
+
+ CurrentValueTextBox.Text = string.Format(displaySensorEntry.SensorValueFormat, displaySensorEntry.Sensor!.Value);
+ }
}
\ No newline at end of file