Example #1
0
 /// <summary>
 /// Initializes a new instance of the MainViewModel class.
 /// </summary>
 public MainViewModel()
 {
     members       = new ObservableCollection <Member>();
     database      = new MemberDB(members);
     members       = database.GetMemberships();
     AddCommand    = new RelayCommand(AddMethod);
     ExitCommand   = new RelayCommand <IClosable>(ExitMethod);
     ChangeCommand = new RelayCommand(ChangeMethod);
     Messenger.Default.Register <MessageMember>(this, ReceiveMember);
     Messenger.Default.Register <NotificationMessage>(this, ReceiveMessage);
 }