Example #1
0
        public LoginFormPage()
        {
            InitializeComponent();

            Username_Entry.Completed += (object sender, EventArgs e) =>
            {
                Password_Entry.Focus();
            };
        }
Example #2
0
        void MyInit()
        {
            // Controlling our design (?Alessandro?)
            BackgroundColor           = Constants.BgColor;
            Username_Label.TextColor  = Constants.TextColor;
            Password_Label.TextColor  = Constants.TextColor;
            ActivitySpinner.IsVisible = false;
            LoginImg.HeightRequest    = Constants.IconHeight;

            // Cool things Android Studio didn't do so well :)
            // Setting jobs schedule with closing keyboard and stuff related to animation.
            Username_Entry.Completed += (s, e) => Password_Entry.Focus();
            Password_Entry.Completed += (s, e) => SignInHandler(s, e);
        }
Example #3
0
        public LoginFormPage()
        {
            var vm = new LoginViewModel();

            this.BindingContext           = vm;
            vm.DisplayInvalidLoginPrompt += () => DisplayAlert("Fejl!", "Forkert logind, prøv igen", "OK");
            vm.LoginSuccess += () => Navigation.PushModalAsync(new MainPage());

            InitializeComponent();

            Username_Entry.Completed += (object sender, EventArgs e) =>
            {
                Password_Entry.Focus();
            };

            Password_Entry.Completed += (object sender, EventArgs e) =>
            {
                vm.SubmitCommand.Execute(null);
            };
        }