public DataUc(
     ISmartyStreetsService smartyStreetsService,
     IGoogleMapsService googleMapsService)
 {
     _smartyStreetsService = smartyStreetsService;
     _googleMapsService    = googleMapsService;
 }
Exemple #2
0
        public GoogleMapsTests()
        {
            // Restricted by IP address
            string apiKey = "AIzaSyASCzvAms7C6-dnRvwYhBpl4VwoiJlj8MI";

            this.googleMapsService = new GoogleMapsService(apiKey);
        }
Exemple #3
0
        public CreateFestivalViewModel(IFrameNavigationService navigationService, IFestivalService festivalService,
                                       IGoogleMapsService googleMapsService)
        {
            Festival = new Festival
            {
                OpeningHours = new OpeningHours(),
                Address      = new Address()
            };
            _festivalService   = festivalService;
            _navigationService = navigationService;

            if (navigationService.Parameter == null || !(navigationService.Parameter is int customerId))
            {
                throw new InvalidNavigationException();
            }

            _customerId = customerId;

            CreateFestivalCommand = new RelayCommand(CreateFestival);

            #region Google Search

            _googleService = googleMapsService;
            SearchCommand  = new RelayCommand(Search);
            SelectCommand  = new RelayCommand <string>(Select);

            #endregion
        }
 public DriverController(IDriverRepository driverRepository,
                         IGoogleMapsService googleMapsService,
                         IMapper mapper)
 {
     _mapper            = mapper ?? throw new ArgumentNullException(nameof(mapper));
     _driverRepository  = driverRepository ?? throw new ArgumentNullException(nameof(driverRepository));
     _googleMapsService = googleMapsService ?? throw new ArgumentNullException(nameof(googleMapsService));
 }
 public ShackmeetApiController(ShackmeetsDbContext context, ILogger <ShackmeetApiController> logger, IOptions <AppSettings> appSettings, IChattyService chattyService, IGoogleMapsService googleMapsService)
 {
     this.dbContext         = context;
     this.logger            = logger;
     this.appSettings       = appSettings.Value;
     this.chattyService     = chattyService;
     this.googleMapsService = googleMapsService;
 }
 public ONGAppService(IONGRepository ongRepository,
                      IUser user,
                      IMapper mapper,
                      IGoogleMapsService googleMapsService)
 {
     _ongRepository     = ongRepository;
     _user              = user;
     _mapper            = mapper;
     _googleMapsService = googleMapsService;
 }
Exemple #7
0
 public RectangleController(IRectangleService rectangleService,
                            IGoogleMapsService googleMapsService,
                            IPdfService pdfService,
                            IZipService zipService)
 {
     _rectangleService  = rectangleService ?? throw new ArgumentNullException(nameof(rectangleService));
     _googleMapsService = googleMapsService ?? throw new ArgumentNullException(nameof(googleMapsService));
     _pdfService        = pdfService ?? throw new ArgumentNullException(nameof(pdfService));
     _zipService        = zipService ?? throw new ArgumentNullException(nameof(zipService));
 }
Exemple #8
0
 public TripsController(IHubContext <RouteHub> hubContext, IConfiguration configuration, IMapper mapper,
                        ITripsRepository tripsRepo,
                        IUsersRepository usersRepository,
                        IUrlHelper urlHelper,
                        IGoogleMapsService googleMapsService)
 {
     _configuration     = configuration;
     _tripsRepo         = tripsRepo;
     _mapper            = mapper;
     _usersRepository   = usersRepository;
     _urlHelper         = urlHelper;
     _googleMapsService = googleMapsService;
     _hubContext        = hubContext;
 }
Exemple #9
0
        public UpdateFestivalViewModel(IFrameNavigationService navigationService, IFestivalService festivalService,
                                       IGoogleMapsService googleMapsService)
        {
            _festivalService      = festivalService;
            _navigationService    = navigationService;
            _googleService        = googleMapsService;
            Festival              = _festivalService.GetFestival((int)_navigationService.Parameter);
            UpdateFestivalCommand = new RelayCommand(UpdateFestival);
            CancelCommand         = new RelayCommand(() => _navigationService.NavigateTo("FestivalInfo", Festival.Id));

            #region Google Search

            _googleService = googleMapsService;
            SearchCommand  = new RelayCommand(Search);
            SelectCommand  = new RelayCommand <string>(Select);
            CurrentAddress = $"Huidige adres: {Festival.Address}";

            #endregion
        }
Exemple #10
0
        public HomePageViewModel(INavigationService navigationService, IPageDialogService pageDialogService, IGoogleMapsService googleMapsService,
                                 IFarmAppService farmAppService, IDialogService dialogService)
            : base(navigationService)
        {
            _pageDialogService = pageDialogService;
            _navigationService = navigationService;
            _googleMapsService = googleMapsService;
            _farmAppService    = farmAppService;
            _dialogService     = dialogService;

            CurrentLocation = null;
            Pins            = null;
            SetCurrentLocation();
            getProducts();

            SearchCommand          = new DelegateCommand(async() => await OnSearchAsync());
            LogoutCommand          = new DelegateCommand(async() => await OnLogout());
            CurrentLocationCommand = new DelegateCommand(SetCurrentLocation);
        }
