/// <summary> /// called from event action list, not from a custom method. /// called only between event actions /// </summary> /// <param name="objectKey"></param> /// <param name="eventName"></param> /// <param name="taskId"></param> /// <param name="executer"></param> public void BeforeExecuteEventAction(string objectKey, string eventName, int actionIndex, object executer) { if (_ComponentDebugger.Stopping) { return; } _ComponentDebugger.ClearBreakpointDisplay(); EventAction ea = _ComponentDebugger.RootClass.GetEventHandler(eventName, objectKey); if (ea != null) { int threadId = System.Threading.Thread.CurrentThread.ManagedThreadId; if (actionIndex > 0) { //check the action just finished is an custom method or not if (!ea.TaskIDList[actionIndex - 1].IsEmbedded) { IAction a = _ComponentDebugger.RootClass.GetActionInstance(ea.TaskIDList[actionIndex - 1].ActionId); if (a != null) { CustomMethodPointer cmp = a.ActionMethod as CustomMethodPointer; if (cmp != null) { MethodDesignerHolder h = _ComponentDebugger.GetViewer(threadId, cmp.MethodDef.MethodID); if (h != null) { h.ActionGroup.GroupFinished = true; _ComponentDebugger.UpdateViewersBackColor(); } } } } } EnumRunStatus status = _ComponentDebugger.GetRunStatus(threadId); if ((status != EnumRunStatus.Stop && status != EnumRunStatus.Run) || ea.TaskIDList[actionIndex].BreakAsEventAction) { _ComponentDebugger.SetSelectedObject(executer); _ComponentDebugger.SetAtBreak(threadId, true); _debugUI.ShowBreakPoint(_ComponentDebugger); _ComponentDebugger.ShowEventBreakPointInTreeView(objectKey, eventName, executer, actionIndex); waitForBreakPoint(threadId); } } }