示例#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}");
        }
示例#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}");
        }
示例#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}");
        }
示例#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}");
        }
示例#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}");
        }
示例#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;
            }
        }