| | |
| | | Process p = null; |
| | | try |
| | | { |
| | | //string log = Path.Combine(ExportUtil.SourcesPath, "ns_log.txt"); |
| | | //string args = string.Format("-licensing AdLM -OpenFile \"{0}\" -ExecuteAddInPlugin \"EngineBatch_Sample.SmartEarth\" \"{1}\" -log \"{2}\" -NoGui -Exit", modelFile, configFile, log); |
| | | //string args = string.Format("-licensing AdLM -OpenFile \"{0}\" -ExecuteAddInPlugin \"EngineBatch_Sample.SmartEarth\" \"{1}\" -log \"{2}\" -NoGui -Exit", modelFile, configFile, Path.Combine(ExportUtil.SourcesPath, "ns_log.txt")); |
| | | string args = string.Format("-licensing AdLM -OpenFile \"{0}\" -ExecuteAddInPlugin \"EngineBatch_Sample.SmartEarth\" \"{1}\" -NoGui -Exit", modelFile, configFile); |
| | | LogOut.Info("Args:" + args); |
| | | |
| | |
| | | task.pid = p.Id; |
| | | task.id = TaskDBHelper.Insert(task); |
| | | |
| | | // 让组件等候相关的进程进入闲置状态 |
| | | p.WaitForInputIdle(); |
| | | |
| | | // 让组件无限期地等待关联进程退出 |
| | | p.WaitForExit(); |
| | | p.WaitForInputIdle(); // 让组件等候相关的进程进入闲置状态 |
| | | p.WaitForExit(); // 让组件无限期地等待关联进程退出 |
| | | |
| | | task = TaskDBHelper.SelectById(task.id); |
| | | if (null != task && task.status < 2) |