コード例 #1
0
		public DeparturesContentPage (Route selectedRoute)
		{

			var indicator = new ActivityIndicator() {
				HorizontalOptions = LayoutOptions.CenterAndExpand
			};

			this.Title = "Departures";
			var listView = new ListView {
				
				ItemTemplate = new DataTemplate (typeof(TextCell)) {
					Bindings = { {
							TextCell.TextProperty,
							new Binding ("Time")
						}
					}
				}
			};

			var root = new StackLayout() {
				HorizontalOptions = LayoutOptions.FillAndExpand,
				VerticalOptions = LayoutOptions.FillAndExpand,
				Children = {
					listView, 
					indicator
				}
			};

			this.Content = root;

			Initialize (selectedRoute,listView,indicator);
		}
コード例 #2
0
		async void initialize (Route route)
		{
			this.Title = "Stops";
			this.Content = new ListView {
				ItemsSource = await FindStopsByRouteId (route.Id),
				ItemTemplate = new DataTemplate (typeof(TextCell)) {
					Bindings =  {
						{
							TextCell.TextProperty,
							new Binding ("Name")
						}
					}
				}
			};
		}
コード例 #3
0
		async void  Initialize (Route selectedRoute,ListView listView,ActivityIndicator indicator)
		{
			ActivateIndicator (indicator);
			listView.ItemsSource = await FindDeparturesByRouteId (selectedRoute.Id);
			DeactivateIndicator (indicator);
		}
コード例 #4
0
		bool equals(Route obj){
			return obj != null && this.Id.Equals (obj.Id);
		}
コード例 #5
0
		void initializeChildren (Route route)
		{

			this.Children.Add (new DeparturesContentPage (route));
			this.Children.Add (new StopsContentPage (route));
		}
コード例 #6
0
		public DetailPage (Route route)
		{
			InitializeComponent ();
			this.Title = route.LongName;
			initializeChildren (route);
		}
コード例 #7
0
		public StopsContentPage (Route route)
		{

			initialize (route);
		}