예제 #1
0
        public override async void Login(string userName, string passWord)
        {
            base.Login(userName, passWord);

            var success = await DependencyService.Get <ILogin>().CheckLogin(userName, passWord);

            if (success)
            {
                App.IsLoggedIn = true;

                await Navigation.PopAsync();
            }
            else
            {
                var signUp = await DisplayAlert("Invalid Login", "Sorry, we didn't recoginize the username or password. Feel free to sign up for free if you haven't!", "Sign up", "Try again");

                if (signUp)
                {
                    await Navigation.PushModalAsync(new NewUserSignUpPage());

                    MobileCenterHelpers.TrackEvent("NewUserSignUp", new Dictionary <string, string> {
                        { "ActionPoint", "System Prompt" },
                    });
                }
            }
        }
예제 #2
0
        protected override void OnAppearing()
        {
            base.OnAppearing();
            MobileCenterHelpers.TrackEvent(MobileCenterConstants.ListViewPageAppeared);

            Device.BeginInvokeOnMainThread(_listView.BeginRefresh);
        }
예제 #3
0
        async void HandleListViewItemTapped(object sender, ItemTappedEventArgs e)
        {
            var listView = sender as ListView;
            var tappedListPageDataModel = e.Item as ListPageDataModel;

            MobileCenterHelpers.TrackEvent(MobileCenterConstants.ListViewItemTapped,
                                           new Dictionary <string, string> {
                { MobileCenterConstants.ListViewItemNumber, tappedListPageDataModel.DetailProperty }
            }
                                           );

            await DisplayAlert("Number Tapped", $"You Selected Number {tappedListPageDataModel.DetailProperty}", "OK");

            listView.SelectedItem = null;
        }
예제 #4
0
        protected override void OnStart()
        {
            MobileCenterHelpers.Start();

            RegisterAppLinks();
        }
예제 #5
0
        protected override void OnAppearing()
        {
            base.OnAppearing();

            MobileCenterHelpers.TrackEvent(MobileCenterConstants.FirstPageOnAppeared);
        }