示例#1
0
        public void Register()
        {
            User korisnik = new User()
            {
                Email     = _view.Email,
                Password  = _view.Password,
                FirstName = _view.FirstName,
                LastName  = _view.LastName
            };

            try
            {
                _userService.Register(korisnik);
            }
            catch (UserException)
            {
                MessageBox.Show("Username taken.");
                _view.Email    = "";
                _view.Password = "";
                return;
            }

            MessageBox.Show("Account created.");
            _view.Close();
        }