设置窗口显示版本号和编译时间
This commit is contained in:
parent
1e38390fc6
commit
5c6cf9ecdb
@ -13,7 +13,7 @@
|
||||
WindowTransitionsEnabled="False"
|
||||
FontFamily="Microsoft YaHei"
|
||||
WindowState="Maximized"
|
||||
Title="飞行魔方--无人机编队控制系统 V2.0"
|
||||
Title="飞行魔方无人机编队控制系统 V2.0"
|
||||
PreviewKeyDown="MetroWindow_PreviewKeyDown"
|
||||
PreviewKeyUp="MetroWindow_PreviewKeyUp"
|
||||
Style="{StaticResource VSWindowStyleKey}"
|
||||
|
@ -21,6 +21,7 @@ using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Shapes;
|
||||
using Plane.CommunicationManagement;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Plane.FormationCreator
|
||||
{
|
||||
@ -34,7 +35,10 @@ namespace Plane.FormationCreator
|
||||
InitializeComponent();
|
||||
|
||||
this.DataContext = ServiceLocator.Current.GetInstance<MainViewModel>();
|
||||
|
||||
//改到设置窗口显示版本信息
|
||||
// var version = Assembly.GetExecutingAssembly().GetName().Version;
|
||||
// Title = "飞行魔方无人机编队控制系统 V" + version.ToString() + "编译时间[" + System.IO.File.GetLastWriteTime(this.GetType().Assembly.Location).ToString() + "]";
|
||||
|
||||
|
||||
//ShowConnectDialog();
|
||||
//if (_copterManager.CoptersForControlling.Count <= 0)
|
||||
@ -53,7 +57,7 @@ namespace Plane.FormationCreator
|
||||
{
|
||||
loginWindow = new ConnectWindow();
|
||||
}
|
||||
loginWindow.Show();
|
||||
loginWindow.ShowDialog ();
|
||||
}
|
||||
|
||||
private void btnLogin_Click(object sender, RoutedEventArgs e)
|
||||
|
@ -450,6 +450,9 @@
|
||||
<ItemGroup>
|
||||
<Resource Include="bg.jpg" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\Logo_small.png" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="..\packages\System.Data.SQLite.Core.1.0.109.1\build\net46\System.Data.SQLite.Core.targets" Condition="Exists('..\packages\System.Data.SQLite.Core.1.0.109.1\build\net46\System.Data.SQLite.Core.targets')" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
|
@ -12,7 +12,7 @@ using System.Windows;
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("GroupGCS")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2016")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2020")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
@ -51,5 +51,5 @@ using System.Windows;
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("2.0.0.0")]
|
||||
[assembly: AssemblyVersion("2.0.*")]
|
||||
[assembly: AssemblyFileVersion("2.0.0.0")]
|
||||
|
@ -59,5 +59,15 @@ namespace Plane.FormationCreator.Properties {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap Logo_small {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Logo_small", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -46,7 +46,7 @@
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
@ -60,6 +60,7 @@
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
@ -68,9 +69,10 @@
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
@ -85,9 +87,10 @@
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
@ -109,9 +112,13 @@
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="Logo_small" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Logo_small.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
BIN
Plane.FormationCreator/Resources/Logo_small.png
Normal file
BIN
Plane.FormationCreator/Resources/Logo_small.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 9.5 KiB |
@ -7,9 +7,9 @@
|
||||
xmlns:c="http://metro.mahapps.com/winfx/xaml/controls"
|
||||
xmlns:ec="clr-namespace:Plane.Windows.Controls;assembly=Plane.Windows"
|
||||
mc:Ignorable="d"
|
||||
Title="设置"
|
||||
Width="496.634"
|
||||
Height="205.942"
|
||||
Title=""
|
||||
Width="500"
|
||||
Height="300"
|
||||
|
||||
WindowStartupLocation="CenterScreen"
|
||||
FontFamily="Microsoft YaHei"
|
||||
@ -23,6 +23,8 @@
|
||||
<RowDefinition Height="40" />
|
||||
<RowDefinition Height="40" />
|
||||
<RowDefinition Height="40" />
|
||||
<RowDefinition Height="50" />
|
||||
<RowDefinition Height="30" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Grid.ColumnDefinitions>
|
||||
@ -58,6 +60,12 @@
|
||||
<Button Content="搜索飞机" Width="90" Margin="5,5,5,5" Command="{Binding QueryAllCopterCommand}"/>
|
||||
</StackPanel>
|
||||
|
||||
<Image Margin="0,0,0,0" x:Name="image1" Grid.RowSpan="2" Grid.Row="3" Source="/Resources/Logo_small.png" HorizontalAlignment="Left" />
|
||||
<TextBlock Margin="5" Grid.Row="3" x:Name="about_ver" HorizontalAlignment="Right" VerticalAlignment="Bottom" Text="版本:V2.0.1213" />
|
||||
<TextBlock Margin="5" Grid.Row="4" HorizontalAlignment="Right" x:Name="about_buildtm" VerticalAlignment="Bottom" Text="编译日期:2020.12.12" />
|
||||
|
||||
|
||||
|
||||
|
||||
</Grid>
|
||||
</c:MetroWindow>
|
||||
|
@ -16,6 +16,7 @@ using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Shapes;
|
||||
using Plane.FormationCreator.Util;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Plane.FormationCreator.Views
|
||||
{
|
||||
@ -46,6 +47,12 @@ namespace Plane.FormationCreator.Views
|
||||
panel3.Visibility = Visibility.Collapsed;
|
||||
}
|
||||
|
||||
var version = Assembly.GetExecutingAssembly().GetName().Version;
|
||||
about_ver.Text = "版本:" + version.ToString();
|
||||
about_buildtm .Text= "编译时间:" + System.IO.File.GetLastWriteTime(this.GetType().Assembly.Location).ToString() ;
|
||||
|
||||
|
||||
|
||||
//txtIPs.Focus();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user