Beispiel #1
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.CreateUser);

            _email           = FindViewById <EditText>(Resource.Id.CreateEmailInput);
            _password        = FindViewById <EditText>(Resource.Id.PasswordCreate);
            _confirmPassword = FindViewById <EditText>(Resource.Id.ConfirmPasswordCreate);
            _firstName       = FindViewById <EditText>(Resource.Id.CreateFirstNameInput);
            _lastName        = FindViewById <EditText>(Resource.Id.CreateLastNameInput);
            _phoneNumber     = FindViewById <EditText>(Resource.Id.CreatePhonenumberInput);
            _createUser      = FindViewById <Button>(Resource.Id.CreateUserBtn);
            _presenter       = new CreateUserPresenter(this, ModelFactory.Instance.CreateCreateUserModel());

            _createUser.Click += CreateUserOnClick;
            _progressDialog    = new ProgressDialog(this);
            _progressDialog.SetMessage("Opretter ny bruger...");

            _userTypeSpinner = FindViewById <Spinner>(Resource.Id.UserTypeSpinner);
            _userTypeSpinner.ItemSelected += spinner_ItemSelected;
            var adapter = ArrayAdapter.CreateFromResource(
                this, Resource.Array.UserTypes, Resource.Layout.UserTypeSpinnerItem);

            adapter.SetDropDownViewResource(Resource.Layout.UserTypeDropDownItem);
            _userTypeSpinner.Adapter = adapter;

            ActionBar.SetDisplayHomeAsUpEnabled(true);
            ActionBar.SetHomeButtonEnabled(true);
        }
 public CreateUserController(ICreateUserUseCase createUserUseCase, ICreateUserPresenter createUserPresenter)
 {
     _createUserUseCase   = createUserUseCase;
     _createUserPresenter = createUserPresenter;
 }