Example #1
0
        public FriendViewModel()
        {
            //Use this line with a singleton implementation of FriendCatalog
            //_friendCatalog = FriendCatalog.Instance;

            //use this i.e make an instance of FriendCatalog when using the non-singleton normal implementation of FriendCatalog
            _friendCatalog    = new FriendCatalog();
            AddContactCommand = new RelayCommand(AddFriend);
            _deletionCommand  = new DeleteCommand(_friendCatalog, this);
        }
Example #2
0
 public DeleteCommand(FriendCatalog catalog, FriendViewModel viewModel)
 {
     _catalog   = catalog;
     _viewModel = viewModel;
 }