00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 using System;
00020 using System.Drawing;
00021 using System.Collections;
00022
00023 namespace SimImmuno
00024 {
00025 [Serializable]
00026 public class CellulesCollection : CollectionBase
00027 {
00028 public Cellule this [int index]
00029 {
00030 get
00031 {
00032 return((Cellule)List[index]);
00033 }
00034 set
00035 {
00036 List[index] = value;
00037 }
00038 }
00039
00040 public int Add(Cellule value)
00041 {
00042 int id = List.Add(value);
00043 value.index = id;
00044 return(id);
00045 }
00046
00047 public CellulesCollection Clone()
00048 {
00049 CellulesCollection ccol = new CellulesCollection();
00050 foreach(Cellule cell in this)
00051 ccol.Add(cell);
00052 return ccol;
00053 }
00054 }
00055 }