Esempio n. 1
0
        public void ShowRouteFrom(Place from, Place to)
        {
            if (_Routes.Any())
            {
                _MapView.RemoveAnnotations(_MapView.Annotations as MKAnnotation[]);
                _Routes = new CLLocation[] { };
            }

            var placeMarkFrom = new PlaceMark(from);
            var placeMarkTo   = new PlaceMark(to);

            CalculateRoutesAction.BeginInvoke(placeMarkFrom, placeMarkTo, (ar) =>
            {
                CalculateRoutesAction.EndInvoke(ar);
                UpdateMap(placeMarkFrom, placeMarkTo);
            }, null);
        }
Esempio n. 2
0
        private static Module CreateVehicleModule()
        {
            List <IAction> VehicleActions = new List <IAction>();

            IAction addAction             = new AddVehicleAction();
            IAction deleteAction          = new DeleteVehicleAction();
            IAction modifyAction          = new ModifyVehicleAction();
            IAction listAction            = new ListVehiclesAction();
            IAction calculateRoutesAction = new CalculateRoutesAction();

            VehicleActions.Add(addAction);
            VehicleActions.Add(deleteAction);
            VehicleActions.Add(modifyAction);
            VehicleActions.Add(listAction);
            VehicleActions.Add(calculateRoutesAction);

            return(new VehicleModule(VehicleActions));
        }