Esempio n. 1
0
 protected override void filterForConnection(CanvasNode node, connectionRule rule)
 {
     foreach (CanvasNode gn in mNodes)
     {
         Type gnType = gn.GetType();
         if (!rule.isValidType(gnType))
         {
             if (!(gn is ConnectionPoint))
             {
                 gn.IsVisible = true;
             }
             else
             {
                 gn.IsVisible = false;
             }
             gn.IsEnabled = false;
         }
         else
         {
               ConnectionPoint cp = node as ConnectionPoint;
               ConnectionPoint cpg = gn as ConnectionPoint;
               if (cp.OwnerNode == cpg.OwnerNode ||
                   cp.ParamType.Type != cpg.ParamType.Type)
               {
                   gn.IsVisible = false;
                   gn.IsEnabled = false;
               }
         }
     }
 }