diff --git a/src/AllClassAndInterfaceWellBeManipulatedInThisFileAndCallThroughFunction.cs b/src/AllClassAndInterfaceWellBeManipulatedInThisFileAndCallThroughFunction.cs index f85f544..93e7333 100644 --- a/src/AllClassAndInterfaceWellBeManipulatedInThisFileAndCallThroughFunction.cs +++ b/src/AllClassAndInterfaceWellBeManipulatedInThisFileAndCallThroughFunction.cs @@ -56,10 +56,17 @@ namespace WpfApp2.tools { scnjson.StopTrans(spa, dps); } + + public void StartTranslateJsonToScn(string spaJson,string spaGame, string dpsScn)//写文件夹路径 + { + scnjson.JsonToScn(spaJson, spaGame, dpsScn); + } + public string NetBaiDu(string input) { return jsonnet.RequestJsonBaiDu(input); } + public string NetBaiDu(string input, List list) { return jsonnet.RequestJsonBaiDu(input, list); diff --git a/src/ScnToJson/TranslationScnToJson.cs b/src/ScnToJson/TranslationScnToJson.cs index d16e562..913a286 100644 --- a/src/ScnToJson/TranslationScnToJson.cs +++ b/src/ScnToJson/TranslationScnToJson.cs @@ -34,7 +34,7 @@ namespace WpfApp2.ScnToJson public void DirExsis(string id) { - if(!Directory.Exists(Directory.GetCurrentDirectory() + "\\" + id)) + if (Directory.Exists(Directory.GetCurrentDirectory() + "\\" + id)) { Directory.CreateDirectory(Directory.GetCurrentDirectory() + "\\" + id); } @@ -59,6 +59,25 @@ namespace WpfApp2.ScnToJson p.Close(); } + public void JsonToScn(string srcgame, string srcjson, string dstgame) + { + string temp = ".\\VNTextPatch insertlocal " + srcgame + " " + srcjson + " " + dstgame; + + var p = new Process + { + StartInfo = + { + FileName = "PowerShell.exe", + Arguments = "/c " + cmdHandle + "\n" + temp, + UseShellExecute = false, + CreateNoWindow = false, + } + }; + + p.Start(); + p.WaitForExit(); + p.Close(); + }