Example #1
0
 public bool AddGroup(int groupIndex)
 {
     for (int i = 0; i < AllowedGroupsIDs.Count; i++)
     {
         if (AllowedGroupsIDs[i] == groupIndex)
         {
             return(false);
         }
     }
     AllowedGroupsIDs.Add(groupIndex);
     return(true);
 }
Example #2
0
        public bool RemoveGroup(int groupIndex)
        {
            bool result = false;

            for (int i = 0; i < AllowedGroupsIDs.Count; i++)
            {
                if (AllowedGroupsIDs[i] == groupIndex)
                {
                    AllowedGroupsIDs.RemoveAt(i);
                    i--;
                    result = true;
                }
            }
            return(result);
        }