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/PlcDebugPanel.xaml | 176 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 176 insertions(+), 0 deletions(-)
diff --git a/Plugin.DeviceDebug/Panels/PlcDebugPanel.xaml b/Plugin.DeviceDebug/Panels/PlcDebugPanel.xaml
new file mode 100644
index 0000000..aa46097
--- /dev/null
+++ b/Plugin.DeviceDebug/Panels/PlcDebugPanel.xaml
@@ -0,0 +1,176 @@
+<UserControl x:Class="Plugin.DeviceDebug.Panels.PlcDebugPanel"
+ 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:ui="clr-namespace:HMI.UI;assembly=HMI.UI"
+ xmlns:dp="clr-namespace:HMI.UI.DpUtil;assembly=HMI.UI"
+ mc:Ignorable="d"
+ d:DesignHeight="500" d:DesignWidth="600">
+ <UserControl.Resources>
+ <ResourceDictionary>
+ <ResourceDictionary.MergedDictionaries>
+ <ResourceDictionary Source="/HMI.UI;component/Style/PanuonListView.xaml"/>
+ </ResourceDictionary.MergedDictionaries>
+ </ResourceDictionary>
+ </UserControl.Resources>
+
+ <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="#9C27B0" CornerRadius="4" Padding="12,8">
+ <TextBlock Text="PLC 璋冭瘯闈㈡澘" FontSize="16" FontWeight="Bold" Foreground="White"/>
+ </Border>
+
+ <!-- IO 鎺у埗鍖� -->
+ <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"/>
+ </Grid.RowDefinitions>
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="80"/>
+ <ColumnDefinition Width="*"/>
+ </Grid.ColumnDefinitions>
+
+ <!-- 鍦板潃 -->
+ <TextBlock Grid.Row="0" Grid.Column="0" Text="鍦板潃:" VerticalAlignment="Center" FontWeight="Bold"/>
+ <TextBox Grid.Row="0" Grid.Column="1" x:Name="addressInput"
+ IsEnabled="{Binding IsMaintenanceMode, RelativeSource={RelativeSource AncestorType=UserControl}}"
+ VerticalContentAlignment="Center" Padding="6,4" Text="M0.0"/>
+
+ <!-- 鍊� -->
+ <TextBlock Grid.Row="1" Grid.Column="0" Text="鍊�:" VerticalAlignment="Center" FontWeight="Bold"/>
+ <ComboBox Grid.Row="1" Grid.Column="1" x:Name="valueSelect"
+ IsEnabled="{Binding IsMaintenanceMode, RelativeSource={RelativeSource AncestorType=UserControl}}"
+ VerticalContentAlignment="Center" Padding="6,4">
+ <ComboBoxItem Content="True" IsSelected="True"/>
+ <ComboBoxItem Content="False"/>
+ </ComboBox>
+
+ <!-- 鍐欏叆鎸夐挳 -->
+ <Button Grid.Row="2" Grid.ColumnSpan="2" x:Name="writeBtn" Content="鍐欏叆" Padding="20,6"
+ IsEnabled="{Binding IsMaintenanceMode, RelativeSource={RelativeSource AncestorType=UserControl}}"
+ Click="WriteBtn_Click" HorizontalAlignment="Left"
+ Background="#9C27B0" Foreground="White" BorderThickness="0" Cursor="Hand"/>
+ </Grid>
+ </Border>
+
+ <!-- IO 鐘舵�佹樉绀哄尯 -->
+ <Border Grid.Row="2" BorderBrush="#DDD" BorderThickness="1" CornerRadius="4">
+ <Grid>
+ <Grid.RowDefinitions>
+ <RowDefinition Height="Auto"/>
+ <RowDefinition Height="Auto"/>
+ </Grid.RowDefinitions>
+
+ <Border Grid.Row="0" Background="#F5F5F5" Padding="8,6">
+ <TextBlock Text="IO 鐐逛綅鐘舵��" FontWeight="Bold" FontSize="14"/>
+ </Border>
+
+ <ListView Grid.Row="1" x:Name="ioStatusList" Height="180"
+ Style="{StaticResource DefaultListTable}"
+ VirtualizingPanel.IsVirtualizing="True"
+ VirtualizingPanel.VirtualizationMode="Standard">
+ <ListView.View>
+ <GridView AllowsColumnReorder="False">
+ <GridViewColumn Width="120" Header="鍦板潃">
+ <GridViewColumn.CellTemplate>
+ <DataTemplate>
+ <Border Style="{StaticResource CellBorder}">
+ <TextBlock Style="{StaticResource ListTableTextBlock}"
+ Text="{Binding Address}" FontFamily="Consolas"/>
+ </Border>
+ </DataTemplate>
+ </GridViewColumn.CellTemplate>
+ </GridViewColumn>
+ <GridViewColumn Width="80" Header="鍊�">
+ <GridViewColumn.CellTemplate>
+ <DataTemplate>
+ <Border Style="{StaticResource CellBorder}">
+ <TextBlock Text="{Binding Value}">
+ <TextBlock.Style>
+ <Style TargetType="TextBlock" BasedOn="{StaticResource ListTableTextBlock}">
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding Value}" Value="True">
+ <Setter Property="Foreground" Value="#4CAF50"/>
+ <Setter Property="FontWeight" Value="Bold"/>
+ </DataTrigger>
+ <DataTrigger Binding="{Binding Value}" Value="False">
+ <Setter Property="Foreground" Value="#999"/>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </TextBlock.Style>
+ </TextBlock>
+ </Border>
+ </DataTemplate>
+ </GridViewColumn.CellTemplate>
+ </GridViewColumn>
+ <GridViewColumn Width="150" Header="鏇存柊鏃堕棿">
+ <GridViewColumn.CellTemplate>
+ <DataTemplate>
+ <Border Style="{StaticResource CellBorder}">
+ <TextBlock Style="{StaticResource ListTableTextBlock}"
+ Text="{Binding LastUpdate, StringFormat=HH:mm:ss}"/>
+ </Border>
+ </DataTemplate>
+ </GridViewColumn.CellTemplate>
+ </GridViewColumn>
+ </GridView>
+ </ListView.View>
+ </ListView>
+ </Grid>
+ </Border>
+
+ <!-- 浜掗攣鐘舵�佸尯 -->
+ <Border Grid.Row="3" BorderBrush="#DDD" BorderThickness="1" CornerRadius="4">
+ <Grid>
+ <Grid.RowDefinitions>
+ <RowDefinition Height="Auto"/>
+ <RowDefinition Height="*"/>
+ </Grid.RowDefinitions>
+
+ <Border Grid.Row="0" Background="#FFF3E0" Padding="8,6">
+ <TextBlock Text="浜掗攣鐘舵��" FontWeight="Bold" FontSize="14" Foreground="#E65100"/>
+ </Border>
+
+ <ScrollViewer Grid.Row="1" VerticalScrollBarVisibility="Auto">
+ <ItemsControl x:Name="interlockList" Margin="8">
+ <ItemsControl.ItemTemplate>
+ <DataTemplate>
+ <Border BorderBrush="#EEE" BorderThickness="0,0,0,1" Padding="4,6">
+ <StackPanel Orientation="Horizontal">
+ <TextBlock Text="{Binding Name}" FontWeight="Bold" Width="150"/>
+ <TextBlock Text="{Binding Status}" Margin="10,0,0,0">
+ <TextBlock.Style>
+ <Style TargetType="TextBlock">
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding Status}" Value="婊¤冻">
+ <Setter Property="Foreground" Value="#4CAF50"/>
+ </DataTrigger>
+ <DataTrigger Binding="{Binding Status}" Value="涓嶆弧瓒�">
+ <Setter Property="Foreground" Value="#F44336"/>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </TextBlock.Style>
+ </TextBlock>
+ </StackPanel>
+ </Border>
+ </DataTemplate>
+ </ItemsControl.ItemTemplate>
+ </ItemsControl>
+ </ScrollViewer>
+ </Grid>
+ </Border>
+ </Grid>
+</UserControl>
--
Gitblit v1.9.1