public RideListPage(DateTime date_of_rides)
        {
            InitializeComponent();

            // Grabs the list of all rides IDs on a specific date from the database
            string path_of_rides = "users/" + FireAuth.auth.User.LocalId + "/ride_info/ride_history/" + date_of_rides.ToString("M-y") + "/" + date_of_rides.ToString("M-d-yy");

            rides    = FireDatabase.read(path_of_rides).Result;
            numRides = rides.Values.Count;

            this.date_of_rides = date_of_rides;

            // Adds a back button
            var backButtonGesture = new TapGestureRecognizer();

            backButtonGesture.Tapped += (s, e) =>
            {
                Navigation.PopModalAsync();
            };
            back_arrow_button.GestureRecognizers.Add(backButtonGesture);

            // Sets the ride date text
            ride_date.Text = date_of_rides.ToString("MM-dd-yyyy");


            // Creates a new stack of rides
            ride_stack             = new RideStack();
            scroll_view.Content    = ride_stack;
            ride_stack.ChildAdded += method;

            SetupInitialView();
        }
Exemplo n.º 2
0
        public RideListPage(DateTime date_of_rides)
        {
            InitializeComponent();

            //GET LIST OF RIDE IDS HERE
            string path_of_rides = "users/" + FireAuth.auth.User.LocalId + "/ride_info/ride_history/" + date_of_rides.ToString("M-y") + "/" + date_of_rides.ToString("M-d-yy");

            this.rides    = FireDatabase.read(path_of_rides).Result;
            this.numRides = rides.Values.Count;

            this.date_of_rides = date_of_rides;

            //Back button functionality
            var backButtonGesture = new TapGestureRecognizer();

            backButtonGesture.Tapped += (s, e) =>
            {
                Navigation.PopModalAsync();
            };
            back_arrow_button.GestureRecognizers.Add(backButtonGesture);

            ride_date.Text = date_of_rides.ToString("MM-dd-yyyy");


            ride_stack             = new RideStack();
            scroll_view.Content    = ride_stack;
            ride_stack.ChildAdded += method;



            SetupInitialView();
        }