コード例 #1
0
		public RegisterPlaceListVM (Page mypage) : base (mypage)
		{
			listaPlaces = new TodoItemDatabase ().GetItems ().ToList ();

			InsertPlace = new Command (() => {
				MyPage.Navigation.PushAsync (new RegisterPlaceView ());
			});
		}
コード例 #2
0
		protected void InsertPlace ()
		{
			var banco = new TodoItemDatabase ();
			var item = new TodoItem {
				Description = Place.Description,
				Latitude = Place.Latitude,
				Longitude = Place.Longitude
			};

			try {
				var id = banco.SaveItem (item);
				MyPage.Navigation.PopAsync();
			} catch (Exception ex) {
				Xamarin.Insights.Report (ex,Xamarin.Insights.Severity.Critical);
			}
	
		}