private void OnDeleteButtonClicked(object obj)
 {
     if (messageDialogService.ShowYesNoMessageBox($"Are you sure you want to delete the friend '{friend.FirstName} {friend.LastName}'",
                                                  "Delete friend") == MessageBoxResult.Yes)
     {
         friendDataProvider.DeleteFriend(friend.Id);
         eventAggregator.GetEvent <OnDeleteFriendEvent>().Publish(friend.Id);
     }
 }
 private void OnDeleteExecute(object obj)
 {
     if (_messageDialogService.ShowYesNoDialog("Delete Friend",
                                               $"Do you really want to delete the friend '{Friend.FirstName} {Friend.LastName}'?"
                                               ) == MessageDialogResult.Yes)
     {
         _dataProvider.DeleteFriend(Friend.Id);
         _eventAggregator.GetEvent <FriendDeletedEvent>().Publish(Friend.Id);
     }
 }
        private void OnDeleteExecute(object obj)
        {
            var result = _messageDialogService.ShowYesNoDialog(
                "Delete Friend",
                string.Format("Do you really want to delete the friend '{0} {1}'", Friend.FirstName, Friend.LastName),
                MessageDialogResult.No);

            if (result == MessageDialogResult.Yes)
            {
                _friendDataProvider.DeleteFriend(Friend.Id);
                _eventAggregator.GetEvent <FriendDeletedEvent>().Publish(Friend.Id);
            }
        }
Esempio n. 4
0
 private void OnDeleteExecute(object obj)
 {
     _dataProvider.DeleteFriend(Friend.Id);
     _eventAggregator.GetEvent <FriendDeletedEvent>().Publish(Friend.Id);
 }