private void WirteTempFileAndRun(string varStr) { string tempPath = Directory.GetCurrentDirectory() + "/config/temp.bat"; File.WriteAllText(tempPath, varStr, Encoding.GetEncoding("gbk")); Tool.RunCmd(tempPath); }
private void RunWindow(uint varNum) { if (string.IsNullOrEmpty(mPCFolder.Text)) { MessageBox.Show("PC项目路径不能为空", "警告", MessageBoxButtons.OK); return; } string tempPath = @"\Windows\game.exe"; tempPath = mPCFolder.Text + tempPath; for (uint i = 0; i < varNum; i++) { Tool.RunCmd(tempPath); } }