private static void GPSCommandParameterPropertyChanged(BindableObject bindable, object oldValue, object newValue) { BusArrivalControl control = (BusArrivalControl)bindable; control.GPSIcon.CommandParameter = newValue; Debug.WriteLine($"GPSCommandParameter Changed: {oldValue} -> {newValue}"); }
private static void StopNamePropertyChanged(BindableObject bindable, object oldValue, object newValue) { BusArrivalControl control = (BusArrivalControl)bindable; control.StopNameLabel.Text = newValue.ToString(); Debug.WriteLine($"StopName Changed: {oldValue} -> {newValue}"); }
private static void ArrivalTimeMeasurementPropertyChanged(BindableObject bindable, object oldValue, object newValue) { BusArrivalControl control = (BusArrivalControl)bindable; control.ArrivalTimeMeasurementLabel.Text = newValue.ToString(); Debug.WriteLine($"ArrivalTimeMeasurement Changed: {oldValue} -> {newValue}"); }
private static void RouteNumberPropertyChanged(BindableObject bindable, object oldValue, object newValue) { BusArrivalControl control = (BusArrivalControl)bindable; control.RouteNumberLabel.Text = newValue.ToString(); Debug.WriteLine($"RouteNumber Changed: {oldValue} -> {newValue}"); }
private static void IsGPSPropertyChanged(BindableObject bindable, object oldValue, object newValue) { BusArrivalControl control = (BusArrivalControl)bindable; var value = (bool)newValue; control.GPSIcon.IsVisible = value; control.GPSIcon.IsEnabled = value; Debug.WriteLine($"IsGPS Changed: {oldValue} -> {newValue}"); }
private static void ArrivalTimePropertyChanged(BindableObject bindable, object oldValue, object newValue) { BusArrivalControl control = (BusArrivalControl)bindable; Debug.WriteLine($"ArrivalTime Changed: {oldValue} -> {newValue}"); string value = newValue.ToString(); control.ArrivalTimeLabel.Text = value; if (value == "0" || string.IsNullOrWhiteSpace(value)) { control.ArrivalTimeLabel.IsVisible = false; control.ArrivalTimeMeasurementLabel.IsVisible = false; } else { control.ArrivalTimeLabel.IsVisible = true; control.ArrivalTimeMeasurementLabel.IsVisible = true; } }