Beispiel #1
0
 // Token: 0x06001F20 RID: 7968 RVA: 0x000B2E3C File Offset: 0x000B103C
 internal static void ModifyCategories(Item item, string[] addCategories, string[] removeCategories)
 {
     if (removeCategories != null)
     {
         for (int i = 0; i < removeCategories.Length; i++)
         {
             item.Categories.Remove(removeCategories[i]);
         }
     }
     if (addCategories != null)
     {
         for (int j = 0; j < addCategories.Length; j++)
         {
             if (!item.Categories.Contains(addCategories[j]))
             {
                 item.Categories.Add(addCategories[j]);
             }
         }
     }
     if (item.Categories.Count == 0)
     {
         CategoryContextMenu.ClearCategories(item);
     }
 }