From 559890c482f5973f06aafdfec9550fee5ba3c7f2 Mon Sep 17 00:00:00 2001
From: wenxiangchao <wenxiangchao@ihengxin.com.cn>
Date: 星期一, 09 十一月 2026 17:02:15 +0800
Subject: [PATCH] feat: CAN 模拟器 TCP 化 + 多设备并发调试 + 后台生命周期管理

---
 HMI.ParameterManage/ParameterSetting.xaml |   42 +++++++++++++++++++++++++++++++++++++-----
 1 files changed, 37 insertions(+), 5 deletions(-)

diff --git a/HMI.ParameterManage/ParameterSetting.xaml b/HMI.ParameterManage/ParameterSetting.xaml
index cc093dc..62b0320 100644
--- a/HMI.ParameterManage/ParameterSetting.xaml
+++ b/HMI.ParameterManage/ParameterSetting.xaml
@@ -12,13 +12,19 @@
              xmlns:cc="clr-namespace:HMI.Core;assembly=HMI.Core"
              mc:Ignorable="d"
              Loaded="UserControl_Loaded"
-             Background="{StaticResource WorkspaceBackground}"
+             Background="{DynamicResource WorkspaceBackground}"
              d:DesignHeight="450" d:DesignWidth="800">
     <UserControl.Resources>
         <ResourceDictionary>
             <ResourceDictionary.MergedDictionaries>
-                <ResourceDictionary Source="/HMI.UI;component/Style/PanuonDataGrid.xaml"/>
+                <!--<pu:StyleDictionary Includes="Expander" />-->
             </ResourceDictionary.MergedDictionaries>
+
+            <CollectionViewSource x:Key="GroupFilter" Source="{Binding Datasource}">
+                <CollectionViewSource.GroupDescriptions>
+                    <PropertyGroupDescription PropertyName="ShowGroup" />
+                </CollectionViewSource.GroupDescriptions>
+            </CollectionViewSource>
         </ResourceDictionary>
     </UserControl.Resources>
     <Border Style="{StaticResource CardBoarder}">
@@ -56,9 +62,35 @@
             </DockPanel>
 
             <DataGrid Grid.Row="2" x:Name="table" Style="{StaticResource DefaultDataGrid}"
-                      ItemsSource="{Binding Datasource}">
+                      ItemsSource="{Binding Source={StaticResource GroupFilter}}">
+                <DataGrid.GroupStyle>
+                    <GroupStyle>
+                        <GroupStyle.ContainerStyle>
+                            <Style TargetType="{x:Type GroupItem}">
+                                <Setter Property="Template">
+                                    <Setter.Value>
+                                        <ControlTemplate TargetType="{x:Type GroupItem}">
+                                            <Expander BorderThickness="0" Background="DarkCyan"
+                                                      IsExpanded="True">
+                                                <Expander.Header>
+                                                    <TextBlock Text="{Binding Name}" FontSize="15"
+                                                               Margin="8"
+                                                               Foreground="#FFF"/>
+                                                </Expander.Header>
+                                                <Border Background="#FFF">
+                                                    <ItemsPresenter />
+                                                </Border>
+                                            </Expander>
+                                        </ControlTemplate>
+                                    </Setter.Value>
+                                </Setter>
+                            </Style>
+                        </GroupStyle.ContainerStyle>
+                    </GroupStyle>
+                </DataGrid.GroupStyle>
+
                 <DataGrid.Columns>
-                    <DataGridTemplateColumn Header="" Width="Auto" CanUserResize="False">
+                    <DataGridTemplateColumn Width="20" CanUserResize="False">
                         <DataGridTemplateColumn.CellTemplate>
                             <DataTemplate>
                                 <CheckBox VerticalAlignment="Center" 
@@ -66,7 +98,7 @@
                             </DataTemplate>
                         </DataGridTemplateColumn.CellTemplate>
                     </DataGridTemplateColumn>
-                    <DataGridTemplateColumn Header="#" CanUserResize="False">
+                    <DataGridTemplateColumn Header="#" Width="30" CanUserResize="False">
                         <DataGridTemplateColumn.CellTemplate>
                             <DataTemplate>
                                 <TextBlock Text="{Binding Converter={StaticResource rowNumber},

--
Gitblit v1.9.1