private void NewPerson() { PersonDialogViewModel viewModel = new PersonDialogViewModel(personService, dispatcher, aggregator, dialogService, null); if (dialogService.ShowDialog <PersonDialog>(this, viewModel) == true) { aggregator.GetEvent <PersonDirectoryUpdatedEvent>().Publish(null); } }
private void EditPerson() { PersonDialogViewModel viewModel = new PersonDialogViewModel(personService, dispatcher, aggregator, dialogService, person); if (dialogService.ShowDialog <PersonDialog>(this, viewModel) == true) { this.person.FirstName = viewModel.Person.FirstName; this.person.LastName = viewModel.Person.LastName; this.person.Age = viewModel.Person.Age; } }
private void EditPerson() { PersonDialogViewModel viewModel = new PersonDialogViewModel(personService, dispatcher, aggregator, dialogService, person); if (dialogService.ShowDialog<PersonDialog>(this, viewModel) == true) { this.person.FirstName = viewModel.Person.FirstName; this.person.LastName = viewModel.Person.LastName; this.person.Age = viewModel.Person.Age; } }
private void NewPerson() { PersonDialogViewModel viewModel = new PersonDialogViewModel(personService, dispatcher, aggregator, dialogService, null); if (dialogService.ShowDialog<PersonDialog>(this, viewModel) == true) { aggregator.GetEvent<PersonDirectoryUpdatedEvent>().Publish(null); } }
private void GivenPerson() { viewModel = new PersonDialogViewModel(personServiceMock.Object, dispatcherMock.Object, aggregatorMock.Object, dialogServiceMock.Object, persons[0]); }