Пример #1
0
 public MileageReportService(IRepository rep, IPositionService positionService, IMileageService mileageService, IMapService mapService)
 {
     _rep = rep;
     _positionService = positionService;
     _mileageService = mileageService;
     _mapService = mapService;
 }
Пример #2
0
 public RegistrationService(
     IServiceProvider services,
     IMapService mapService)
 {
     this.services   = services;
     this.mapService = mapService;
 }
        public SelfEmploymentsController(IMapService mapService, IPagerFactory pagerFactory, ISelfEmploymentService selfService)
            : base(mapService, pagerFactory)
        {
            Guard.WhenArgument <ISelfEmploymentService>(selfService, "selfService").IsNull().Throw();

            this.selfService = selfService;
        }
Пример #4
0
        public void Extract(string inputDirectory)
        {
            _mapService = ChickenContainer.Instance.Resolve <IMapService>();
            try
            {
                foreach (FileInfo file in new DirectoryInfo(inputDirectory).GetFiles().OrderBy(s => s.Name.Length).ThenBy(s => s.Name))
                {
                    try
                    {
                        byte[] data = File.ReadAllBytes(file.FullName);
                        var    map  = new MapDto
                        {
                            Name      = file.Name,
                            Id        = short.Parse(file.Name),
                            Width     = BitConverter.ToInt16(data.AsSpan().Slice(0, 2).ToArray(), 0),
                            Height    = BitConverter.ToInt16(data.AsSpan().Slice(2, 2).ToArray(), 0),
                            AllowPvp  = false,
                            AllowShop = false,
                            Grid      = data.AsSpan().Slice(4).ToArray()
                        };
                        _maps.Add(map);
                    }
                    catch (Exception e)
                    {
                        Log.Error("[ADD]", e);
                    }
                }

                _mapService.Save(_maps);
            }
            catch (Exception e)
            {
                Log.Error("[EXTRACT]", e);
            }
        }
Пример #5
0
 public MapController(
     IMapper mapper,
     IMapService mapService
     ) : base(mapper)
 {
     _mapService = mapService;
 }
Пример #6
0
        async private Task <object> MapService2Json(IMapService mapService, IMapServiceSettings settings)
        {
            var status = settings?.Status ?? MapServiceStatus.Running;

            if (status == MapServiceStatus.Running)
            {
                if (!_mapServiceMananger.Instance.IsLoaded(mapService.Name, mapService.Folder))
                {
                    status = MapServiceStatus.Idle;
                }
            }

            bool hasErrors = await _logger.LogFileExists(mapService.Fullname, loggingMethod.error);

            return(new
            {
                name = mapService.Name,
                folder = mapService.Folder,
                status = status.ToString().ToLower(),
                hasSecurity = settings?.AccessRules != null && settings.AccessRules.Length > 0,
                runningSince = settings?.Status == MapServiceStatus.Running && mapService.RunningSinceUtc.HasValue ?
                               mapService.RunningSinceUtc.Value.ToShortDateString() + " " + mapService.RunningSinceUtc.Value.ToLongTimeString() + " (UTC)" :
                               String.Empty,
                hasErrors = hasErrors
            });
        }
Пример #7
0
 public AdminController(IAdminService adminService,
     IUserService userService,
     IBanService banService,
     IBuildingService buildingService,
     IQueueService queueService,
     IUserBuildingService userBuildingService,
     IUserProductService userProductService,
     IMapService mapService,
     IMarketService marketService,
     IDolarService dolarService,
     IDealService dealService,
     INotificationService notificationService,
     IProductService productService,
     IMessageService messageService,
     IProductRequirementsService productRService)
 {
     _adminService = adminService;
     _userService = userService;
     _banService = banService;
     _buildingService = buildingService;
     _queueService = queueService;
     _userBuildingService = userBuildingService;
     _userProductService = userProductService;
     _mapService = mapService;
     _marketService = marketService;
     _dolarService = dolarService;
     _dealService = dealService;
     _notificationService = notificationService;
     _productService = productService;
     _messageService = messageService;
     _productRService = productRService;
 }
