Ejemplo n.º 1
0
 /// <summary>
 /// Add JumpList items for this category
 /// </summary>
 /// <param name="items">The items to add to the JumpList.</param>
 public void AddJumpListItems(params IJumpListItem[] items)
 {
     foreach (IJumpListItem item in items)
     {
         JumpListItems.Add(item);
     }
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Add a JumpList item to the bottom of the category. If the category is already full,
        /// the item will not be added.
        /// </summary>
        /// <param name="item">The item to add to the JumpList.</param>
        /// <returns>true if the item was added successfully, false otherwise.</returns>
        public bool AddJumpListItem(IJumpListItem item)
        {
            // If the item is already on the jumplist, remove it first.
            RemoveJumpListItem(item.Path);

            if (MaxItems > 0 && JumpListItems.Count >= MaxItems)
            {
                return(false);
            }

            JumpListItems.Add(item);
            return(true);
        }