From fe2aa4880d5c9fd88088ad0ed81ebaca05629f5f Mon Sep 17 00:00:00 2001
From: wenxiangchao <wenxiangchao@ihengxin.com.cn>
Date: 星期一, 02 十一月 2026 17:59:45 +0800
Subject: [PATCH] feat: 集成CAN驱动/模拟器 + 仪器仪表注册/硬件调试模块
---
Plugin.DOControl/DOControl.xaml | 189 ++++++++++++++++++++++++++--------------------
1 files changed, 106 insertions(+), 83 deletions(-)
diff --git a/Plugin.DOControl/DOControl.xaml b/Plugin.DOControl/DOControl.xaml
index 30bfef1..7f4dc1c 100644
--- a/Plugin.DOControl/DOControl.xaml
+++ b/Plugin.DOControl/DOControl.xaml
@@ -1,112 +1,135 @@
-锘�<hb:PluginControl x:Class="HMI.DOControl.DOControl"
+锘�<hb:PluginControl x:Class="Plugin.DOControl.DOControl"
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:local="clr-namespace:Plugin.DOControl"
+ mc:Ignorable="d"
xmlns:hb="clr-namespace:HMI.Base;assembly=HMI.Base"
- xmlns:local="clr-namespace:HMI.DOControl"
xmlns:uic="clr-namespace:HMI.UI.Converter;assembly=HMI.UI"
xmlns:pw="https://opensource.panuon.com/wpf"
xmlns:pu="https://opensource.panuon.com/wpf-ui"
xmlns:dp="clr-namespace:HMI.UI.DpUtil;assembly=HMI.UI"
- mc:Ignorable="d"
Loaded="UserControl_Loaded"
- Background="{StaticResource WorkspaceBackground}"
+ Background="{DynamicResource WorkspaceBackground}"
d:DesignHeight="450" d:DesignWidth="800">
+ <UserControl.Resources>
+ <ResourceDictionary>
+ <ResourceDictionary.MergedDictionaries>
+ <pu:StyleDictionary Includes="GroupBox" />
+ </ResourceDictionary.MergedDictionaries>
+
+ <Style TargetType="GroupBox" BasedOn="{StaticResource {x:Static pu:StyleKeys.GroupBoxStyle}}">
+ <Setter Property="pu:GroupBoxHelper.HeaderBackground" Value="{DynamicResource ReHoriBar}"/>
+ <Setter Property="pu:GroupBoxHelper.HeaderForeground" Value="{DynamicResource PrimaryColorContract}"/>
+ <Setter Property="pu:GroupBoxHelper.HeaderFontWeight" Value="Bold"/>
+ </Style>
+ </ResourceDictionary>
+ </UserControl.Resources>
+
<Border Style="{StaticResource CardBoarder}">
-
-
<Grid dp:GridHelper.Space="10" Cursor="">
<Grid.RowDefinitions>
- <RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition/>
</Grid.RowDefinitions>
- <TextBlock FontSize="{StaticResource TitleFontSize}"
-VerticalAlignment="Center" HorizontalAlignment="Left" Text="鏃ュ織鏌ヨ"/>
-
- <DockPanel Grid.Row="1" Cursor="">
+ <DockPanel Grid.Row="0" Cursor="">
<StackPanel DockPanel.Dock="Right" Style="{StaticResource ButtonGroup}">
- <Button Style="{StaticResource QueryBtn}"
- x:Name="queryBtn" Click="Button_Click"/>
+ <Button Style="{StaticResource SettingBtn}"
+x:Name="settingBtn" Click="Button_Click"/>
+ <!--<Button Style="{StaticResource AddBtn}"
+ x:Name="addBtn" Click="Button_Click"/>
+
<Button Style="{StaticResource RfhBtn}"
x:Name="resetBtn" Click="Button_Click"/>
<Button x:Name="exportBtn"
- Style="{StaticResource ExportBtn}" Click="Button_Click"/>
+ Style="{StaticResource ExportBtn}" Click="Button_Click"/>-->
</StackPanel>
-
- <StackPanel Style="{StaticResource ButtonGroup}" HorizontalAlignment="Left">
- <TextBlock Style="{StaticResource TitleBox}" FontSize="14" Text="绾у埆"/>
- <ComboBox Style="{StaticResource FormComboxStyle}" x:Name="levelInput"
- Width="180"
- SelectedValuePath="Content">
- <ComboBoxItem Content="info"/>
- <ComboBoxItem Content="warn"/>
- <ComboBoxItem Content="error"/>
- </ComboBox>
-
- <TextBlock Style="{StaticResource TitleBox}" FontSize="14" Text="寮�濮嬫椂闂�"/>
- <pu:DateTimePicker Style="{StaticResource TimePicker}" x:Name="startTimeInput"/>
-
- <TextBlock Style="{StaticResource TitleBox}" FontSize="14" Text="缁撴潫鏃堕棿"/>
- <pu:DateTimePicker Style="{StaticResource TimePicker}" x:Name="endTimeInput"/>
-
- <TextBlock Style="{StaticResource TitleBox}" FontSize="14" Text="鏉ユ簮"/>
- <!--<ComboBox Style="{StaticResource FormComboxStyle}" x:Name="sourceInput" Width="180"></ComboBox>-->
- <TextBox Style="{StaticResource EditorTextBoxStyle}" x:Name="sourceInput" Width="180"/>
-
- <TextBlock Style="{StaticResource TitleBox}" FontSize="14" Text="瀹炴椂鍒锋柊"/>
- <CheckBox x:Name="autoRfhInput" HorizontalAlignment="Center" VerticalAlignment="Center"
- IsChecked="{Binding AutoRfh,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
- />
- </StackPanel>
+ <TextBlock FontSize="{StaticResource TitleFontSize}"
+VerticalAlignment="Center" HorizontalAlignment="Left" Text="{DynamicResource doc.title}"/>
</DockPanel>
+ <Grid Grid.Row="1" >
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="0*"/>
+ <ColumnDefinition Width="10*"/>
+ </Grid.ColumnDefinitions>
+ <!--<ListBox ItemsSource="{Binding Groups}" SelectedItem="{Binding SelectedGroup}">
+ <ListBox.Style>
+ <Style TargetType="ListBox">
+ <Setter Property="Padding" Value="-1"/>
+ <Setter Property="Background" Value="Transparent"/>
+ <Setter Property="ItemContainerStyle">
+ <Setter.Value>
+ <Style TargetType="ListBoxItem">
+ <Setter Property="Margin" Value="0"/>
+ <Setter Property="Cursor" Value="Hand"/>
+ <Setter Property="FontWeight" Value="Bold"/>
- <DataGrid Grid.Row="2" x:Name="table" Style="{StaticResource DefaultDataGrid}">
- <DataGrid.RowStyle>
- <Style TargetType="DataGridRow" BasedOn="{StaticResource {x:Static pu:StyleKeys.DataGridRowStyle}}">
- <Style.Triggers>
- <DataTrigger Binding="{Binding type}" Value="warn">
- <Setter Property="Background" Value="{StaticResource WarningColor}"/>
- <Setter Property="Foreground" Value="Black"/>
- </DataTrigger>
- <DataTrigger Binding="{Binding type}" Value="error">
- <Setter Property="Background" Value="{StaticResource DangerColor}"/>
- <Setter Property="Foreground" Value="Black"/>
- </DataTrigger>
- <Trigger Property="IsSelected" Value="True">
- <Setter Property="Background" Value="Transparent"/>
- </Trigger>
- <Trigger Property="IsMouseOver" Value="True">
- <Setter Property="Background" Value="Transparent"/>
- </Trigger>
- </Style.Triggers>
- </Style>
- </DataGrid.RowStyle>
- <DataGrid.Columns>
- <DataGridTemplateColumn Header="" Width="Auto" CanUserResize="False">
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <CheckBox VerticalAlignment="Center" IsChecked="{Binding Selected,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/>
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>
- <DataGridTemplateColumn Header="#" CanUserResize="False">
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <TextBlock Text="{Binding Converter={StaticResource rowNumber},
- RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type DataGridRow},AncestorLevel=1}}"/>
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>
- <DataGridTextColumn Width="*" Binding="{Binding type}" Header="绾у埆" />
- <DataGridTextColumn Width="*" Binding="{Binding time}" Header="鏃堕棿" />
- <DataGridTextColumn Width="*" Binding="{Binding source}" Header="鏉ユ簮" />
- <DataGridTextColumn Width="*" Binding="{Binding text}" Header="鏂囨湰" />
- </DataGrid.Columns>
- </DataGrid>
+ <Setter Property="Background" Value="{DynamicResource PrimaryColor}"/>
+ <Setter Property="Template">
+ <Setter.Value>
+ <ControlTemplate TargetType="ListBoxItem">
+ <Border x:Name="border" Padding="0,15">
+ <ContentPresenter x:Name="cp" Content="{TemplateBinding Content}"
+ContentStringFormat="{TemplateBinding ContentStringFormat}"
+ContentTemplate="{TemplateBinding ContentTemplate}" />
+ </Border>
+
+
+ <ControlTemplate.Triggers>
+ <Trigger Property="IsSelected" Value="True">
+ <Setter Property="Background" TargetName="border"
+ Value="{DynamicResource ReHoriBar}"/>
+ <Setter Property="Foreground" Value="White"/>
+ </Trigger>
+
+ <Trigger Property="IsMouseOver" Value="True">
+ <Setter TargetName="border" Property="Background" Value="#7093d3" />
+ <Setter Property="Foreground" Value="{DynamicResource SecondPrimaryColorContract}" />
+ </Trigger>
+ </ControlTemplate.Triggers>
+ </ControlTemplate>
+ </Setter.Value>
+ </Setter>
+ </Style>
+ </Setter.Value>
+ </Setter>
+ <Setter Property="ItemsPanel">
+ <Setter.Value>
+ <ItemsPanelTemplate>
+ <VirtualizingStackPanel IsItemsHost="True"/>
+ </ItemsPanelTemplate>
+ </Setter.Value>
+ </Setter>
+ <Setter Property="ItemTemplate">
+ <Setter.Value>
+ <DataTemplate>
+ <Label VerticalContentAlignment="Center" HorizontalContentAlignment="Center"
+ Content="{Binding Mode=OneWay}"/>
+ </DataTemplate>
+ </Setter.Value>
+ </Setter>
+ </Style>
+ </ListBox.Style>
+ </ListBox>-->
+
+ <Border Grid.Column="1" BorderThickness="0" Padding="0" BorderBrush="#FFABADB3">
+ <Grid>
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition/>
+ <ColumnDefinition/>
+ </Grid.ColumnDefinitions>
+ <StackPanel x:Name="panel0" Margin="0,0,10,0">
+
+ </StackPanel>
+ <StackPanel Grid.Column="1" x:Name="panel1" >
+
+ </StackPanel>
+ </Grid>
+ </Border>
+ </Grid>
</Grid>
</Border>
</hb:PluginControl>
\ No newline at end of file
--
Gitblit v1.9.1