示例#1
0
        /// <summary>
        /// Adds a collection of custom categories to the Taskbar jump list.
        /// </summary>
        /// <param name="customCategories">The catagories to add to the jump list.</param>
        public void AddCustomCategories(params JumpListCustomCategory[] customCategories)
        {
            lock (syncLock)

                if (customCategoriesCollection == null)
                {
                    customCategoriesCollection = new JumpListCustomCategoryCollection();
                }

            if (customCategories != null)
            {
                foreach (JumpListCustomCategory category in customCategories)
                {
                    customCategoriesCollection.Add(category);
                }
            }
        }
示例#2
0
        /// <summary>
        /// Adds a collection of custom categories to the Taskbar jump list.
        /// </summary>
        /// <param name="customCategories">The catagories to add to the jump list.</param>
        public void AddCustomCategories(params JumpListCustomCategory[] customCategories)
        {
            if (customCategoriesCollection == null)
            {
                // Make sure that we don't create multiple instances
                // of this object
                lock (syncLock)
                {
                    if (customCategoriesCollection == null)
                    {
                        customCategoriesCollection = new JumpListCustomCategoryCollection();
                    }
                }
            }

            foreach (JumpListCustomCategory category in customCategories)
            {
                customCategoriesCollection.Add(category);
            }
        }