/// <summary> /// Raises an event to indicate the agent is deactivated /// </summary> /// <param name="e">event args</param> protected void notifyAgentClose(AgentCloseEventArgs e) { if (EvtAgentClose != null) { EvtAgentClose(this, e); } }
/// <summary> /// Handler for when an agents exits. /// </summary> /// <param name="sender">event sender</param> /// <param name="e">event args</param> private void agent_EvtAgentClose(object sender, AgentCloseEventArgs e) { if (sender is IApplicationAgent) { var agent = (IApplicationAgent)sender; if (agent.Parent == null) { return; } IApplicationAgent parent = agent.Parent; setAgent(parent); parent.OnResume(); agent.Parent = null; } }