Ejemplo n.º 1
0
 async void OnButtonAddClicked(object sender, EventArgs e)
 {
     if (PastureDetailPage.instance == null)
     {
         PastureDetailPage.buttonDeleteVisibility = false;
         var page = new NavigationPage(PastureDetailPage.GetInstance());
         page.BarBackgroundColor = Color.FromHex("0078D7");
         MessagingCenter.Send(GenerateNewAgriParcelWithId(), "AddItem");
         await Navigation.PushModalAsync(page);
     }
 }
Ejemplo n.º 2
0
 async void OnItemEditClicked(object sender, EventArgs e)
 {
     if (PastureDetailPage.instance == null && listViewPasture.SelectedItem != null)
     {
         PastureDetailPage.buttonDeleteVisibility = true;
         var page = new NavigationPage(PastureDetailPage.GetInstance());
         page.BarBackgroundColor = Color.FromHex("0078D7");
         page.BindingContext     = App.SelectedAgriParcel;
         await Navigation.PushModalAsync(page);
     }
     //if (PastureDetailPage.instance == null && listViewPasture.SelectedItem != null)
     //{
     //    PastureDetailPage.buttonDeleteVisibility = true;
     //    var page = new NavigationPage(PastureDetailPage.GetInstance());
     //    page.BarBackgroundColor = Color.FromHex("0078D7");
     //    page.BindingContext = App.SelectedPasture;
     //    //listViewFarm.SelectedItem = null;
     //    await Navigation.PushModalAsync(page);
     //}
 }