コード例 #1
0
        private void NewPerson()
        {
            PersonDialogViewModel viewModel = new PersonDialogViewModel(personService, dispatcher, aggregator, dialogService, null);

            if (dialogService.ShowDialog <PersonDialog>(this, viewModel) == true)
            {
                aggregator.GetEvent <PersonDirectoryUpdatedEvent>().Publish(null);
            }
        }
コード例 #2
0
        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;
            }
        }
コード例 #3
0
        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;
            }
        }
コード例 #4
0
        private void NewPerson()
        {
            PersonDialogViewModel viewModel = new PersonDialogViewModel(personService, dispatcher, aggregator, dialogService, null);

            if (dialogService.ShowDialog<PersonDialog>(this, viewModel) == true)
            {
                aggregator.GetEvent<PersonDirectoryUpdatedEvent>().Publish(null);
            }
        }
コード例 #5
0
 private void GivenPerson()
 {
     viewModel = new PersonDialogViewModel(personServiceMock.Object, dispatcherMock.Object, aggregatorMock.Object, dialogServiceMock.Object, persons[0]);
 }