Commit 49140d7b authored by 潘栩锋's avatar 潘栩锋 🚴

1.修改 修改版本号 为 v1.1.0

2.添加 主界面标题栏显示版本号
parent 51eee7d0
......@@ -2,6 +2,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
......@@ -28,7 +29,41 @@ namespace WSDDBBrowser
App.MetroWindow = this;
this.frame.Content = new PgMain();
Title = GetTitle();
}
string GetTitle()
{
//显示版本号
Assembly asm = Assembly.GetAssembly(this.GetType());
AssemblyProductAttribute asmproduct = (AssemblyProductAttribute)Attribute.GetCustomAttribute(asm, typeof(AssemblyProductAttribute));
Version version = asm.GetName().Version;
string version_str = string.Format("v{0}.{1}.{2}", version.Major, version.Minor, version.Build);
string location = asm.Location;
string buliddt;
if (!string.IsNullOrEmpty(location))
{
buliddt = System.IO.File.GetLastWriteTime(location).ToString("yyyyMMdd");
}
else
{
buliddt = "";
}
string Product = asmproduct.Product;
string V = version_str;
string BuildTime = buliddt;
if (!string.IsNullOrEmpty(BuildTime))
{
return Product + " " + V + " at " + BuildTime;
}
else
{
return Product + " " + V;
}
}
private void ButtonGitLabClick(object sender, RoutedEventArgs e)
......
......@@ -11,8 +11,8 @@ using System.Windows;
[assembly: AssemblyDescription("用于读取 中间层数据库 现场温度 及 厚度 数据,并出报表")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("高明威仕达")]
[assembly: AssemblyProduct("WSDDBBrower")]
[assembly: AssemblyCopyright("Copyright © 2019")]
[assembly: AssemblyProduct("威仕达数据库浏览")]
[assembly: AssemblyCopyright("Copyright © 2012")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
......@@ -51,7 +51,7 @@ using System.Windows;
// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
// 方法是按如下所示使用“*”: :
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.2.0")]
[assembly: AssemblyFileVersion("1.0.2.0")]
[assembly: AssemblyVersion("1.1.0.0")]
[assembly: AssemblyFileVersion("1.1.0.0")]
[assembly: Guid("C2E14FF6-9BAD-46D4-A7B0-C29949859A63")]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment