コード例 #1
0
        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);
        }
コード例 #2
0
 public void GroupCard(Menu_Sort_Box key, Card c)
 {
     Group_List.Add(key, c);
     c.SortToGroup(key);
 }
コード例 #3
0
 public void GroupCard(String key, Card c)
 {
     Group_List.Add(key, c);
     c.SortToGroup(key);
 }
コード例 #4
0
 public void GroupCard(Menu_Sort_Box key, Card c)
 {
     Group_List.Add(key, c);
     c.SortToGroup(key);
 }