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); }
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; } }
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); } }
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); } }
protected virtual void OnLecturerReferenceChanged(LecturerListHandlerEventArgs e) { LecturerReferenceChanged?.Invoke(this, e); }
protected virtual void OnLecturerChanges(LecturerListHandlerEventArgs e) { LecturersCountChanged?.Invoke(this, e); }