private async void RegisterImpl(object o)
        {
            Person person = null;
            //TODO block "proceed" button here

            await Task.Run((() =>
            {
                try
                {
                    person = new Person(_name, _surname, _email, _birthDate);
                }
                catch (PersonCreationException e)
                {
                    MessageBox.Show(e.Message);
                }

                //save to database here :)
            }));

            if (person == null)
            {
                return;
            }

            PersonInfoWindow personInfoWindow = new PersonInfoWindow(person);

            _parentWindow.Hide();
            personInfoWindow.Show();
        }
示例#2
0
        private async void RegisterImpl(object o)
        {
            Person person = null;
            await Task.Run((() =>
            {
                person = new Person(_name, _surname, _email, _birthDate);
                //save to database here :)
            }));

            PersonInfoWindow personInfoWindow = new PersonInfoWindow(person);

            _parentWindow.Hide();
            personInfoWindow.Show();
        }