Example #1
0
        public static AbstractItem GetItem(string type)
        {
            AbstractItem item = null;

            if (type.Equals("Campus"))
            {
                item = new Campus();
            }
            else if (type.Equals("Category"))
            {
                item = new Category();
            }
            else if (type.Equals("Comment"))
            {
                item = new Comment();
            }
            else if (type.Equals("LostItem"))
            {
                item = new LostAndFoundItem();
            }
            return(item);
        }
 public abstract void Remove(AbstractItem file);
 public abstract void Add(AbstractItem file);
Example #4
0
 public override void Remove(AbstractItem item)
 {
     Console.WriteLine("对不起,不支持该方法!");
 }
 public override void Remove(AbstractItem item)
 {
     itemList.Remove(item);
 }
 public override void Add(AbstractItem item)
 {
     itemList.Add(item);
 }
Example #7
0
 public override void Remove(AbstractItem item)
 {
     categoryList.Remove(item);
 }
Example #8
0
 public override void Add(AbstractItem item)
 {
     categoryList.Add(item);
 }
Example #9
0
 public override void Remove(AbstractItem item)
 {
     commentList.Remove(item);
 }
Example #10
0
 public override void Add(AbstractItem item)
 {
     commentList.Add(item);
 }