Beispiel #1
0
 void src_DictionaryChanged(object sender, DictionaryChangedEventArgs <string> e)
 {
     switch (e.DictionaryChangedType)
     {
     case DictionaryChangedType.ItemAdded:
     case DictionaryChangedType.ItemDeleted:
     case DictionaryChangedType.Reset:
         this.Refresh();
         break;
     }
 }
Beispiel #2
0
 protected void OnPropertyChanged(object sender, DictionaryChangedEventArgs <string> e)
 {
     if (e.DictionaryChangedType == DictionaryChangedType.ItemChanged)
     {
         if (PropertyChanged != null)
         {
             lock (MappingRelation)
             {
                 foreach (var map in MappingRelation)
                 {
                     if (map.Value == e.EffectKey)
                     {
                         PropertyChanged(this, new PropertyChangedEventArgs(map.Key));
                     }
                 }
             }
         }
     }
 }