Пример #8
0
 public LocationService(IRepository <Location> repository, IRepository <Shift> shiftRepository, IMapService mapService, ILogger <LocationService> logger)
 {
     this.repository      = repository;
     this.shiftRepository = shiftRepository;
     this.mapService      = mapService;
     this.logger          = logger;
 }
Пример #9
0
 public SyncController(
     ILoggerFactory loggerFactory,
     IEventService eventService,
     IEventConferenceDayService eventConferenceDayService,
     IEventConferenceRoomService eventConferenceRoomService,
     IEventConferenceTrackService eventConferenceTrackService,
     IKnowledgeGroupService knowledgeGroupService,
     IKnowledgeEntryService knowledgeEntryService,
     IImageService imageService,
     IDealerService dealerService,
     IAnnouncementService announcementService,
     IMapService mapService
     )
 {
     _logger = loggerFactory.CreateLogger(GetType());
     _eventConferenceTrackService = eventConferenceTrackService;
     _eventConferenceRoomService  = eventConferenceRoomService;
     _eventConferenceDayService   = eventConferenceDayService;
     _eventService          = eventService;
     _knowledgeGroupService = knowledgeGroupService;
     _knowledgeEntryService = knowledgeEntryService;
     _imageService          = imageService;
     _dealerService         = dealerService;
     _announcementService   = announcementService;
     _mapService            = mapService;
 }
Пример #10
0
        public async Task <ActionResult <Map> > Delete(
            int id,
            [FromServices] IMapService MapService)
        {
            try
            {
                var map = await MapService.GetById(id);

                if (map == null)
                {
                    return(NotFound(new { message = Messages.MAPA_NAO_ENCONTRADO }));
                }

                await MapService.Delete(map);

                return(Ok(new { message = Messages.MAPA_REMOVIDO_COM_SUCESSO }));
            }
            catch (InvalidOperationException ex)
            {
                return(BadRequest(new { message = ex.Message }));
            }
            catch
            {
                return(BadRequest(new { message = Messages.OCORREU_UM_ERRO_INESPERADO }));
            }
        }
Пример #11
0
        public async Task <ActionResult <Map> > Update(
            int id,
            [FromServices] IMapService MapService,
            [FromBody] Map map)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            if (id != map.Id)
            {
                return(NotFound(new { Messages.MAPA_NAO_ENCONTRADO }));
            }

            try
            {
                await MapService.Update(map);

                return(map);
            }
            catch (InvalidOperationException ex)
            {
                return(BadRequest(new { message = ex.Message }));
            }
            catch
            {
                return(BadRequest(new { message = Messages.NAO_FOI_POSSIVEL_ATUALIZAR_O_MAPA }));
            }
        }
Пример #12
0
        public MapViewModel(MapPage page, IMapService mapService)
        {
            this.mapService             = mapService;
            geoLocator                  = CrossGeolocator.Current;
            geoLocator.PositionChanged += GeoLocatorOnPositionChanged;
            page.Appearing             += OnAppearing;
            page.Disappearing          += OnDisappearing;
            map = new Xamarin.Forms.GoogleMaps.Map
            {
                HeightRequest     = 100,
                WidthRequest      = 960,
                VerticalOptions   = LayoutOptions.FillAndExpand,
                MapType           = MapType.Hybrid,
                MyLocationEnabled = true,
                IsTrafficEnabled  = true,
                UiSettings        =
                {
                    CompassEnabled          = true,
                    MyLocationButtonEnabled = true,
                    ZoomControlsEnabled     = true
                }
            };
            var stack = new StackLayout {
                Spacing = 0
            };

            stack.Children.Add(map);
            page.Content = stack;
        }
Пример #13
0
        public ActionResult urunEkle(Product product, HttpPostedFileBase file)
        {
            if (file != null && file.ContentLength > 0)
            {
                var path = Path.Combine(Server.MapPath("~/img"), file.FileName);
                file.SaveAs(path);
                TempData["result"] = "Güncelleme Başarılı.";
            }

            IProductService productService = Business.IocUtil.Resolve <IProductService>();
            string          userName       = Session["kullaniciAdi"].ToString();

            product.PublishDate = DateTime.Now;

            product.ImagePath = Path.Combine(Server.MapPath("~/img"), file.FileName);
            IMapService mapService = IocUtil.Resolve <IMapService>();

            mapService.FillAddress(product);
            bool added = productService.Add(userName, product);

            if (added)
            {
                return(Redirect("User/Index"));
            }
            else
            {
                return(View());
            }
        }
