public static Gesture_Event_Collaborative_Zoon Detect(List<My_Point> points, Gesture_Controler controler) { List<My_Point> result = new List<My_Point>(); Gesture_Event_Collaborative_Zoon colZoonEvent = null; foreach (My_Point p in points) { if (p.Sender is News_Card) { if (STATICS.COLLABORATIVE_ZOON.Contains((int)p.CurrentPoint.Position.X, (int)p.CurrentPoint.Position.Y)) { result.Add(p); My_Point[] argPoints = result.ToArray(); object[] objects = new object[1]; objects[0] = p.Sender; colZoonEvent = new Gesture_Event_Collaborative_Zoon(); colZoonEvent.Points = argPoints; Gesture_List.addGesture(colZoonEvent); Gesture_Collaborative_Zoon_Listener gestureListener = new Gesture_Collaborative_Zoon_Listener(controler, colZoonEvent); colZoonEvent.Register(objects, argPoints); foreach (My_Point p2 in result) { points.Remove(p2); } return colZoonEvent; } } } return null; }
public static Gesture_Event_Collaborative_Zoon Detect(List <My_Point> points, Gesture_Controler controler) { List <My_Point> result = new List <My_Point>(); Gesture_Event_Collaborative_Zoon colZoonEvent = null; foreach (My_Point p in points) { if (p.Sender is News_Card) { if (STATICS.COLLABORATIVE_ZOON.Contains((int)p.CurrentPoint.Position.X, (int)p.CurrentPoint.Position.Y)) { result.Add(p); My_Point[] argPoints = result.ToArray(); object[] objects = new object[1]; objects[0] = p.Sender; colZoonEvent = new Gesture_Event_Collaborative_Zoon(); colZoonEvent.Points = argPoints; Gesture_List.addGesture(colZoonEvent); Gesture_Collaborative_Zoon_Listener gestureListener = new Gesture_Collaborative_Zoon_Listener(controler, colZoonEvent); colZoonEvent.Register(objects, argPoints); foreach (My_Point p2 in result) { points.Remove(p2); } return(colZoonEvent); } } } return(null); }
private void detectGesture() { if (newGesturePoints.Count > 0) { // the code that you want to measure comes here Gesture_Event_Linking.Detect(newGesturePoints, this); //Gesture_Event_Copying.Detect(newGesturePoints, this); Gesture_Event_Sorting.Detect(newGesturePoints, this); //Gesture_Event_Emphasizing.Detect(newGesturePoints, this); //Gesture_Event_Grouping.Detect(newGesturePoints,this); //Gesture_Event_Sorting_Group.Detect(newGesturePoints, this); Gesture_Event_Showing.Detect(newGesturePoints, this); Gesture_Event_Showing_Sorting.Detect(newGesturePoints, this); Gesture_Event_Cutting_Sorting.Detect(newGesturePoints, this); Gesture_Event_Cutting_Link.Detect(newGesturePoints, this); Gesture_Event_Deleting_Bin.Detect(newGesturePoints, this); Gesture_Event_Collaborative_Zoon.Detect(newGesturePoints, this); } }
public Gesture_Collaborative_Zoon_Listener(Gesture_Controler gestureControler, Gesture_Event_Collaborative_Zoon gestureEvent) : base(gestureControler, gestureEvent) { }