Ejemplo n.º 1
0
 /// <summary>
 /// Fires when the agent has been checked.
 /// </summary>
 /// <param name="e"> The processes. </param>
 protected virtual void FireOnIsChecked(ProcessContainerVMEventArgs e)
 {
     if (this.OnChecked != null)
     {
         this.OnChecked(this, e);
     }
 }
        /// <summary>
        /// This method gets the current processes from the checked agent.
        /// </summary>
        /// <param name="sender"> The object sender. </param>
        /// <param name="e"> The processes. </param>
        private void GetCurrentProcesses(object sender, ProcessContainerVMEventArgs e)
        {
            this.current.Invoke(new Action(() => { this.ClonedCurrentProcessesFromCheckedAgent.Clear(); }));

            if (e.Current.Count > 0)
            {
                foreach (var item in e.Current)
                {
                    this.current.Invoke(new Action(() => { this.ClonedCurrentProcessesFromCheckedAgent.Add(item); }));
                }
            }

            this.SearchForProcess();
        }