登录添加版本号

This commit is contained in:
xu 2020-05-05 19:33:57 +08:00
parent 8938e3aaaa
commit c27138d0e3
4 changed files with 15 additions and 7 deletions

View File

@ -9,7 +9,7 @@
mc:Ignorable="d"
Title=""
Width="500"
Height="300"
Height="325.107"
WindowStartupLocation="CenterScreen"
FontFamily="Microsoft YaHei"
@ -28,6 +28,7 @@
<RowDefinition Height="50" />
<RowDefinition Height="30" />
<RowDefinition Height="30" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
@ -84,8 +85,8 @@
<Image Margin="0,0,0,0" x:Name="image1" Grid.RowSpan="2" Grid.Row="4" Source="/Resources/Logo_small.png" HorizontalAlignment="Left" />
<TextBlock Margin="5" Grid.Row="4" x:Name="about_ver" HorizontalAlignment="Right" VerticalAlignment="Bottom" Text="版本V2.0.1213" />
<TextBlock Margin="5" Grid.Row="5" HorizontalAlignment="Right" x:Name="about_buildtm" VerticalAlignment="Bottom" Text="编译日期2020.12.12" />
<TextBlock Margin="5" Grid.Row="5" x:Name="about_ver" HorizontalAlignment="Right" VerticalAlignment="Bottom" Text="版本V2.0.1213" />
<TextBlock Margin="5" Grid.Row="6" HorizontalAlignment="Right" x:Name="about_buildtm" VerticalAlignment="Bottom" Text="编译日期2020.12.12" />

View File

@ -49,7 +49,7 @@ namespace Plane.FormationCreator.Views
var version = Assembly.GetExecutingAssembly().GetName().Version;
about_ver.Text = "版本:" + version.ToString();
about_buildtm .Text= "编译时间:" + System.IO.File.GetLastWriteTime(this.GetType().Assembly.Location).ToString() ;
about_buildtm .Text= "编译时间:" + System.IO.File.GetLastWriteTime(this.GetType().Assembly.Location).ToString();

View File

@ -5,7 +5,7 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ignore="http://www.galasoft.ch/ignore"
xmlns:Helper="clr-namespace:Plane.Util"
mc:Ignorable="d ignore" Height="253.421" Width="463.894" Title="登录系统" ResizeMode="NoResize" WindowStartupLocation="CenterScreen"
mc:Ignorable="d ignore" Height="253.421" Width="463.894" Title="飞行魔方地面控制中心" ResizeMode="NoResize" WindowStartupLocation="CenterScreen"
>
<Grid HorizontalAlignment="Center" VerticalAlignment="Center">
@ -13,6 +13,7 @@
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition></ColumnDefinition>
@ -31,7 +32,7 @@
<PasswordBox
x:Name="passwordBox"
@ -50,6 +51,8 @@
Command="{Binding LoginCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type Window}}}" />
<CheckBox x:Name="checkBox" Content="保存密码" Grid.Column="1" HorizontalAlignment="Right" Margin="0,18.033,-85.353,12.168" Grid.Row="1" Width="75.353"
IsChecked="{Binding SavePassword}"/>
<Label x:Name="about_ver" Content="版本:" HorizontalContentAlignment="Right" Margin="0,10,-85,0" Grid.Row="3" VerticalAlignment="Top" Grid.ColumnSpan="2"/>
</Grid>
</Window>

View File

@ -1,5 +1,6 @@
using Microsoft.Practices.ServiceLocation;
using Plane.FormationCreator.ViewModels;
using System.Reflection;
using System.Windows;
using System.Windows.Controls;
@ -18,6 +19,9 @@ namespace Plane.FormationCreator.Views
InitializeComponent();
LoginViewModel loginViewModel = ServiceLocator.Current.GetInstance<LoginViewModel>();
this.DataContext = loginViewModel;
var version = Assembly.GetExecutingAssembly().GetName().Version;
about_ver.Content = "版本:" + version.ToString();
}
}