コード例 #1
0
        /// <summary>
        ///   This page is a container for the event cards that will be shown on the screen
        /// </summary>
        public EventPage()
        {
            //StackLayout layout = this.FindByName<StackLayout>("Layout");
            InitializeComponent();
            ScrollView scroll = this.FindByName <ScrollView>("scroll");

            Debug.WriteLine(scroll.ScrollY);

            Task.Run(async() =>
            {
                temp = await JsonRequest.GetEventData();

                Device.BeginInvokeOnMainThread(() =>
                {
                    EventInformation.CurrentEvents = temp.EventSet;
                    foreach (Event ev in EventInformation.CurrentEvents)
                    {
                        Layout.Children.Add(new EventView(ev));
                    }
                });
            });
        }
コード例 #2
0
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        public static async Task <Event[]> LoadEvents()
        {
            Events events = await JsonRequest.GetEventData();

            return(events.EventSet);
        }