public void RemoveType(enumDroptype ty)
 {
     if (dropType != null)
     {
         int i;
         for (i = 0; i < dropType.Length; i++)
         {
             if (dropType[i] == ty)
             {
                 if (ty == enumDroptype.OBJECT)
                 {
                     performerTypes = null;
                 }
                 if (dropType.Length == 1)
                 {
                     dropType = null;
                 }
                 else
                 {
                     enumDroptype[] a = new enumDroptype[dropType.Length - 1];
                     for (int j = 0; j < dropType.Length; j++)
                     {
                         if (j < i)
                         {
                             a[j] = dropType[j];
                         }
                         else if (j > i)
                         {
                             a[j - 1] = dropType[j];
                         }
                     }
                     dropType = a;
                 }
                 return;
             }
         }
     }
 }
 public bool AddType(DropType ty)
 {
     if (dropType == null)
     {
         dropType    = new enumDroptype[1];
         dropType[0] = ty.droptype;
         if (ty.droptype == enumDroptype.OBJECT)
         {
             DropTypeObject p = ty as DropTypeObject;
             if (p != null)
             {
                 if (performerTypes == null)
                 {
                     performerTypes = new ObjectTypes();
                 }
                 performerTypes.AddType(p.ObjectType);
             }
         }
         return(true);
     }
     else
     {
         int i;
         for (i = 0; i < dropType.Length; i++)
         {
             if (dropType[i] == ty.droptype)
             {
                 if (ty.droptype == enumDroptype.OBJECT)
                 {
                     DropTypeObject p = ty as DropTypeObject;
                     if (p != null)
                     {
                         return(performerTypes.AddType(p.ObjectType));
                     }
                     return(false);
                 }
                 else
                 {
                     return(false);
                 }
             }
         }
         enumDroptype[] a = new enumDroptype[dropType.Length + 1];
         for (i = 0; i < dropType.Length; i++)
         {
             a[i] = dropType[i];
         }
         a[dropType.Length] = ty.droptype;
         dropType           = a;
         if (ty.droptype == enumDroptype.OBJECT)
         {
             DropTypeObject p = ty as DropTypeObject;
             if (p != null)
             {
                 if (performerTypes == null)
                 {
                     performerTypes = new ObjectTypes();
                 }
                 performerTypes.AddType(p.ObjectType);
             }
         }
         return(true);
     }
 }