Beispiel #1
0
        private async void Register_Execute(System.Windows.Window window)
        {
            RegisterWindow registerWindow = window as RegisterWindow;
            string         password       = registerWindow.PassPB.Password;

            try
            {
                UserRecordArgs args = new UserRecordArgs()
                {
                    DisplayName = Name,
                    Email       = Email,
                    Password    = password,
                    PhoneNumber = Number,
                };

                User = await _model.RegisterUser(args);

                window.Close();
            }
            catch (Exception e)
            {
                MessageBox.Show(e.Message);
                User = null;
            }
        }
Beispiel #2
0
        private void AddUser_Execute()
        {
            RegisterWindow window = new RegisterWindow(_registerViewModel);

            window.ShowDialog();
            if (_registerViewModel.User != null)
            {
                Users.Add(_registerViewModel.User);

                Operation = OperProgress.Register.ToString();
            }
        }