Example #1
0
 private static bool EffectiveDropRegion(Rectangle rect, DropRegion dr)
 {
     switch (dr.DropType)
     {
         case DropType.Above:
             if (rect.BottomSlice(5).IntersectsWith(dr.Rectangle))
             {
                 return true;
             }
             break;
         case DropType.Below:
         case DropType.Between:
             if (rect.TopSlice(5).IntersectsWith(dr.Rectangle))
             {
                 return true; ;
             }
             break;
         case DropType.AsArgument:
             if (rect.IntersectsWith(dr.Rectangle))
             {
                 return true; ;
             }
             break;
     }
     return false;
 }