Skip to content

Commit

Permalink
Merge pull request #28 from ruchuby/develop
Browse files Browse the repository at this point in the history
Starter v0.4.1
  • Loading branch information
AkiChase authored Apr 11, 2023
2 parents 47d8751 + 07595a2 commit a5e62b5
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/Gui/AboutGui.ah2
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
* @Version: 0.0.3
* @Author: ruchuby
* @LastEditors: ruchuby
* @LastEditTime: 2023-04-06
* @LastEditTime: 2023-04-11
* @Description: 关于界面显示版本信息、项目主页、检查更新
*/
class AboutGui {
static version := "0.4.0"
static version := "0.4.1"
; static gui:=unset

static init() {
Expand Down
2 changes: 2 additions & 0 deletions src/Gui/BootGui.ah2
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,12 @@ class BootGui {
this.menu.Add("添加`t(&A)", (*) => this.choseAddItem())
this.menu.Add("刷新`t(&R)", (*) => this.loadItems())
this.menu.Add("删除`t(&X)", (*) => this.delItem(this.menuRow))
this.menu.Add("目录`t(&X)", (*) => Run(GlobalData.bootDir))

this.menu.SetIcon("1&", GlobalData.imgDir "\add.ico")
this.menu.SetIcon("2&", GlobalData.imgDir "\reload.ico")
this.menu.SetIcon("3&", GlobalData.imgDir "\delete.ico")
this.menu.SetIcon("4&", GlobalData.imgDir "\folder.ico")
}

static showGui() {
Expand Down
11 changes: 8 additions & 3 deletions src/Gui/TrayMenu.ah2
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @Version: 0.0.2
* @Author: ruchuby
* @LastEditors: ruchuby
* @LastEditTime: 2023-04-06
* @LastEditTime: 2023-04-11
* @Description: 菜单栏
*/

Expand Down Expand Up @@ -72,7 +72,7 @@ class TrayMenu {

checkboxList := [
g.AddCheckbox("x75 yp+30 Checked", "用户数据"),
g.AddCheckbox("xp+150 yp Checked", "插件"),
g.AddCheckbox("xp+150 yp", "插件"),
]

options() {
Expand Down Expand Up @@ -132,6 +132,10 @@ class TrayMenu {
return
}

if (!options[2] || MsgBox("导入插件时将用导入的数据覆盖所有同名文件,`n请勿在更新导入旧数据时使用, 避免旧版本插件覆盖新版本插件`n是否继续导入?", "提示", 0x2044) != "Yes") {
return
}

tmpDir := A_Temp "\" A_TickCount "_starter"
this.zipper.Extract(path, tmpDir, , "-aoa")

Expand All @@ -141,8 +145,9 @@ class TrayMenu {
DirCopy(dir, GlobalData.dataDir, true), res .= "用户数据导入成功`n"
}
if (options[2]) {
if (FileExist(dir := tmpDir "\Plugin"))
if (FileExist(dir := tmpDir "\Plugin")){
DirCopy(dir, GlobalData.pluginDir, true), res .= "插件导入成功`n"
}
}
DirDelete(tmpDir, true)
if (StrLen(res)) {
Expand Down

0 comments on commit a5e62b5

Please sign in to comment.