Exemple #11
0
        public EmployeeViewModel(IEmployeeService employeeService, IFrameNavigationService navigationService,
                                 IGoogleMapsService googleMapsService, IOfflineService offlineService)
        {
            _employeeService        = employeeService;
            _navigationService      = navigationService;
            ViewCertificatesCommand = new RelayCommand(() => _navigationService.NavigateTo("CertificateList", Employee.Id));

            if (_navigationService.Parameter is int customerId)
            {
                Employee          = _employeeService.GetEmployee(customerId);
                CanDeleteEmployee = _employeeService.CanRemoveEmployee(Employee);
                SaveCommand       = new RelayCommand(UpdateEmployee);
                CurrentAddress    = $"Huidige adres: {Employee.Address}";
            }
            else
            {
                Employee = new Employee
                {
                    Account        = new Account(),
                    Name           = new FullName(),
                    ContactDetails = new ContactDetails()
                };
                SaveCommand = new RelayCommand <PasswordWithVerification>(AddEmployee);
            }

            CancelCommand       = new RelayCommand(() => _navigationService.NavigateTo("EmployeeInfo", Employee.Id));
            EditEmployeeCommand = new RelayCommand(() => _navigationService.NavigateTo("UpdateEmployee", Employee.Id), () => offlineService.IsOnline, true);
            EditAccountCommand  = new RelayCommand(() => _navigationService.NavigateTo("UpdateAccount", Employee.Id), () => offlineService.IsOnline, true);
            NavigateBackCommand = new RelayCommand(NavigateBack);

            DeleteCommand          = new RelayCommand(RemoveEmployee);
            OpenDeleteCheckCommand = new RelayCommand(OpenDeletePopup, () => CanDeleteEmployee, true);

            #region Google Search

            _googleService = googleMapsService;
            SearchCommand  = new RelayCommand(Search);
            SelectCommand  = new RelayCommand <string>(Select);

            #endregion
        }
        public CustomerViewModel(ICustomerService customerService, IFrameNavigationService navigationService,
                                 IGoogleMapsService googleMapsService, IOfflineService offlineService)
        {
            _customerService   = customerService;
            _navigationService = navigationService;

            if (_navigationService.Parameter is int customerId)
            {
                Customer          = _customerService.GetCustomer(customerId);
                CanDeleteCustomer = _customerService.CanDeleteCustomer(Customer);
                SaveCommand       = new RelayCommand(UpdateCustomer);
                CurrentAddress    = $"Huidige adres: {Customer.Address}";
            }
            else
            {
                Customer          = new Customer();
                CanDeleteCustomer = false;
                SaveCommand       = new RelayCommand(AddCustomer);
            }

            EditCustomerCommand = new RelayCommand(() => _navigationService.NavigateTo("UpdateCustomer", Customer.Id),
                                                   () => offlineService.IsOnline, true);
            AddFestivalCommand = new RelayCommand(() => _navigationService.NavigateTo("CreateFestival", Customer.Id),
                                                  () => offlineService.IsOnline, true);
            NavigateToCustomerListCommand = new RelayCommand(() => _navigationService.NavigateTo("CustomerList"));
            NavigateToCustomerInfoCommand = new RelayCommand(() => _navigationService.NavigateTo("CustomerInfo", Customer.Id));

            DeleteCommand          = new RelayCommand(RemoveCustomer, () => offlineService.IsOnline, true);
            OpenDeleteCheckCommand = new RelayCommand(OpenDeletePopup, () => CanDeleteCustomer, true);

            customerService.Sync();

            #region Google Search

            _googleService = googleMapsService;
            SearchCommand  = new RelayCommand(Search);
            SelectCommand  = new RelayCommand <string>(Select);

            #endregion
        }
Exemple #13
0
        public InspectionViewModel(
            IInspectionService inspectionService,
            IFrameNavigationService navigationService,
            IGoogleMapsService googleService,
            IOfflineService offlineService
            )
        {
            _inspectionService = inspectionService;
            _navigationService = navigationService;
            _googleService     = googleService;

            CheckBoxCommand      = new RelayCommand <AdvancedEmployee>(CheckBox);
            SaveCommand          = new RelayCommand(Save);
            ReturnCommand        = new RelayCommand(() => _navigationService.NavigateTo("FestivalInfo", Festival.Id));
            OpenDeleteCheckPopup = new RelayCommand(OpenDeletePopup);
            DeleteCommand        = new RelayCommand(DeletePlannedInspection, () => offlineService.IsOnline, true);

            PlannedInspections           = new List <PlannedInspection>();
            Questionnaires               = new List <Questionnaire>();
            OriginalPlannedInspectionIds = new List <int>();

            Task.Run(() => Initialize(_navigationService.Parameter)).Wait();
        }
 public LocationsController(IRepositoryFactory factory, IGoogleMapsService mapsService)
 {
     _repos = factory;
     _gmaps = mapsService;
 }
 public Handler(IPhysicianLookupDbContext context, IGoogleMapsService googleMapsService, IConfiguration configuration)
 {
     _context           = context;
     _googleMapsService = googleMapsService;
     _configuration     = configuration;
 }
Exemple #16
0
 public RestaurantFilterController(IRestaurantUserService restaurants, ICategoryService categories, IGoogleMapsService googleMapsService)
 {
     this.restaurants       = restaurants;
     this.categories        = categories;
     this.googleMapsService = googleMapsService;
 }