change - 添加系统版本信息

master
wenjy 2 months ago
parent eae79fb515
commit 7f2857b992

@ -0,0 +1,44 @@
<Window x:Class="SlnMesnac.WPF.Page.Version.VersionInfoWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:SlnMesnac.WPF.Page.Version"
mc:Ignorable="d"
Title="系统版本信息" Height="450" Width="400" Background="#E0E9F2" Icon="/Page/Version/logo.png" ResizeMode="NoResize">
<Grid>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition Height="2*"/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition Height="2*"/>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Border Grid.Row="1">
<Image Grid.Row="1" Source="\Templates\image\logo.png" />
</Border>
<StackPanel Grid.Row="2" VerticalAlignment="Center" HorizontalAlignment="Center">
<TextBlock Text="V3.6.0.51 Build202024/09/20" FontSize="18" Foreground="#31446E"/>
</StackPanel>
<StackPanel Grid.Row="3" VerticalAlignment="Center" HorizontalAlignment="Center">
<TextBlock Text="工业相机SDK1.1.12.0" FontSize="16" Foreground="#31446E"/>
</StackPanel>
<StackPanel Grid.Row="4" VerticalAlignment="Center" HorizontalAlignment="Center">
<TextBlock Text="BCR算法3.6.1" FontSize="16" Foreground="#31446E"/>
</StackPanel>
<StackPanel Grid.Row="5" VerticalAlignment="Center" HorizontalAlignment="Center">
<TextBlock Text="TDCR算法2.2.4" FontSize="16" Foreground="#31446E"/>
</StackPanel>
<StackPanel Grid.Row="6" VerticalAlignment="Center" HorizontalAlignment="Center">
<TextBlock Text="智能读码器SDK1.5.0.2" FontSize="16" Foreground="#31446E"/>
</StackPanel>
<StackPanel Grid.Row="8" VerticalAlignment="Center" HorizontalAlignment="Center">
<TextBlock Text="Copyright ◎ 2024 青岛海威物联科技有限公司 版权所有" FontSize="14" Foreground="Gray"/>
</StackPanel>
</Grid>
</Window>

@ -0,0 +1,27 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
namespace SlnMesnac.WPF.Page.Version
{
/// <summary>
/// VersionInfoWindow.xaml 的交互逻辑
/// </summary>
public partial class VersionInfoWindow : Window
{
public VersionInfoWindow()
{
InitializeComponent();
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

@ -9,8 +9,10 @@
<ItemGroup>
<None Remove="appsettings.json" />
<None Remove="Page\Version\logo.png" />
<None Remove="Templates\image\background.jpg" />
<None Remove="Templates\image\left.png" />
<None Remove="Templates\image\logo.png" />
<None Remove="Templates\image\right.png" />
</ItemGroup>
@ -45,8 +47,10 @@
</ItemGroup>
<ItemGroup>
<Resource Include="Page\Version\logo.png" />
<Resource Include="Templates\image\background.jpg" />
<Resource Include="Templates\image\left.png" />
<Resource Include="Templates\image\logo.png" />
<Resource Include="Templates\image\right.png" />
</ItemGroup>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

@ -5,6 +5,7 @@ using Microsoft.Extensions.Logging;
using SlnMesnac.Business;
using SlnMesnac.WPF.Page;
using SlnMesnac.WPF.Page.History;
using SlnMesnac.WPF.Page.Version;
using System;
using System.Windows;
@ -168,6 +169,12 @@ namespace SlnMesnac.WPF.ViewModel
case "History":
UserContent = historyControl; break;
//historyControl
case "Version":
VersionInfoWindow versionInfoWindow = new VersionInfoWindow();
versionInfoWindow.Topmost = true; // 设置为最顶层
versionInfoWindow.WindowStartupLocation = WindowStartupLocation.CenterScreen; // 设置为居中
versionInfoWindow.ShowDialog();
break;
default: break;
}
}

Loading…
Cancel
Save