Exemplo n.º 1
0
		public override void ViewWillAppear (bool animated)
		{
			base.ViewWillAppear (animated);

			trips = new TripManager ().GetTrips ();
			if (trips.Count == 0)
				trips.Add (new Trip () { Title = "Bangalore", StartDate = DateTime.Now, EndDate = DateTime.Now });
			var tripSource = new TripViewSource (trips);

			tripSource.TripSelectionChanged += (t) => {

				editTripScreenController = new EditTripScreenController(t);

				this.NavigationController.PushViewController(editTripScreenController, true);
			};

			tripListView.Source = tripSource;
		}
Exemplo n.º 2
0
        public override void ViewWillAppear(bool animated)
        {
            base.ViewWillAppear(animated);

            trips = new TripManager().GetTrips();
            if (trips.Count == 0)
            {
                trips.Add(new Trip()
                {
                    Title = "Bangalore", StartDate = DateTime.Now, EndDate = DateTime.Now
                });
            }
            var tripSource = new TripViewSource(trips);

            tripSource.TripSelectionChanged += (t) => {
                editTripScreenController = new EditTripScreenController(t);

                this.NavigationController.PushViewController(editTripScreenController, true);
            };

            tripListView.Source = tripSource;
        }