Exemplo n.º 1
0
        async void btnNewContact_Clicked(System.Object sender, System.EventArgs e)
        {
            Models.Contact c = new Models.Contact();
            c.Email = txtEmail.Text;
            c.Name  = txtItemName.Text;
            bool bSaved = c.AddItem(c);

            if (bSaved)
            {
                ContactEnum = await c.GetContacts();
                await DisplayAlert("Success", "Your contact has been saved.", "Ok");
            }
            else
            {
                await DisplayAlert("Error", "Sorry, your contact could not saved.", "Ok");
            }
            ClearForm();
            frmAddContact.IsVisible = false;
            frmPayment.IsVisible    = true;
        }
Exemplo n.º 2
0
        protected async override void OnAppearing()
        {
            base.OnAppearing();

            var tapGesture = new TapGestureRecognizer();

            //tapGestureRecognizer.Tapped += (s, e) => {
            //    // handle the tap
            //};
            //tapper.Tapped += TapGesture_Tapped;



            contact      = new Models.Contact();
            ContactsEnum = new List <Models.Contact>();
            //ContactsEnum = await contact.GetContacts();
            //lstContacts.ItemsSource = ContactsEnum;
            BindData();
            lstContacts.ItemTapped += LstContacts_ItemTapped;
            //BuildList();
            //itemTapped = false;
        }