示例#1
0
        public RegisterPage(HomePage homePage)
        {
            InitializeComponent();
            _vm      = BindingContext as RegisterPageViewModel;
            _vm.Page = this;
            _vm.RegistrationSuccess = async() =>
            {
                if (homePage != null)
                {
                    await homePage.DismissRegisterPageAndLogInAsync(_vm.Email);
                }
            };
            MasterPasswordEntry        = _masterPassword;
            ConfirmMasterPasswordEntry = _confirmMasterPassword;
            if (Device.RuntimePlatform == Device.Android)
            {
                ToolbarItems.RemoveAt(0);
            }

            _email.ReturnType                    = ReturnType.Next;
            _email.ReturnCommand                 = new Command(() => _masterPassword.Focus());
            _masterPassword.ReturnType           = ReturnType.Next;
            _masterPassword.ReturnCommand        = new Command(() => _confirmMasterPassword.Focus());
            _confirmMasterPassword.ReturnType    = ReturnType.Next;
            _confirmMasterPassword.ReturnCommand = new Command(() => _hint.Focus());
        }
示例#2
0
        public RegisterPage(HomePage homePage)
        {
            _messagingService = ServiceContainer.Resolve <IMessagingService>("messagingService");
            _messagingService.Send("showStatusBar", true);
            InitializeComponent();
            _vm      = BindingContext as RegisterPageViewModel;
            _vm.Page = this;
            _vm.RegistrationSuccess = () => Device.BeginInvokeOnMainThread(async() => await RegistrationSuccessAsync(homePage));
            _vm.CloseAction         = async() =>
            {
                _messagingService.Send("showStatusBar", false);
                await Navigation.PopModalAsync();
            };
            MasterPasswordEntry        = _masterPassword;
            ConfirmMasterPasswordEntry = _confirmMasterPassword;
            if (Device.RuntimePlatform == Device.Android)
            {
                ToolbarItems.RemoveAt(0);
            }

            _email.ReturnType                    = ReturnType.Next;
            _email.ReturnCommand                 = new Command(() => _masterPassword.Focus());
            _masterPassword.ReturnType           = ReturnType.Next;
            _masterPassword.ReturnCommand        = new Command(() => _confirmMasterPassword.Focus());
            _confirmMasterPassword.ReturnType    = ReturnType.Next;
            _confirmMasterPassword.ReturnCommand = new Command(() => _hint.Focus());
        }
示例#3
0
 public RegisterPage()
 {
     InitializeComponent();
     _vm                        = BindingContext as RegisterPageViewModel;
     _vm.Page                   = this;
     MasterPasswordEntry        = _masterPassword;
     ConfirmMasterPasswordEntry = _confirmMasterPassword;
 }
示例#4
0
        public RegisterPage()
        {
            InitializeComponent();
            _vm                        = BindingContext as RegisterPageViewModel;
            _vm.Page                   = this;
            MasterPasswordEntry        = _masterPassword;
            ConfirmMasterPasswordEntry = _confirmMasterPassword;

            _email.ReturnType                    = ReturnType.Next;
            _email.ReturnCommand                 = new Command(() => _masterPassword.Focus());
            _masterPassword.ReturnType           = ReturnType.Next;
            _masterPassword.ReturnCommand        = new Command(() => _confirmMasterPassword.Focus());
            _confirmMasterPassword.ReturnType    = ReturnType.Next;
            _confirmMasterPassword.ReturnCommand = new Command(() => _hint.Focus());
        }