private void OnAddFriendExecute(object obj) { IFriendEditViewModel friendEditVm = _friendEditViewModelCreator(); FriendEditViewModels.Add(friendEditVm); friendEditVm.Load(); SelectedFriendEditViewModel = friendEditVm; }
private IFriendEditViewModel CreateAndLoadFriendEditViewModel(int?friendId) { IFriendEditViewModel selectedFriendViewModel = friendViewModelCreator(); FriendEditViewModels.Add(selectedFriendViewModel); selectedFriendViewModel.Load(friendId); return(selectedFriendViewModel); }
private void OnAddFriendExecute(object obj) { IFriendEditViewModel viewModel = _friendEditViewModelCreator(); FriendEditViewModels.Add(viewModel); viewModel.Load(); SelectedFriendEditViewModel = viewModel; }
private void OnOpenFriendTab(int friendId) { IFriendEditViewModel friendEditVm = FriendEditViewModels.SingleOrDefault(vm => vm.Friend.Id == friendId); if (friendEditVm == null) { friendEditVm = _friendEditViewModelCreator(); FriendEditViewModels.Add(friendEditVm); friendEditVm.Load(friendId); } SelectedFriendEditViewModel = friendEditVm; }