예제 #1
0
 public bool Remove(GraduateStudent rt)
 {
     if (GraduateStudentsDictionaryCollection.ContainsValue(rt))
     {
         foreach (KeyValuePair <TKey, GraduateStudent> kvp in GraduateStudentsDictionaryCollection)
         {
             if (kvp.Value == rt)
             {
                 kvp.Value.PropertyChanged -= GraduateStudentPropertyChanged;
                 GraduateStudentsDictionaryCollection.Remove(kvp.Key);
                 GraduateStudentsChanged?.Invoke(kvp.Value, new GraduateStudentsChangedEventArgs <TKey>(Name, Revision.Remove, "", kvp.Value.LearningYear));
                 return(true);
             }
         }
     }
     return(false);
 }
예제 #2
0
 public void GraduateStudentPropertyChanged(object obj, PropertyChangedEventArgs ar)
 {
     GraduateStudentsChanged?.Invoke(obj, new GraduateStudentsChangedEventArgs <TKey>(Name, Revision.Property, ar.PropertyName, (obj as GraduateStudent).LearningYear));
 }