Пример #1
0
 /// <summary>
 /// 添加子组
 /// </summary>
 /// <param name="group">要添加的子组</param>
 /// <returns></returns>
 public bool AddChildGroup( Group group )
 {
     if (groups.ContainsKey( group.name ))
     {
         Log.Write( "在添加子组时,存在相同的子组名" + name + ", " + group.name );
         return false;
     }
     else
     {
         groups.Add( group.name, group );
         group.father = this;
         return true;
     }
 }
Пример #2
0
 /// <summary>
 /// 删除子组
 /// </summary>
 /// <param name="group">要删除的子组</param>
 /// <returns></returns>
 public bool DelChildGroup( Group group )
 {
     if (groups.ContainsKey( group.name ) && groups[group.name] == group)
     {
         groups.Remove( group.name );
         group.father = null;
         return true;
     }
     else
     {
         Log.Write( "删除子组时,未找到相符子组" + name + ", " + group.name );
         return false;
     }
 }