Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
W
weishida_DBbrower
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
潘栩锋
weishida_DBbrower
Commits
49140d7b
Commit
49140d7b
authored
Jul 28, 2020
by
潘栩锋
🚴
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.修改 修改版本号 为 v1.1.0
2.添加 主界面标题栏显示版本号
parent
51eee7d0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
5 deletions
+40
-5
MainWindow.xaml.cs
WSDDBBrower/WSDDBBrower/MainWindow.xaml.cs
+36
-1
AssemblyInfo.cs
WSDDBBrower/WSDDBBrower/Properties/AssemblyInfo.cs
+4
-4
No files found.
WSDDBBrower/WSDDBBrower/MainWindow.xaml.cs
View file @
49140d7b
...
...
@@ -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
)
...
...
WSDDBBrower/WSDDBBrower/Properties/AssemblyInfo.cs
View file @
49140d7b
...
...
@@ -11,8 +11,8 @@ using System.Windows;
[assembly: AssemblyDescription("用于读取 中间层数据库 现场温度 及 厚度 数据,并出报表")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("高明威仕达")]
[assembly: AssemblyProduct("
WSDDBBrower
")]
[assembly: AssemblyCopyright("Copyright © 201
9
")]
[assembly: AssemblyProduct("
威仕达数据库浏览
")]
[assembly: AssemblyCopyright("Copyright © 201
2
")]
[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")]
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment