public void OnComponentModified(ComponentModifiedArgs evnt)
 {
     ComponentModifiedArgs.Types type = evnt.Type;
     if (type == ComponentModifiedArgs.Types.PortsChanged)
     {
         this.UpdatePorts(Component.PortArgs);
     }
 }
Beispiel #2
0
        protected void DispatchModifiedEvent(ComponentModifiedArgs.Types type)
        {
            ComponentModifiedArgs evnt = null;

            foreach (ComponentInstance i in instances.Keys)
            {
                if (evnt == null)
                {
                    evnt = new ComponentModifiedArgs(type);
                }
                i.OnComponentModified(evnt);
            }
            EventHandler <ComponentModifiedArgs> handler = ComponentModifiedEvent;

            if (handler != null)
            {
                if (evnt == null)
                {
                    evnt = new ComponentModifiedArgs(type);
                }
                handler(this, evnt);
            }
        }