Пример #14
0
        public UsersController(IMapService mapService, IPagerFactory pagerFactory, IUserService userService)
            : base(mapService, pagerFactory)
        {
            Guard.WhenArgument <IUserService>(userService, "userService").IsNull().Throw();

            this.userService = userService;
        }
        public DemoHeatmapViewModel(IDialogService dialogService, ICacheService cacheService, IMapService mapService)
        {
            _dialogService = dialogService;
            _cacheService  = cacheService;
            _mapService    = mapService;
            EventSelectors.Add(new ComboboxSelector("kills", Properties.Resources.Kills));
            EventSelectors.Add(new ComboboxSelector("deaths", Properties.Resources.Deaths));
            EventSelectors.Add(new ComboboxSelector("shots", Properties.Resources.ShotsFired));
            EventSelectors.Add(new ComboboxSelector("flashbangs", Properties.Resources.Flashbangs));
            EventSelectors.Add(new ComboboxSelector("he", Properties.Resources.HeGrenades));
            EventSelectors.Add(new ComboboxSelector("smokes", Properties.Resources.Smokes));
            EventSelectors.Add(new ComboboxSelector("molotovs", Properties.Resources.Molotovs));
            EventSelectors.Add(new ComboboxSelector("incendiaries", Properties.Resources.Incendiaries));
            EventSelectors.Add(new ComboboxSelector("decoys", Properties.Resources.Decoys));
            CurrentEventSelector = EventSelectors[0];

            if (IsInDesignMode)
            {
                DispatcherHelper.Initialize();
                DispatcherHelper.CheckBeginInvokeOnUI(async() =>
                {
                    await LoadData();
                });
            }
        }
Пример #16
0
        /// <summary>
        /// Initializes a new instance of the <see cref="CollisionService" /> class.
        /// </summary>
        /// <param name="entityService">The entity service.</param>
        /// <param name="mapService">The map service.</param>
        /// <param name="renderService">The render service.</param>
        /// <param name="varService">The variable service.</param>
        public CollisionService(IEntityService entityService, IMapService mapService, IRenderService renderService, IVariableService varService)
        {
            if (entityService == null)
            {
                throw new ArgumentNullException(nameof(entityService));
            }

            if (mapService == null)
            {
                throw new ArgumentNullException(nameof(mapService));
            }

            if (renderService == null)
            {
                throw new ArgumentNullException(nameof(renderService));
            }

            if (varService == null)
            {
                throw new ArgumentNullException(nameof(varService));
            }

            _entityService = entityService;
            _mapService    = mapService;
            _renderService = renderService;
            _varService    = varService;

            _quadPool    = new QuadtreePool();
            _entListPool = new ObjectPool <List <GameEntity> >(() => new List <GameEntity>(10));

            _varShowTracelines = _varService.GetVar <bool>("r_showtracelines");
        }
Пример #17
0
 public OnAreaExit(
     ISkillService skill,
     IMapService map)
 {
     _skill = skill;
     _map   = map;
 }
