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驱动/模拟器 + 仪器仪表注册/硬件调试模块
---
WPFProject/PanuonWindow.xaml | 81 ++++++++++++++++++++++++++--------------
1 files changed, 53 insertions(+), 28 deletions(-)
diff --git a/WPFProject/PanuonWindow.xaml b/WPFProject/PanuonWindow.xaml
index 943d9d0..32a9107 100644
--- a/WPFProject/PanuonWindow.xaml
+++ b/WPFProject/PanuonWindow.xaml
@@ -22,25 +22,11 @@
pu:WindowXCaption.HeaderAlignment="Stretch"
Title="TestPlatform"
pu:WindowXCaption.Background="Transparent"
- pu:WindowXCaption.Height="80"
- IsOverlayerVisible="True"
+ pu:WindowXCaption.Height="60"
pu:WindowXCaption.Foreground="#FFF">
<Window.Resources>
<hc:LangConverter x:Key="lc"/>
<dc:CollectionVisibility x:Key="cv"/>
- <Style x:Key="UserMenu" TargetType="Menu" BasedOn="{StaticResource {x:Static pu:StyleKeys.MenuStyle}}">
- <Setter Property="Background" Value="{StaticResource PrimaryColor}"/>
- <Setter Property="Foreground" Value="#FFF"/>
- <Setter Property="pu:IconHelper.FontFamily" Value="{StaticResource iconfont}"/>
- <Setter Property="pu:IconHelper.Margin" Value="0,0,10,0"/>
- <Setter Property="BorderThickness" Value="0"/>
- <Setter Property="Cursor" Value="Hand"/>
- <Setter Property="pu:MenuHelper.SubmenuItemsForeground" Value="#3a3a3a"/>
- <Setter Property="pu:MenuHelper.SubmenuItemsBackground" Value="White"/>
- <Setter Property="pu:MenuHelper.TopLevelItemsHoverBackground" Value="{x:Null}"/>
- <Setter Property="pu:MenuHelper.TopLevelDropDownPlacement" Value="BottomLeft"/>
- </Style>
-
</Window.Resources>
<Window.Background>
<ImageBrush Stretch="Uniform" AlignmentX="Left" AlignmentY="Top"
@@ -49,9 +35,10 @@
<pu:WindowXCaption.HeaderTemplate>
<DataTemplate>
- <DockPanel DataContext="{Binding ElementName=window}" WindowChrome.IsHitTestVisibleInChrome="True" VerticalAlignment="Center" Height="100">
+ <DockPanel DataContext="{Binding ElementName=window}" WindowChrome.IsHitTestVisibleInChrome="True"
+ VerticalAlignment="Center" Height="80">
<StackPanel Orientation="Horizontal">
- <Image DockPanel.Dock="Left" Source="{Binding WindowLogo}" Margin="5,0,20,0" Height="60" VerticalAlignment="Center" Stretch="Fill"
+ <Image DockPanel.Dock="Left" Source="{Binding WindowLogo}" Margin="5,0,20,0" Height="40" VerticalAlignment="Center" Stretch="Fill"
RenderOptions.BitmapScalingMode="HighQuality" />
<TextBlock FontSize="30" VerticalAlignment="Center" Text="{Binding WindowTitle}">
<TextBlock.Effect>
@@ -71,9 +58,30 @@
</Grid.RowDefinitions>
<StackPanel Grid.Row="0" VerticalAlignment="Top" Margin="10,10,0,0" Orientation="Horizontal">
<Menu Margin="0" Padding="0" VerticalAlignment="Top"
- VerticalContentAlignment="Center" Style="{StaticResource UserMenu}"
-
- Background="Transparent">
+ VerticalContentAlignment="Center" Background="Transparent">
+ <Menu.Resources>
+ <ResourceDictionary>
+ <ResourceDictionary.MergedDictionaries>
+ <pu:StyleDictionary Includes="Menu" />
+ </ResourceDictionary.MergedDictionaries>
+ </ResourceDictionary>
+ </Menu.Resources>
+ <Menu.Style>
+ <Style TargetType="Menu" BasedOn="{StaticResource {x:Static pu:StyleKeys.MenuStyle}}">
+ <Setter Property="Background" Value="{StaticResource PrimaryColor}"/>
+ <Setter Property="Foreground" Value="#FFF"/>
+ <Setter Property="pu:IconHelper.FontFamily" Value="{StaticResource iconfont}"/>
+ <Setter Property="pu:IconHelper.Margin" Value="0,0,10,0"/>
+ <Setter Property="BorderThickness" Value="0"/>
+ <Setter Property="Cursor" Value="Hand"/>
+ <Setter Property="pu:MenuHelper.SubmenuItemsForeground" Value="#3a3a3a"/>
+ <Setter Property="pu:MenuHelper.SubmenuItemsBackground" Value="White"/>
+ <Setter Property="pu:MenuHelper.TopLevelItemsHoverBackground" Value="{x:Null}"/>
+ <Setter Property="pu:MenuHelper.TopLevelDropDownPlacement" Value="BottomLeft"/>
+ </Style>
+ </Menu.Style>
+
+
<MenuItem x:Name="userMenu" Header="{Binding WelcomeTitle}" FontSize="16">
<MenuItem Icon="" Cursor="Hand" FontSize="14" Header="閫�鍑虹櫥褰�"
x:Name="MiLogout" Click="MenuItem_Click"/>
@@ -131,11 +139,14 @@
</Button.Style>
</Button>
</StackPanel>
- <Button Grid.Row="1" Margin="20,0,0,20" Foreground="#FFF"
- Visibility="{Binding Alarms.Count,Converter={StaticResource cv}}"
- HorizontalContentAlignment="Left" Style="{StaticResource LinkButton}"
- Click="Clear_AllAlarm_Click"
- Content="娓呴櫎鍏ㄩ儴鎶ヨ"/>
+ <DockPanel Margin="20,0,0,20" Grid.Row="1" LastChildFill="False">
+ <Button DockPanel.Dock="Left" Foreground="#FFF"
+ Visibility="{Binding Alarms.Count,Converter={StaticResource cv}}"
+ HorizontalContentAlignment="Left" Style="{StaticResource LinkButton}"
+ Click="Clear_AllAlarm_Click"
+ Content="娓呴櫎鍏ㄩ儴鎶ヨ"/>
+ <!--<local:ResourceUI x:Name="resourceUI" Loaded="resourceUI_Loaded" DockPanel.Dock="Right"/>-->
+ </DockPanel>
</Grid>
<ListBox x:Name="list"
@@ -234,7 +245,7 @@
<Setter Property="Padding" Value="0"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
- <Setter Property="Height" Value="70"/>
+ <Setter Property="Height" Value="50"/>
<Setter Property="Margin" Value="0,0,0,1"/>
<Setter Property="BorderThickness" Value="0"/>
</Style>
@@ -254,13 +265,27 @@
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
- <ctl:MainTabControl Grid.Row="0" x:Name="menuTab">
+ <ctl:MainTabControl Grid.Row="0" x:Name="menuTab" TabChanged="menuTab_TabChanged">
</ctl:MainTabControl>
<!--<ctl:MenuTabControl Grid.Row="1" x:Name="menuTab" OnTabChange="menuTab_OnTabChange"> </ctl:MenuTabControl>-->
- <!--<StatusBar Grid.Row="1" Background="{StaticResource HoriBar}"></StatusBar>-->
+ <DockPanel Grid.Row="1" Height="20" Background="{StaticResource PrimaryColor}" LastChildFill="False">
+
+ <TextBlock Margin="20,0,0,0" FontSize="14" VerticalAlignment="Center" Foreground="#FFF">
+<Run Text="{DynamicResource App.Version}"/>
+<Run Text="{Binding SoftwareVersion}"/>
+ </TextBlock>
+
+ <TextBlock Margin="20,0,0,0" FontSize="14" VerticalAlignment="Center" Foreground="#FFF">
+<Run Text="{DynamicResource App.PluginVersion}"/>
+<Run Text="{Binding PluginVersion}"/>
+ </TextBlock>
+
+ <local:ResourceUI FontSize="14" Margin="0,1,20,1" DockPanel.Dock="Right" x:Name="resourceUI"/>
+
+ </DockPanel>
</Grid>
</pu:WindowX>
--
Gitblit v1.9.1