Example #1
0
 public void AddSource(NotificationSourceViewModel sourceModel)
 {
     lock (_sources)
     {
         _sources.Add(sourceModel);
     }
     sourceModel.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(sourceModel_PropertyChanged);
     updateHasNotification();
 }
Example #2
0
 public void RemoveSource(NotificationSourceViewModel sourceModel)
 {
     sourceModel.PropertyChanged -= new System.ComponentModel.PropertyChangedEventHandler(sourceModel_PropertyChanged);
     lock (_sources)
         if (_sources.IndexOf(sourceModel) != -1)
         {
             _sources.Remove(sourceModel);
         }
     updateHasNotification();
 }
Example #3
0
 public NotificationBarViewModel(NotificationSourceViewModel source)
     : this(new NotificationSourceViewModel[] { source })
 {
 }