public static Gesture_Event_Copying Detect(List<My_Point> points, Gesture_Controler controler)
 {
     List<My_Point> result = new List<My_Point>();
     foreach (My_Point point in points)
     {
         if (point.Sender is Copy_Icon)
         {
             result.Add(point);
             Card card = (point.Sender as Copy_Icon).Card;
             My_Point[] argPoints = result.ToArray();
             object[] objects = new object[2];
             objects[0] = card;
             Gesture_Event_Copying copyEvent = new Gesture_Event_Copying();
             copyEvent.Points = argPoints;
             Gesture_List.addGesture(copyEvent);
             Gesture_Copying_Listener gestureLinkingListener = new Gesture_Copying_Listener(controler, copyEvent);
             copyEvent.Register(objects, argPoints);
             foreach (My_Point p in result)
             {
                 controler.NewGesturePoints.Remove(p);
             }
             return copyEvent;
         }
     }
     return null;
 }
Exemple #2
0
        public static Gesture_Event_Copying Detect(List <My_Point> points, Gesture_Controler controler)
        {
            List <My_Point> result = new List <My_Point>();

            foreach (My_Point point in points)
            {
                if (point.Sender is Copy_Icon)
                {
                    result.Add(point);
                    Card       card      = (point.Sender as Copy_Icon).Card;
                    My_Point[] argPoints = result.ToArray();
                    object[]   objects   = new object[2];
                    objects[0] = card;
                    Gesture_Event_Copying copyEvent = new Gesture_Event_Copying();
                    copyEvent.Points = argPoints;
                    Gesture_List.addGesture(copyEvent);
                    Gesture_Copying_Listener gestureLinkingListener = new Gesture_Copying_Listener(controler, copyEvent);
                    copyEvent.Register(objects, argPoints);
                    foreach (My_Point p in result)
                    {
                        controler.NewGesturePoints.Remove(p);
                    }
                    return(copyEvent);
                }
            }
            return(null);
        }
 public Gesture_Copying_Listener(Gesture_Controler gestureControler, Gesture_Event_Copying gestureEvent)
     : base(gestureControler, gestureEvent)
 {
 }
 public Gesture_Copying_Listener(Gesture_Controler gestureControler, Gesture_Event_Copying gestureEvent)
     : base(gestureControler, gestureEvent)
 {
 }