Exemple #1
0
        private static void GPSCommandParameterPropertyChanged(BindableObject bindable, object oldValue, object newValue)
        {
            BusArrivalControl control = (BusArrivalControl)bindable;

            control.GPSIcon.CommandParameter = newValue;
            Debug.WriteLine($"GPSCommandParameter Changed: {oldValue} -> {newValue}");
        }
Exemple #2
0
        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}");
        }
Exemple #3
0
        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}");
        }
Exemple #4
0
        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}");
        }
Exemple #5
0
        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}");
        }
Exemple #6
0
        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;
            }
        }