Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
T
Thick-Common
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
潘栩锋
Thick-Common
Commits
7d29227d
Commit
7d29227d
authored
Sep 20, 2021
by
潘栩锋
🚴
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加 测厚仪客户端界面菜单 添加 "升级检测" 按钮,调用 客户端根目录下的 update/update.exe
parent
d4c47c68
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
56 additions
and
0 deletions
+56
-0
UpdateMenu.cs
...FLY.Thick.Base/FLY.Thick.Base.UI/CustomMenu/UpdateMenu.cs
+55
-0
FLY.Thick.Base.UI.csproj
...FLY.Thick.Base/FLY.Thick.Base.UI/FLY.Thick.Base.UI.csproj
+1
-0
No files found.
Project.FLY.Thick.Base/FLY.Thick.Base.UI/CustomMenu/UpdateMenu.cs
0 → 100644
View file @
7d29227d
using
MultiLayout.UiModule
;
using
GalaSoft.MvvmLight.Command
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
using
System.Windows.Input
;
using
System.Windows.Media
;
using
System.Windows.Navigation
;
using
FLY.Thick.Base.UI
;
using
Unity
;
using
MultiLayout
;
using
System.Diagnostics
;
using
System.IO
;
namespace
FLY.Thick.Base.UI.CustomMenu
{
public
class
UpdateMenu
:
IMenu
{
public
string
Title
=>
"升级检测"
;
public
Brush
Brush
{
get
;
set
;
}
IUnityContainer
container
;
public
UpdateMenu
(
IUnityContainer
container
)
{
this
.
container
=
container
;
}
public
void
OnClick
()
{
//path = System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName;
//path = Path.GetDirectoryName(path);
string
path
=
System
.
AppDomain
.
CurrentDomain
.
BaseDirectory
;
string
exePath
=
Path
.
Combine
(
path
,
@"update\Update.exe"
);
if
(!
File
.
Exists
(
exePath
))
{
FLY
.
ControlLibrary
.
MyMessageBox
.
Show
(
$"不能找到
{
exePath
}
"
);
return
;
}
Process
startProc
=
new
Process
();
startProc
.
StartInfo
.
FileName
=
exePath
;
//就是你要打开的文件的详细路径
startProc
.
StartInfo
.
UseShellExecute
=
true
;
startProc
.
StartInfo
.
WorkingDirectory
=
System
.
IO
.
Path
.
GetDirectoryName
(
exePath
);
//就是如APGIS.Tools.exe 执行文件是在那个文件夹下。
startProc
.
Start
();
}
}
}
Project.FLY.Thick.Base/FLY.Thick.Base.UI/FLY.Thick.Base.UI.csproj
View file @
7d29227d
...
@@ -123,6 +123,7 @@
...
@@ -123,6 +123,7 @@
<Compile
Include=
"CtMicroGage\CtMircoGageVmUt.cs"
/>
<Compile
Include=
"CtMicroGage\CtMircoGageVmUt.cs"
/>
<Compile
Include=
"CustomMenu\AdrMenu.cs"
/>
<Compile
Include=
"CustomMenu\AdrMenu.cs"
/>
<Compile
Include=
"CustomMenu\CustomMenu.cs"
/>
<Compile
Include=
"CustomMenu\CustomMenu.cs"
/>
<Compile
Include=
"CustomMenu\UpdateMenu.cs"
/>
<Compile
Include=
"CustomMenu\WarningMenu.cs"
/>
<Compile
Include=
"CustomMenu\WarningMenu.cs"
/>
<Compile
Include=
"CustomMenu\PwMenu.cs"
/>
<Compile
Include=
"CustomMenu\PwMenu.cs"
/>
<Compile
Include=
"CustomSection\UcSectionScanGraph.xaml.cs"
>
<Compile
Include=
"CustomSection\UcSectionScanGraph.xaml.cs"
>
...
...
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