コード例 #1
0
        /// <summary>
        /// Based on the user, create a sorting box.
        /// </summary>
        /// <param name="name"></param>
        /// <param name="user"></param>
        public SortingBox CreateSortingBox(User user, string name)
        {
            SortingBox box = list.AddBox(user, name, this);

            controllers.SortingBoxLayerController.LoadBoxes(new SortingBox[] { box });
            return(box);
        }
コード例 #2
0
 /// <summary>
 /// Delete a sorting box
 /// </summary>
 /// <param name="box"></param>
 internal void RemoveSortingBox(SortingBox box)
 {
     if (list.ContainsKey(box.SortingBoxID))
     {
         box.Clear();
         list.Remove(box.SortingBoxID);
     }
 }
コード例 #3
0
        /// <summary>
        /// Add a sorting box to the list. Return the added box
        /// </summary>
        /// <param name="name"></param>
        internal SortingBox AddBox(User user, string name, SortingBoxController controller)
        {
            string     sortingBoxID = Guid.NewGuid().ToString();
            SortingBox box          = new SortingBox(controller);

            box.Init(sortingBoxID, name, user);
            list.Add(sortingBoxID, box);
            return(box);
        }
コード例 #4
0
 bool ContainCard(SortingBox box, Card card)
 {
     foreach (Card cd in box.CardList)
     {
         if (card.CardID == cd.CardID)
         {
             return(true);
         }
     }
     return(false);
 }
コード例 #5
0
 /// <summary>
 /// Get all cards in a sorting box
 /// </summary>
 /// <param name="box"></param>
 /// <returns></returns>
 internal List <Card> GetCardsBySortingBox(SortingBox box)
 {
     return(box.CardList);
 }
コード例 #6
0
 /// <summary>
 /// Add a card to the sortingbox
 /// </summary>
 /// <param name="card"></param>
 /// <param name="box"></param>
 public void AddCardToSortingBox(Card card, SortingBox box)
 {
     box.AddCard(card);
 }
コード例 #7
0
 /// <summary>
 /// Update the ZIndex of the card. Move the card to the top.
 /// </summary>
 /// <param name="card"></param>
 internal void MoveSortingBoxToTop(SortingBox box)
 {
     controllers.SortingBoxLayerController.MoveSortingBoxToTop(box);
 }
コード例 #8
0
 /// <summary>
 /// Update the touch point
 /// </summary>
 /// <param name="localPoint"></param>
 /// <param name="globalPoint"></param>
 /// <param name="box"></param>
 /// <param name="type"></param>
 internal void PointerDown(PointerPoint localPoint, PointerPoint globalPoint, SortingBox box, Type type)
 {
     controllers.TouchController.TouchDown(localPoint, globalPoint, box, type);
 }
コード例 #9
0
 /// <summary>
 /// Delete a sorting box. Remove it both from the sorting box list and the sorting box layer.
 /// </summary>
 /// <param name="box"></param>
 internal void DestroyBox(SortingBox box)
 {
     list.RemoveSortingBox(box);
     controllers.SortingBoxLayerController.RemoveSortingBox(box);
 }