Exemple #1
0
        private void SetVehicleMarkersSelectionState(
            MapMarkerSelectionStates selectionState,
            IEnumerable <string> excludeVehicles = null)
        {
            foreach (var vehicleId in _vehicles.Keys)
            {
                VehicleViewModel vehicleVM = null;
                _vehicles.TryGetValue(vehicleId, out vehicleVM);
                if (vehicleVM == null || (excludeVehicles != null && excludeVehicles.Contains(vehicleId)))
                {
                    continue;
                }

                vehicleVM.SelectionState = selectionState;
            }
        }
        protected float ConvertSelectionStateToAlpha(MapMarkerSelectionStates selectionState)
        {
            switch (selectionState)
            {
            case MapMarkerSelectionStates.NoSelection:
                return(1.0f);

            case MapMarkerSelectionStates.SelectionSelected:
                return(1.0f);

            case MapMarkerSelectionStates.SelectionNotSelected:
                return(0.5f);

            default:
                return(1.0f);
            }
        }
Exemple #3
0
 private void SetRouteStopMarkersSelectionState(
     MapMarkerSelectionStates selectionState,
     IEnumerable <string> excludeStops = null)
 {
     foreach (var stop in _stops)
     {
         if (excludeStops != null)
         {
             if (!excludeStops.Any(v => v.Equals(stop.Model.Id)))
             {
                 stop.SelectionState = selectionState;
             }
         }
         else
         {
             stop.SelectionState = selectionState;
         }
     }
 }