From 38010aa93652ac3dc2a828579f85abc8897c9c8d Mon Sep 17 00:00:00 2001
From: SL <123@123.com>
Date: Wed, 19 Jul 2023 18:59:24 +0800
Subject: [PATCH] =?UTF-8?q?[UI.Client]=20=E6=96=B0=E5=A2=9EHeater=E7=94=B5?=
=?UTF-8?q?=E9=98=BB=E6=98=BE=E7=A4=BA=E6=8E=A7=E4=BB=B6=E3=80=82?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Ctrlib/Controls/HeaterResPresenter.xaml | 71 +++++++++++++++++++
.../Controls/HeaterResPresenter.xaml.cs | 56 +++++++++++++++
.../MECF.Framework.UI.Client.csproj | 7 ++
3 files changed, 134 insertions(+)
create mode 100644 MECF.Framework.UI.Client/Ctrlib/Controls/HeaterResPresenter.xaml
create mode 100644 MECF.Framework.UI.Client/Ctrlib/Controls/HeaterResPresenter.xaml.cs
diff --git a/MECF.Framework.UI.Client/Ctrlib/Controls/HeaterResPresenter.xaml b/MECF.Framework.UI.Client/Ctrlib/Controls/HeaterResPresenter.xaml
new file mode 100644
index 0000000..8228017
--- /dev/null
+++ b/MECF.Framework.UI.Client/Ctrlib/Controls/HeaterResPresenter.xaml
@@ -0,0 +1,71 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/MECF.Framework.UI.Client/Ctrlib/Controls/HeaterResPresenter.xaml.cs b/MECF.Framework.UI.Client/Ctrlib/Controls/HeaterResPresenter.xaml.cs
new file mode 100644
index 0000000..e6c7653
--- /dev/null
+++ b/MECF.Framework.UI.Client/Ctrlib/Controls/HeaterResPresenter.xaml.cs
@@ -0,0 +1,56 @@
+using System;
+using System.Globalization;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using Aitex.Core.Common.DeviceData.IoDevice;
+
+namespace MECF.Framework.UI.Client.Ctrlib.Controls
+{
+ ///
+ /// Interaction logic for HeaterResistanceOverview.xaml
+ ///
+ public partial class HeaterResPresenter : UserControl
+ {
+ public HeaterResPresenter()
+ {
+ InitializeComponent();
+ }
+
+ #region Dps
+
+ public static readonly DependencyProperty CaptionProperty = DependencyProperty.Register(
+ nameof(Caption), typeof(string), typeof(HeaterResPresenter), new PropertyMetadata(default(string)));
+
+ public string Caption
+ {
+ get => (string)GetValue(CaptionProperty);
+ set => SetValue(CaptionProperty, value);
+ }
+
+ #endregion
+ }
+
+ internal class IoPsuResistanceSummaryConverter : IValueConverter
+ {
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ if (value is IoPsuData data)
+ {
+ return $"Realtime: {data.Resistance:F1}Ω" +
+ $"\r\nLimit High: {data.ResistanceLimitMax:F1}Ω" +
+ $"\r\nVoltage: {data.OutputVoltageFeedback:F1}V" +
+ $"\r\nAmps: {data.OutputArmsFeedBack:F1}A";
+ }
+ else
+ {
+ return "";
+ }
+ }
+
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ throw new NotImplementedException();
+ }
+ }
+}
diff --git a/MECF.Framework.UI.Client/MECF.Framework.UI.Client.csproj b/MECF.Framework.UI.Client/MECF.Framework.UI.Client.csproj
index 41da3a1..c884872 100644
--- a/MECF.Framework.UI.Client/MECF.Framework.UI.Client.csproj
+++ b/MECF.Framework.UI.Client/MECF.Framework.UI.Client.csproj
@@ -244,6 +244,9 @@
+
+ HeaterResPresenter.xaml
+
PanelLocker.xaml
@@ -885,6 +888,10 @@
MSBuild:Compile
Designer
+
+ Designer
+ MSBuild:Compile
+
Designer
MSBuild:Compile