public override void TerminateGesture(object sender, Gesture_Event_Args gEventArgs) { Card c = gEventArgs.GestureObjects[0] as Card; Menu_Sort_Box b = gEventArgs.GestureObjects[1] as Menu_Sort_Box; if (!gestureControler.Control.MainWindow.MenuLayer.IsButtonInOriginPos(b)) { c.SortToGroup(b); Group_List.Add(b, c); My_Point point = gEventArgs.GesturePoints[0]; Vector v = new Vector(c.PreviousPostion.X - c.CurrentPosition.X, c.PreviousPostion.Y - c.CurrentPosition.Y); v.Normalize(); c.MoveCard(v.X * 150, v.Y * 150, 0.5); } if (Group_List.CardGroups.ContainsKey(b)) { Card[] cards = Group_List.CardGroups[b].ToArray(); foreach (Card cc in cards) { cc.Dehightlight(); } } base.TerminateGesture(sender, gEventArgs); }
public void GroupCard(Menu_Sort_Box key, Card c) { Group_List.Add(key, c); c.SortToGroup(key); }