示例#1
0
        public Catelog Remove(int index)
        {
            Catelog obj = CatelogCollection[index];

            CatelogCollection.Remove(obj);
            return(obj);
        }
示例#2
0
        static public Item getTheFirstItem(Catelog catelog)
        {
            IEnumerator list = catelog.GetEnumerator();

            if (list.MoveNext())
            {
                return((Item)list.Current);
            }
            return(null);
        }
示例#3
0
        static public Item getTheFirstItem(Config config)
        {
            Catelog catelog = getTheFirstCatelog(config);

            if (catelog != null)
            {
                return(getTheFirstItem(catelog));
            }
            else
            {
                return(null);
            }
        }
示例#4
0
        static public Item getItemByName(Catelog catelog, string name)
        {
            IEnumerator list = catelog.GetEnumerator();

            while (list.MoveNext())
            {
                Item it = (Item)list.Current;
                if (it.name.Equals(name))
                {
                    return(it);
                }
            }

            return(null);
        }
示例#5
0
        static public Catelog getCatelogByName(Config config, string name)
        {
            IEnumerator list = config.GetEnumerator();

            while (list.MoveNext())
            {
                Catelog it = (Catelog)list.Current;
                if (it.name.Equals(name))
                {
                    return(it);
                }
            }

            return(null);
        }
示例#6
0
        static public void print(Catelog it)
        {
            Console.Write("\t<Catelog");
            Console.Write(" name=" + it.name);
            Console.Write(" type=" + it.type);
            Console.Write(" note=" + it.note);
            Console.WriteLine(">");

            IEnumerator list = it.GetEnumerator();

            while (list.MoveNext())
            {
                print((Item)list.Current);
            }

            Console.WriteLine("\t<\\Catelog>");
        }
示例#7
0
 public void Remove(Catelog obj)
 {
     base.Remove(obj);
 }
示例#8
0
 public void Insert(int index, Catelog obj)
 {
     base.Insert(index, obj);
 }
示例#9
0
 public Catelog Add(Catelog obj)
 {
     base.Add(obj);
     return(obj);
 }
示例#10
0
 public Catelog Add(Catelog obj)
 {
     return(CatelogCollection.Add(obj));
 }