private void ActionCommandScript(Action <ScriptEngine.Status, int> actionScriptCommand) { while (this.engineStatus == ScriptEngine.Status.NONE) { ScriptCommandData scriptCommandData = this.allCommandList[this.stepAddress]; string[] commandParams = ScriptUtil.SplitByWhiteSpace(scriptCommandData.strArrange); this.AnalyzeCommand(commandParams); this.commandAddress = scriptCommandData.lineNum; this.stepAddress++; } if (actionScriptCommand != null) { actionScriptCommand(this.engineStatus, this.commandAddress); } if (this.allCommandList.Count <= this.stepAddress) { this.engineStatus = ScriptEngine.Status.EOF; } else { this.engineStatus = ScriptEngine.Status.NONE; } }