Skip to content

Commit 35ca073

Browse files
committed
2.6.1 menu汉化
...
1 parent 8d7265e commit 35ca073

File tree

4 files changed

+288
-58347
lines changed

4 files changed

+288
-58347
lines changed

OnekeyUIApp/OnekeyUIApp/Form1.cs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,21 @@ private void button1_Click(object sender, EventArgs e)
4242
System.Threading.Thread.Sleep(1000);
4343
string targetPath = ProcessPath("GitHubDesktop").Replace("GitHubDesktop.exe", "") + "resources\\app\\";
4444
label1.Text = targetPath;
45+
4546
{//先将原文件备份
4647
Backup(targetPath + "main.js", Environment.CurrentDirectory + "\\备份\\main.js", Environment.CurrentDirectory + "\\备份");
4748
Backup(targetPath + "renderer.js", Environment.CurrentDirectory + "\\备份\\renderer.js", Environment.CurrentDirectory + "\\备份");
4849
}
4950
{//汉化文件替换原文件
50-
File.Copy("Resources\\main.js", targetPath + "main.js", true);
51-
File.Copy("Resources\\renderer.js", targetPath + "renderer.js", true);
51+
if (File.Exists("Resources\\main.js"))
52+
{
53+
File.Copy("Resources\\main.js", targetPath + "main.js", true);
54+
55+
}
56+
if (File.Exists("Resources\\renderer.js"))
57+
{
58+
File.Copy("Resources\\renderer.js", targetPath + "renderer.js", true);
59+
}
5260
}
5361

5462
KillProcess("GitHubDesktop");

0 commit comments

Comments
 (0)