示例#1
0
 public static void SetDynamicEventHandlerLineColor(PortCollection pc)
 {
     foreach (LinkLineNodePort p in pc)
     {
         LinkLineNodeInPort ip = p as LinkLineNodeInPort;
         if (ip != null)
         {
             ComponentIconEventhandle ieh = ip.PortOwner as ComponentIconEventhandle;
             if (ieh != null)
             {
                 EventHandlerMethod ehm = ieh.Method as EventHandlerMethod;
                 if (ehm != null)
                 {
                     UInt32 actId = ehm.GetDynamicActionId();
                     if (actId != 0)
                     {
                         ip.SetLineColor(Color.Yellow);
                     }
                 }
             }
         }
         else
         {
             EventPortOutExecuteMethod op = p as EventPortOutExecuteMethod;
             if (op != null)
             {
                 EventHandlerMethod ehm = op.Method as EventHandlerMethod;
                 if (ehm != null)
                 {
                     UInt32 actId = ehm.GetDynamicActionId();
                     if (actId != 0)
                     {
                         op.SetLineColor(Color.Yellow);
                     }
                 }
             }
         }
     }
 }