Пример #18
0
        public DemoStuffsViewModel(
            DialogService dialogService, ICacheService cacheService, IStuffService stuffService,
            IMapService mapService)
        {
            _dialogService = dialogService;
            _cacheService  = cacheService;
            _stuffService  = stuffService;
            _mapService    = mapService;

            StuffSelectors.Add(new ComboboxSelector("smokes", "Smokes"));
            StuffSelectors.Add(new ComboboxSelector("flashbangs", "Flashbangs"));
            StuffSelectors.Add(new ComboboxSelector("he", "HE Grenades"));
            StuffSelectors.Add(new ComboboxSelector("molotovs", "Molotovs"));
            StuffSelectors.Add(new ComboboxSelector("decoys", "Decoys"));
            CurrentStuffSelector = StuffSelectors[0];

            if (IsInDesignMode)
            {
                CurrentStuffSelector = StuffSelectors[1];
                DispatcherHelper.CheckBeginInvokeOnUI(async() =>
                {
                    await LoadData();
                    SelectedStuff = Stuffs[10];
                });
            }
        }
        public AlarmRouteViewModel(Einsatz _einsatz)
        {
            try
            {
                //Load logo as image
                using (var _memoryStream = new MemoryStream())
                {
                    var _resourceStream =
                        Application.GetResourceStream(new Uri(@"Resources/Image.Logo.png", UriKind.RelativeOrAbsolute));
                    _resourceStream.Stream.CopyTo(_memoryStream);
                    Image = _memoryStream.ToArray();
                }

                einsatzGuid = _einsatz.Guid;

                mapService = ServiceLocator.Current.GetInstance <IMapService>();
                if (mapService != null)
                {
                    mapService.Finished += (sender, e) => DispatcherHelper.CheckBeginInvokeOnUI(() =>
                    {
                        mapService_Finished(sender, e);
                    });
                }
            }
            catch (Exception ex)
            {
                Logger.WriteError(MethodBase.GetCurrentMethod(), ex);
            }
        }
Пример #20
0
        public MapViewModel(IWindowService windowService,
                            IMapService mapService, IPackageService packageService, IImportService importService, ILoadService loadService,
                            IFormService formService, IClientConfigurationProvider clientConfigurationProvider)
        {
            this.loadService = loadService;
            this.formService = formService;
            this.clientConfigurationProvider = clientConfigurationProvider;
            this.windowService    = windowService;
            this.JSEventContainer = formService;
            this.ScriptingObject  = mapService;

            loadService.PackageLoaded            += LoadServiceOnPackageLoaded;
            loadService.PackageUnloaded          += LoadServiceOnPackageUnLoaded;
            loadService.PackageDescriptorChanged += new EventHandler(packageService_PackageDescriptorChanged);
            loadService.MobileChanged            += loadServiceMobileChanged;

            OpenHelpWindowCommand = new DelegateCommand(() => windowService.OpenHelpWindow(HelpFileNames.ZustandsabschnittMapHelpPage));
            //OpenLegendWindowAllCommand = new DelegateCommand(() => windowService.OpenLegendWindowAll());
            //all changes to an Observable Collection must be done by the same Thread it was created by, becaus of Thread Affinity
            Action action = new Action(() => { InspektionsroutenDictionary = new CollectionView(new ObservableCollection <XMLKeyValuePair <Guid, string> >()); });

            Application.Current.Dispatcher.Invoke(action);
            this.IsVisible = false;
            this.setDefaultHtmlSource();

            mapService.ShowLegend += onOpenLegendWindow;
        }
Пример #21
0
        public FormViewModel(
            IWindowService windowService,
            IMapService mapService,
            IDTOService dtoService,
            ISchadenMetadatenService schadenMetadatenService,
            IFormService formService,
            IMessageBoxService messageBoxService,
            IGeoJsonService geoJsonService)
        {
            this.windowService           = windowService;
            this.dtoService              = dtoService;
            this.schadenMetadatenService = schadenMetadatenService;
            this.formService             = formService;
            this.messageBoxService       = messageBoxService;
            this.geoJsonService          = geoJsonService;

            mapService.ZustandsabschnittSelected  += MapServiceOnZustandsabschnittSelected;
            mapService.ZustandsabschnittChanged   += MapServiceOnZustandsabschnittChanged;
            mapService.ZustandsabschnittCreated   += MapServiceOnZustandsabschnittCreated;
            mapService.ZustandsabschnittCancelled += MapServiceOnZustandsabschnittCancelled;
            mapService.StrassenabschnittSelected  += MapServiceOnStrassenabschnittSelected;
            mapService.ZustandsabschnittDeleted   += MapServiceOnZustandsabschnittDeleted;
            IsVisible = false;

            formService.GettingFormHasChanges += (sender, args) =>
            {
                args.HasFormChanges = ZustandsabschnittViewModel != null && ZustandsabschnittViewModel.HasChanges;
            };
        }
        public EmployeeAdminController(IMapService mapService, IPagerFactory pagerFactory, IEmployeeService employeeService)
            : base(mapService, pagerFactory)
        {
            Guard.WhenArgument <IEmployeeService>(employeeService, "employeeService").IsNull().Throw();

            this.employeeService = employeeService;
        }
