Esempio n. 1
0
        private void ListLine5Direction2_ItemClick(object sender, ItemClickEventArgs e)
        {
            BusStopName clickedMenuItem = (BusStopName)e.ClickedItem;

            if (clickedMenuItem != null)
            {
                Debug.WriteLine(clickedMenuItem.StopName);
                clickedMenuItem.Line      = "5";
                clickedMenuItem.Direction = 2;

                Frame root = Window.Current.Content as Frame;
                root.Navigate(typeof(BusDetail), clickedMenuItem);
            }
        }
Esempio n. 2
0
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);
            BusStopName receiveData = (BusStopName)e.Parameter;

            if (receiveData != null)
            {
                line      = receiveData.Line;
                stop      = receiveData.StopName;
                direction = receiveData.Direction;

                title.Content = "Line " + line + " " + Line.NAME[(int.Parse(line) - 1) * 2 + (direction - 1)];

                GetBusTime(stop, line, direction);  // Async refresh
            }
        }
        private void LineListView_ItemClick(object sender, ItemClickEventArgs e)
        {
            BusStopLineTime lineTime = (BusStopLineTime)e.ClickedItem;

            if (lineTime != null)
            {
                BusStopName stopName = new BusStopName()
                {
                    Direction = uint.Parse(lineTime.Direction),
                    Line      = lineTime.Line,
                    StopName  = stop
                };

                Frame root = Window.Current.Content as Frame;
                root.Navigate(typeof(BusDetail), stopName);
            }
        }