Пример #1
0
 /// <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);
     }
 }
Пример #2
0
        /// <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;
            }
        }
Пример #3
0
 /// <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);
     }
 }
Пример #4
0
        /// <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;
            }
        }