Пример #23
0
 public OnAreaEnter(
     IPlayerService player,
     IMapService map)
 {
     _player = player;
     _map    = map;
 }
Пример #24
0
 public MapApiController(
     IMapService mapService,
     ILoginUserRepository loginUserRepository
     ) : base(loginUserRepository)
 {
     _mapService = mapService;
 }
Пример #25
0
        public BillsController(IMapService mapService, IPagerFactory pagerFactory, IRemunerationBillService billService)
            : base(mapService, pagerFactory)
        {
            Guard.WhenArgument <IRemunerationBillService>(billService, "billService").IsNull().Throw();

            this.billService = billService;
        }
Пример #26
0
        public static bool PermissionESGSpecial()
        {
            string      userLoginName = IDBContext.Current.UserName;
            IMapService _mapService   = Globals.Resolve <IMapService>();
            var         result        = _mapService.PermissionESGTeamMember(userLoginName);

            return(result.IsESGRole);
        }
Пример #27
0
 public GalaxyHub(IAuthenticationService authService, IObjectService objectService, IGameService gameService, IMapService mapService, ILootService lootService)
 {
     _lootService   = lootService;
     _authService   = authService;
     _gameService   = gameService;
     _objectService = objectService;
     _mapService    = mapService;
 }
Пример #28
0
    public BattleConfigViewModel(IMapService mapService, IJumpService jumpService)
    {
        _model = new BattleConfig();

        MapItems = mapService.GetMapIds();

        JumpToMapCommand = new RelayCommand <MapId>(id => jumpService.JumpTo(MapSelectorEditorModule.Id, (int)id));
    }
        public EmployeesController(IMapService mapService, IEmployeeService employeeService)
        {
            Guard.WhenArgument(mapService, "mapService").IsNull().Throw();
            Guard.WhenArgument(employeeService, "employeeService").IsNull().Throw();

            this.mapService      = mapService;
            this.employeeService = employeeService;
        }
Пример #30
0
        /// <summary>
        /// Creates a new SearchProvider.
        /// </summary>
        public SearchProvider(IMapService mapService)
        {
            _mapService = mapService;

            AnySearchResults = true;

            Messenger.Send(new CommandLoggingRequest(this));
        }
Пример #31
0
        public BaseController(IMapService mapService, IPagerFactory pagerFactory)
        {
            Guard.WhenArgument <IMapService>(mapService, "mapService").IsNull().Throw();
            Guard.WhenArgument <IPagerFactory>(pagerFactory, "pagerFactory").IsNull().Throw();

            this.mapService   = mapService;
            this.pagerFactory = pagerFactory;
        }
Пример #32
0
 public LineService(IRepository rep, ICacheService cacheService, IMapService mapService, IPositionService positionService, IMileageService mileageService)
 {
     _rep = rep;
     _cacheService = cacheService;
     _mapService = mapService;
     _positionService = positionService;
     _mileageService = mileageService;
 }
Пример #33
0
 public AjaxController(IMapService mapService, IUserBuildingService userBuildingService, IProductService productService, IBuildingHelper buildingsHelper, INotificationService notificationService)
 {
     _mapService = mapService;
     _userBuildingsService = userBuildingService;
     _buildingsHelper = buildingsHelper;
     _productService = productService;
     _notificationService = notificationService;
 }
Пример #34
0
 public MapAppService(
     IMongoDbRepository <Map, long> mapRepository,
     IMapService mapService
     )
 {
     _mapRepository = mapRepository;
     _mapService    = mapService;
 }
 public TripController(ITripRepository tripRepository,
     IUserRepository userRepository,
     IMapService mapService,
     IEmailService emailService)
 {
     _tripRepository = tripRepository;
     _userRepository = userRepository;
     _mapService = mapService;
     _emailService = emailService;
 }
        public void Initialize()
        {
            // Composition root, manual setup
            //memoryDatabase = memoryDatabase ?? new MemoryDatabase("TestData/Points.csv");
            //mapService = mapService ?? new MapService(memoryDatabase);

            // Composition root-ish, using same setup as web
            bootstrap = bootstrap ?? new Bootstrap();
            bootstrap.Configure("TestData/Points.csv");
            memoryDatabase = memoryDatabase ?? bootstrap.Container.Resolve<IPointsDatabase>();
            mapService = mapService ?? bootstrap.Container.Resolve<IMapService>();
        }
