diff --git a/src/ScnToJson/TranslationScnToJson.cs b/src/ScnToJson/TranslationScnToJson.cs index 63dc36e..c5f91a7 100644 --- a/src/ScnToJson/TranslationScnToJson.cs +++ b/src/ScnToJson/TranslationScnToJson.cs @@ -1,27 +1,33 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; -using System.Printing; -using System.Text; -using System.Threading.Tasks; +using System.Diagnostics; namespace WpfApp1.ScnToJson { internal class TranslationScnToJson { - private String spath;//scn路径 - private String dpath;//json路径 - private String cmdHandle = "cd ";//cmd命令字符串 + private string spath;//scn路径 + private string dpath;//json路径 + private string cmdHandle = "cd E:\\programingg\\vsprogam\\testRjgc\\VNT\\VNTextPatch";//cmd命令字符串 + private string voice = ".\\VNTextPatch extractlocal E:\\programingg\\vsprogam\\testRjgc\\VNT\\p1 E:\\programingg\\vsprogam\\testRjgc\\VNT\\p2";//VNTextPatch extractlocal - var p = new Process + public void StartTrans() { - StartInfo = + var p = new Process { - FileName = "cmd.exe", - WorkingDirectory = @"/c " + this.cmdHandle, - } - }; + StartInfo = + { + FileName = "PowerShell.exe", + Arguments = "/c " + cmdHandle + "\n" + voice, + UseShellExecute = false, + CreateNoWindow = false, + } + }; + p.Start(); + p.WaitForExit(); + p.Close(); + + } + + }