public void StudentReferenceChanged() { StudentListHandlerEventArgs G = new StudentListHandlerEventArgs(); JournalCollection.Add(new JournalEntry("JournalCollection ", "Додано новий елемент ", G.S)); G = new StudentListHandlerEventArgs("JournalCollection ", "Додано новий елемент ", G.S); Console.WriteLine(G); }
public void AddDefaults(int n) { StudentInfo.Add(TestCollections.GenerateInfo(n)); StudentListHandlerEventArgs obj = new StudentListHandlerEventArgs("StudentInfo", "Добавлено новий елемент", StudentInfo.Last()); //Console.WriteLine(obj); if (StudentCountChanged != null) { StudentCountChanged(StudentInfo.Last(), obj); //Need to think } }
public void AddStudents(params Student[] input) { for (int i = 0; i < input.Length; i++) { StudentInfo.Add(input[i]); StudentListHandlerEventArgs obj = new StudentListHandlerEventArgs("StudentInfo", "Добавлено новий елемент", StudentInfo.Last()); if (StudentCountChanged != null) { StudentCountChanged(StudentInfo.Last(), obj); //Need to think } } }
public Student this[int j] //Need to think { get { return(StudentInfo[j]); } set { StudentListHandlerEventArgs obj = new StudentListHandlerEventArgs("StudentInfo", "Змiнено " + j + " елемент", StudentInfo[j]); if (StudentReferenceChanged != null) { StudentReferenceChanged(StudentInfo[j], obj); } StudentInfo[j] = value; } }
public bool Remove(int j) { if (j < StudentInfo.Count || j > 0) { StudentListHandlerEventArgs obj = new StudentListHandlerEventArgs("StudentInfo", "Видалено " + j + " елемент", StudentInfo[j]); if (StudentCountChanged != null) { StudentCountChanged(StudentInfo[j], obj); //Need to think } StudentInfo.RemoveAt(j); return(true); } else { return(false); } }