Пример #37
0
 public MapController(IMapService mapService,
     IBusLineService busLineService,
     IBusMarkerService busMarkerService,
     IRideOfferMarkerService rideOfferMarkerService,
     IRideRequestMarkerService rideRequestMarkerService,
     IHelpMarkerService helpMarkerService)
 {
     this.mapService = mapService;
     this.busLineService = busLineService;
     this.busMarkerService = busMarkerService;
     this.rideOfferMarkerService = rideOfferMarkerService;
     this.rideRequestMarkerService = rideRequestMarkerService;
     this.helpMarkerService = helpMarkerService;
 }
Пример #38
0
 public OfficeController(IUserBuildingService userBuildingService,
     IMarketService marketService,
     IUserProductService userProductService,
     INotificationService notificationService,
     IProductRequirementsService productRequirementService,
     IBuildingHelper buildingsHelper,
     IProductService productService,
     IMapService mapService,
     IUserService userService,
     IDealService dealService,
     ITutorialService tutorialService)
 {
     _userBuildingService = userBuildingService;
     _userProductService = userProductService;
     _marketService = marketService;
     _notificationService = notificationService;
     _dealService = dealService;
     _buildingsHelper = buildingsHelper;
     _productService = productService;
     _mapService = mapService;
     _userService = userService;
     _productRequirementService = productRequirementService;
     _tutorialService = tutorialService;
 }
Пример #39
0
 public ApiController(IMapService mapService)
 {
     _mapService =mapService;
 }
Пример #40
0
        protected override void Initialize(RequestContext requestContext)
        {
            if (mapService == null) { mapService = new MapService(); }

            base.Initialize(requestContext);
        }
	    public HomeController(IMapService mapService)
	    {
		    _mapService = mapService;
	    }
Пример #42
0
 public ATravelService(IRepository rep, IMapService mapService)
 {
     _rep = rep;
     _mapService = mapService;
 }
		public ParkingController()
		{
			_parkService = new ParkService();
			_adsService = new AdsService();
			_mapService = new MapService(_parkService);
		}
 public GeoLocationController(IMapService mapService)
 {
     this.mapService = mapService;
 }
Пример #45
0
 public MapController(IMapService mapService, IBuildingHelper buildings, IProductService productService)
 {
     _mapService = mapService;
     _buildingsHelper = buildings;
     _productService = productService;
 }
 public MainController(IMapService mapService)
 {
     _mapService = mapService;
 }
Пример #47
0
 public MileageService(IMapService mapService)
 {
     _mapService = mapService;
 }
Пример #48
0
 private string InverseGeocoding(IMapService mapService, double lat, double lon)
 {
     try
     {
         var location = mapService.InverseGeocoding(lat.ToString(), lon.ToString());
         if (location == null)
         {
             return string.Empty;
         }
         return location.ToString();
     }
     catch (Exception ex)
     {
         Logger.Error("报表中心--根据经纬度查询地址错误", ex);
         return string.Empty;
     }
 }
		/// <summary>
		/// IoC
		/// </summary>
		/// <param name="mapService"></param>
		public JsonController(IMapService mapService)
		{
			_mapService = mapService;
		}
Пример #50
0
 public PositionService(
     IRepository rep,
     IMapService mapService,
     IMileageService mileageService, INodeService nodeService)
 {
     _rep = rep;
     _mapService = mapService;
     _mileageService = mileageService;
     _nodeService = nodeService;
 }
Пример #51
0
 public AreaService(IRepository rep, ICacheService cacheService, IMapService mapService)
 {
     _rep = rep;
     _cacheService = cacheService;
     _mapService = mapService;
 }