Exemplo n.º 1
0
 public void AddSource(NotificationSourceViewModel sourceModel)
 {
     lock (_sources)
     {
         _sources.Add(sourceModel);
     }
     sourceModel.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(sourceModel_PropertyChanged);
     updateHasNotification();
 }
Exemplo n.º 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();
 }
Exemplo n.º 3
0
 public NotificationBarViewModel(NotificationSourceViewModel source)
     : this(new NotificationSourceViewModel[] { source })
 {
 }