Ejemplo n.º 1
0
        public bool Remove(int j)
        {
            if (j <= 0 && j >= LectList.Count)
            {
                return(false);
            }
            LectList.RemoveAt(j);
            LecturerListHandlerEventArgs e = new LecturerListHandlerEventArgs(CollectionName, "The lecturer was recently deleted.", LectList[j]);

            OnLecturerChanges(e);
            return(true);
        }
Ejemplo n.º 2
0
 public Lecturer this[int index]
 {
     get
     {
         return(LectList.ElementAt(index));
     }
     set
     {
         LecturerListHandlerEventArgs e = new LecturerListHandlerEventArgs(CollectionName, "Item of collection was changed.", value);
         OnLecturerReferenceChanged(e);
         LectList[index] = value;
     }
 }
Ejemplo n.º 3
0
 public void AddLecturers(params Lecturer[] l)
 {
     if (LectList == null)
     {
         LectList = new List <Lecturer>();
     }
     LectList.AddRange(l);
     foreach (var el in l)
     {
         LecturerListHandlerEventArgs e = new LecturerListHandlerEventArgs(CollectionName, "The lecturer was recently added.", el);
         OnLecturerChanges(e);
     }
 }
Ejemplo n.º 4
0
 public void AddDefaults()
 {
     if (LectList == null)
     {
         LectList = new List <Lecturer>();
     }
     LectList.Add(new Lecturer());
     foreach (var el in LectList)
     {
         LecturerListHandlerEventArgs e = new LecturerListHandlerEventArgs(CollectionName, "The lecturer was recently deleted.", el);
         OnLecturerChanges(e);
     }
 }
Ejemplo n.º 5
0
 protected virtual void OnLecturerReferenceChanged(LecturerListHandlerEventArgs e)
 {
     LecturerReferenceChanged?.Invoke(this, e);
 }
Ejemplo n.º 6
0
 protected virtual void OnLecturerChanges(LecturerListHandlerEventArgs e)
 {
     LecturersCountChanged?.Invoke(this, e);
 }