From 9d1660270272180cd71147d6ddd53d1382643d2e Mon Sep 17 00:00:00 2001
From: wenxiangchao <wenxiangchao@ihengxin.com.cn>
Date: 星期一, 02 十一月 2026 18:00:14 +0800
Subject: [PATCH] merge: 并入远程 Initial commit 作为历史根节点
---
Plugin.DeviceDebug/Panels/PowerSupplyDebugPanel.xaml | 117 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 117 insertions(+), 0 deletions(-)
diff --git a/Plugin.DeviceDebug/Panels/PowerSupplyDebugPanel.xaml b/Plugin.DeviceDebug/Panels/PowerSupplyDebugPanel.xaml
new file mode 100644
index 0000000..213d4c9
--- /dev/null
+++ b/Plugin.DeviceDebug/Panels/PowerSupplyDebugPanel.xaml
@@ -0,0 +1,117 @@
+<UserControl x:Class="Plugin.DeviceDebug.Panels.PowerSupplyDebugPanel"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:dp="clr-namespace:HMI.UI.DpUtil;assembly=HMI.UI"
+ mc:Ignorable="d"
+ d:DesignHeight="500" d:DesignWidth="600">
+
+ <Grid dp:GridHelper.Space="12" Margin="12">
+ <Grid.RowDefinitions>
+ <RowDefinition Height="Auto"/>
+ <RowDefinition Height="Auto"/>
+ <RowDefinition Height="Auto"/>
+ <RowDefinition Height="*"/>
+ </Grid.RowDefinitions>
+
+ <!-- 鏍囬 -->
+ <Border Grid.Row="0" Background="#2196F3" CornerRadius="4" Padding="12,8">
+ <TextBlock Text="鐢垫簮鎺у埗闈㈡澘" FontSize="16" FontWeight="Bold" Foreground="White"/>
+ </Border>
+
+ <!-- 璁剧疆鍖� -->
+ <Border Grid.Row="1" BorderBrush="#DDD" BorderThickness="1" CornerRadius="4" Padding="12">
+ <Grid dp:GridHelper.Space="10">
+ <Grid.RowDefinitions>
+ <RowDefinition Height="Auto"/>
+ <RowDefinition Height="Auto"/>
+ <RowDefinition Height="Auto"/>
+ <RowDefinition Height="Auto"/>
+ </Grid.RowDefinitions>
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="100"/>
+ <ColumnDefinition Width="*"/>
+ <ColumnDefinition Width="50"/>
+ </Grid.ColumnDefinitions>
+
+ <!-- 鐢靛帇璁惧畾 -->
+ <TextBlock Grid.Row="0" Grid.Column="0" Text="鐢靛帇璁惧畾:" VerticalAlignment="Center" FontWeight="Bold"/>
+ <TextBox Grid.Row="0" Grid.Column="1" x:Name="voltageInput"
+ IsEnabled="{Binding IsMaintenanceMode, RelativeSource={RelativeSource AncestorType=UserControl}}"
+ VerticalContentAlignment="Center" Padding="6,4" Text="0.00"/>
+ <TextBlock Grid.Row="0" Grid.Column="2" Text="V" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="#666"/>
+
+ <!-- 闄愭祦璁惧畾 -->
+ <TextBlock Grid.Row="1" Grid.Column="0" Text="闄愭祦璁惧畾:" VerticalAlignment="Center" FontWeight="Bold"/>
+ <TextBox Grid.Row="1" Grid.Column="1" x:Name="currentInput"
+ IsEnabled="{Binding IsMaintenanceMode, RelativeSource={RelativeSource AncestorType=UserControl}}"
+ VerticalContentAlignment="Center" Padding="6,4" Text="0.000"/>
+ <TextBlock Grid.Row="1" Grid.Column="2" Text="A" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="#666"/>
+
+ <!-- 杈撳嚭鎺у埗 -->
+ <TextBlock Grid.Row="2" Grid.Column="0" Text="杈撳嚭鎺у埗:" VerticalAlignment="Center" FontWeight="Bold"/>
+ <ToggleButton Grid.Row="2" Grid.Column="1" x:Name="outputToggle"
+ IsEnabled="{Binding IsMaintenanceMode, RelativeSource={RelativeSource AncestorType=UserControl}}"
+ Checked="OutputToggle_Changed" Unchecked="OutputToggle_Changed"
+ Height="30" Cursor="Hand">
+ <ToggleButton.Style>
+ <Style TargetType="ToggleButton">
+ <Setter Property="Content" Value="OFF"/>
+ <Setter Property="Background" Value="#F44336"/>
+ <Setter Property="Foreground" Value="White"/>
+ <Setter Property="FontWeight" Value="Bold"/>
+ <Style.Triggers>
+ <Trigger Property="IsChecked" Value="True">
+ <Setter Property="Content" Value="ON"/>
+ <Setter Property="Background" Value="#4CAF50"/>
+ </Trigger>
+ </Style.Triggers>
+ </Style>
+ </ToggleButton.Style>
+ </ToggleButton>
+
+ <!-- 鎿嶄綔鎸夐挳 -->
+ <StackPanel Grid.Row="3" Grid.ColumnSpan="3" Orientation="Horizontal"
+ dp:StackPanelHelper.ChildSpace="10" HorizontalAlignment="Left" Margin="0,6,0,0">
+ <Button x:Name="applyBtn" Content="璁剧疆" Padding="16,6"
+ IsEnabled="{Binding IsMaintenanceMode, RelativeSource={RelativeSource AncestorType=UserControl}}"
+ Click="ApplyBtn_Click"
+ Background="#2196F3" Foreground="White" BorderThickness="0" Cursor="Hand"/>
+ <Button x:Name="measureBtn" Content="娴嬮噺" Padding="16,6"
+ Click="MeasureBtn_Click"
+ Background="#4CAF50" Foreground="White" BorderThickness="0" Cursor="Hand"/>
+ </StackPanel>
+ </Grid>
+ </Border>
+
+ <!-- 瀹炴祴鍊兼樉绀哄尯 -->
+ <Border Grid.Row="2" BorderBrush="#DDD" BorderThickness="1" CornerRadius="4" Padding="12">
+ <Grid dp:GridHelper.Space="8">
+ <Grid.RowDefinitions>
+ <RowDefinition Height="Auto"/>
+ <RowDefinition Height="Auto"/>
+ <RowDefinition Height="Auto"/>
+ </Grid.RowDefinitions>
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="100"/>
+ <ColumnDefinition Width="*"/>
+ </Grid.ColumnDefinitions>
+
+ <TextBlock Grid.Row="0" Grid.Column="0" Text="瀹炴祴鐢靛帇:" FontWeight="Bold" VerticalAlignment="Center"/>
+ <TextBlock Grid.Row="0" Grid.Column="1" x:Name="measuredVoltage"
+ Text="-- V" FontSize="18" Foreground="#2196F3" VerticalAlignment="Center"/>
+
+ <TextBlock Grid.Row="1" Grid.Column="0" Text="瀹炴祴鐢垫祦:" FontWeight="Bold" VerticalAlignment="Center"/>
+ <TextBlock Grid.Row="1" Grid.Column="1" x:Name="measuredCurrent"
+ Text="-- A" FontSize="18" Foreground="#FF9800" VerticalAlignment="Center"/>
+
+ <TextBlock Grid.Row="2" Grid.Column="0" Text="鏇存柊鏃堕棿:" FontWeight="Bold" VerticalAlignment="Center"/>
+ <TextBlock Grid.Row="2" Grid.Column="1" x:Name="lastUpdateTime"
+ Text="--" Foreground="#999" VerticalAlignment="Center"/>
+ </Grid>
+ </Border>
+
+
+ </Grid>
+</UserControl>
--
Gitblit v1.9.1