/// <summary>
 /// Initializes a new instance of the <see cref="Context" /> class.
 /// </summary>
 /// <param name="configuration">The configuration string.</param>
 /// <param name="serializer">The serializer.</param>
 /// <param name="log">The textwriter to use for logging purposes.</param>
 public Context(string configuration, ISerializer serializer, TextWriter log)
 {
     _internalContext = new RedisProviderContext(configuration, serializer, log);
     _collectionProvider = new RedisCollectionProvider(_internalContext);
     _cacheProvider = new RedisCacheProvider(_internalContext);
     _geoProvider = new RedisGeoProvider(_internalContext);
     _pubsubProvider = new RedisPubSubProvider(_internalContext);
 }
Exemple #2
0
 public ColorSetUpFrom(IGeoProvider provider, ITrafficMap map, ITrafficEvent trafficEvent, bool visible)
 {
     this.InitializeComponent();
     this.m_GeoProvider = provider;
     this.m_TrafficEvent = trafficEvent;
     this.m_TrafficMap = map;
     this.m_BindingPolygons = TrafficMapView.GetSelectedPolygon(map);
     this.m_NodeVisible = visible;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="Context" /> class injecting the connection multiplexer to use.
 /// </summary>
 /// <param name="connection">The connection multiplexer to use.</param>
 /// <param name="serializer">The serializer.</param>
 public RedisContext(IConnectionMultiplexer connection)
 {
     _internalContext    = new RedisProviderContext(connection, new JsonSerializer());
     _cacheProvider      = new RedisCacheProvider(_internalContext);
     _collectionProvider = new RedisCollectionProvider(_internalContext, _cacheProvider);
     _geoProvider        = new RedisGeoProvider(_internalContext, _cacheProvider);
     _pubsubProvider     = new RedisPubSubProvider(_internalContext);
     _keyEventsProvider  = new RedisKeyEventsProvider(_internalContext);
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="Context" /> class.
 /// </summary>
 /// <param name="configuration">The configuration object.</param>
 /// <param name="serializer">The serializer.</param>
 /// <param name="log">The textwriter to use for logging purposes.</param>
 public RedisContext(ConfigurationOptions configuration, ISerializer serializer, TextWriter log)
 {
     _internalContext    = new RedisProviderContext(configuration, serializer, log);
     _cacheProvider      = new RedisCacheProvider(_internalContext);
     _collectionProvider = new RedisCollectionProvider(_internalContext, _cacheProvider);
     _geoProvider        = new RedisGeoProvider(_internalContext, _cacheProvider);
     _pubsubProvider     = new RedisPubSubProvider(_internalContext);
     _keyEventsProvider  = new RedisKeyEventsProvider(_internalContext);
 }
Exemple #5
0
 public ExportPrediction(ControllerMgr predictionGroupsManager, IApplicationContext appContext, TreeNode rootnode, string basicStudyName)
 {
     this.m_ControllerMgr = predictionGroupsManager;
     this.m_appContext = appContext;
     this.m_IProjectManager = ServiceHelper.Lookup<IProjectManager>(appContext);
     this.m_geoProvider = ServiceHelper.Lookup<IGeoProvider>(appContext);
     this.m_Tranceiverlist = ServiceHelper.Lookup<IPrediction>(appContext).TranceiverList;
     this.m_StatusBarService = ServiceHelper.Lookup<IStatusBarService>(appContext);
     this.m_rootnode = rootnode;
     this.m_BasicStudyName = basicStudyName;
 }
Exemple #6
0
 public TrafficMapView(IApplicationContext context, List<NetWorkType> netWorkTypeList)
 {
     this.m_ServiceContext = context;
     this.m_NetWorkTypeList = netWorkTypeList;
     this.m_GeoProvider = context.Lookup(typeof(IDataProvider).FullName) as IDataProvider;
     this.m_TrafficMapService = context.Lookup(typeof(ITrafficMapModelService).FullName) as ITrafficMapModelService;
     this.m_GeoDataProvider = new GeoDataObserver(this.m_GeoProvider).GeoProvider;
     this.m_TrafficEvent = ServiceHelper.Lookup<ITrafficEvent>(context);
     this.InitializeComponent();
     this.Init();
 }
Exemple #7
0
 public ASHttpModule(ISettingManager settingManager,
                     IContextProvider httpContextProvider,
                     ILogger logger,
                     IRequestLogger requestLogger,
                     IGeoProvider geoProvider)
 {
     this._settingManager      = settingManager;
     this._geoProvider         = geoProvider;
     this._requestLogger       = requestLogger;
     this._httpContextProvider = httpContextProvider;
     this._logger = logger;
 }
        /// <summary> Initializes a new instance of the <see cref="SelectionCanvas"/> class. </summary>
        /// <param name="mapView"> The parent map content. </param>
        /// <param name="provider"> The provider to query the geo data source. </param>
        /// <param name="geometries"> All selected geometries. </param>
        public SelectionCanvas(MapView mapView, IGeoProvider provider, ObservableCollection <Geometry> geometries)
            : base(mapView)
        {
            this.provider   = provider;
            this.geometries = geometries;

            geometries.CollectionChanged += geometries_CollectionChanged;

            if (MapView.Name == "Map") // only select on main map
            {
                MapView.MouseDown += map_MouseDown;
            }
        }
Exemple #9
0
        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="tdGroupMgr"></param>
        public TDSCDMAPropertyForm(IPredictionGroup group)
        {
            InitializeComponent();
            m_tdPredicGroup = (TDPredictionGroup)group;
            m_appContext = m_tdPredicGroup.appContext;
            m_TDUIParam = m_tdPredicGroup.tdUIParam;
            m_TranfficForApplication = ServiceHelper.Lookup<ITrafficForApplication>(m_appContext);
            m_GeoProvider = ServiceHelper.Lookup<IGeoProvider>(m_appContext);

            m_tdTerminalList = m_TranfficForApplication.FindTerminalList(NetWorkType.TDSCDMA);
            m_CsServiceList = m_TranfficForApplication.UnionCsServiceList;
            m_PsServiceList = m_TranfficForApplication.UnionPsServiceList;

            Init();
        }
Exemple #10
0
 private void InitViewValue()
 {
     m_AppContext = m_GsmPredicGroup.AppContext;
     m_TranfficForApplication = ServiceHelper.Lookup<ITrafficForApplication>((m_AppContext));
     m_GeoProvider = ServiceHelper.Lookup<IGeoProvider>((m_AppContext));
     m_GSMUIParam = m_GsmPredicGroup.CovUIParam;
     m_GsmTerminalList = m_TranfficForApplication.FindTerminalList(NetWorkType.GSM);
     m_CsService = m_TranfficForApplication.UnionCsServiceList;
     m_PsService = m_TranfficForApplication.UnionPsServiceList;
     m_GsmMobilityList = m_TranfficForApplication.MobilityList;
     txtName.Text = m_GsmPredicGroup.Name;
     txtName.ReadOnly = true;
     nudResolution.Value = Convert.ToDecimal(m_GsmPredicGroup.Resolution);
     btnApply.Enabled = false;
     ntxtRxSensitivity.Value = (decimal)m_GsmPredicGroup.RxSensitivity;
     ntxtMaxSensitivity.Value = (decimal)m_GsmPredicGroup.MaxSensitivity;
     propertyGrid.SelectedObject = m_GSMUIParam;
 }
Exemple #11
0
 public PredictionReportForm(ControllerMgr pgm, IApplicationContext appContext, TreeNode rootNode)
 {
     this.m_AppContext = appContext;
     this.m_IGeoProvider = ServiceHelper.Lookup<IGeoProvider>(this.m_AppContext);
     this.m_IProjectManager = ServiceHelper.Lookup<IProjectManager>(this.m_AppContext);
     this.m_IAnalyDispEvent = ServiceHelper.Lookup<IAnalyDispEvent>(this.m_AppContext);
     this.m_EventViewService = ServiceHelper.Lookup<IEventViewService>(this.m_AppContext);
     this.m_ControllerMgr = pgm;
     this.psm = new PredictionStatisticsManager(this.m_AppContext);
     this.m_rootNode = rootNode;
     this.InitializeComponent();
     this.GetClutter();
     this.ExportDataDisplay();
     this.dgvExpoertData.AllowUserToAddRows = false;
     this.dgvExpoertData.AllowUserToDeleteRows = false;
     this.dgvExpoertData.ServiceCustom.ServiceCustomDic[DgvServiceEnum.RecordProperties] = false;
     this.dgvExpoertData.ServiceCustom.ServiceCustomDic[DgvServiceEnum.Copy] = false;
     this.dgvExpoertData.ServiceCustom.ServiceCustomDic[DgvServiceEnum.Paste] = false;
 }
Exemple #12
0
        public List <IGeoProvider> Load()
        {
            List <IGeoProvider> list = new List <IGeoProvider>();

            Config.GeoCodingConfigurationSection config = null;

            config = System.Configuration.ConfigurationManager.GetSection(Config.GeoCodingConfigurationSection.SECTION_KEY) as Config.GeoCodingConfigurationSection;
            foreach (var item in config.Providers)
            {
                Config.GeoProviderConfigurationElement element = item as Config.GeoProviderConfigurationElement;
                Type currentType = Type.GetType(element.Type);

                IGeoProvider provider = Activator.CreateInstance(currentType) as IGeoProvider;

                if (provider != null)
                {
                    provider.Key = element.ApiKey;
                    list.Add(provider);
                }
            }

            return(list);
        }
 public bool Remove(IGeoProvider item)
 {
     return(this._providers.Remove(item));
 }
Exemple #14
0
 public GeoCoder AddProvider(IGeoProvider provider)
 {
     providers.Add(provider);
     return this;
 }
Exemple #15
0
 public GeoCoder(IGeoProvider provider)
     : this()
 {
     AddProvider(provider);
 }
Exemple #16
0
 public GeoCoder AddProvider(IGeoProvider provider)
 {
     providers.Add(provider);
     return(this);
 }
Exemple #17
0
 public GeoCoder(IGeoProvider provider) : this()
 {
     AddProvider(provider);
 }
 public LteGroupPropertyControl(IApplicationContext appContext)
 {
     this.m_GeoProvider = ServiceHelper.Lookup<IGeoProvider>(appContext);
     this.m_ITraffic = ServiceHelper.Lookup<ITrafficForApplication>(appContext);
 }
Exemple #19
0
 public void Update(IGeoProvider geoProvider)
 {
     this.m_GeoProvider = geoProvider;
 }
Exemple #20
0
 public void Update(IGeoProvider geoProvider)
 {
     this.m_GeoProvider = geoProvider;
     this.UpdateClutterMap();
     this.GetVectorList();
     this.ProcessSelectedVector();
 }
Exemple #21
0
 public FormsService(IFormRepository repository, IGeoProvider provider)
 {
     _IformRepository = repository ?? throw new ArgumentNullException(nameof(repository));
     _IGeoProvider    = provider ?? throw new ArgumentNullException(nameof(provider));
 }
 public void Add(IGeoProvider item)
 {
     this._providers.Add(item);
 }
Exemple #23
0
 public HotpepperApp(IGeoProvider geoProvider, IHotpepperClient hotpepperClient)
 {
     this.GeoProvider     = geoProvider;
     this.HotpepperClient = hotpepperClient;
 }
 private void init(TreeNode selectNode, OtherSubSysInterface otherSubSysInterface, PredictionGroupsManager predictionGroupsManager, bool isGroup)
 {
     this.m_selectNode = selectNode;
     this.m_isGroup = isGroup;
     this.m_SubSysInterface = otherSubSysInterface;
     this.m_PredictionGroupsManager = predictionGroupsManager;
     this.m_letcelllist = this.m_SubSysInterface.INet.TranceiverList;
     this.geoProvider = this.m_SubSysInterface.IGis.GeoProvider;
     if (this.m_isGroup)
     {
         this.m_PredictionGroup = this.m_PredictionGroupsManager.Find(this.m_selectNode.Text);
     }
     else
     {
         this.m_PredictionGroup = this.m_PredictionGroupsManager.Find(this.m_selectNode.Parent.Text);
     }
     this.m_SelectedMaxMinValue = new List<MaxMinValue>();
     this.m_MaxMinList = new List<MaxMinValue>();
     this.m_study = this.GetPredictionStudy();
     if (this.m_study != null)
     {
         int displayTypeIndex = this.m_study.StudyLegend.DisplayTypeIndex;
         this.m_MaxMinList.AddRange(this.m_study.StudyLegend.ValueIntervals[this.m_study.StudyLegend.FieldItem[displayTypeIndex]].ValueIntervalsField.Keys);
     }
     else
     {
         MaxMinValue item = new MaxMinValue();
         item.min = 0f;
         item.max = 32767f;
         this.m_MaxMinList.Add(item);
         MaxMinValue value3 = new MaxMinValue();
         value3.min = -5000f;
         value3.max = 0f;
         this.m_MaxMinList.Add(value3);
         MaxMinValue value4 = new MaxMinValue();
         value4.min = -8000f;
         value4.max = -5000f;
         this.m_MaxMinList.Add(value4);
         MaxMinValue value5 = new MaxMinValue();
         value5.min = -9000f;
         value5.max = -8000f;
         this.m_MaxMinList.Add(value5);
         MaxMinValue value6 = new MaxMinValue();
         value6.min = -10000f;
         value6.max = -9000f;
         this.m_MaxMinList.Add(value6);
         MaxMinValue value7 = new MaxMinValue();
         value7.min = -10500f;
         value7.max = -10000f;
         this.m_MaxMinList.Add(value7);
         MaxMinValue value8 = new MaxMinValue();
         value8.min = -11000f;
         value8.max = -10500f;
         this.m_MaxMinList.Add(value8);
         MaxMinValue value9 = new MaxMinValue();
         value9.min = -12000f;
         value9.max = -11000f;
         this.m_MaxMinList.Add(value9);
         MaxMinValue value10 = new MaxMinValue();
         value10.min = -32768f;
         value10.max = -12000f;
         this.m_MaxMinList.Add(value10);
     }
 }
 public bool Contains(IGeoProvider item)
 {
     return(this._providers.Contains(item));
 }
Exemple #26
0
        // GET api/<controller>
        public IGeoCodeResult Query(GeoQuery q)
        {
            string             key      = string.Empty;
            string             query    = string.Empty;
            string             provider = "Google";
            IGeoProviderConfig config;
            IGeoProvider       GeoProvider = null;

            IGeoCodeResult result = new GeoCodeResult();


            if (!String.IsNullOrEmpty(q.Query) && !String.IsNullOrEmpty(q.Providers))
            {
                query = q.Query;
                // we have a search
                provider = q.Providers.Replace("KEY", "");
                if (q.Providers.Contains("KEY"))
                {
                    key = q.Key;
                }

                switch (provider)
                {
                case "Google":
                    config      = new GoogleGmapConfig();
                    GeoProvider = new GoogleGmap(config);
                    break;

                case "Bing":
                    config      = new BingMapConfig().SetKey(key);
                    GeoProvider = new BingMap(config);
                    break;

                case "MapQuest":
                    config      = new MapQuestConfig().SetKey(key);
                    GeoProvider = new MapQuestMap(config);
                    break;

                case "Open Streets":
                    config      = new OpenStreetMapConfig().SetUserAgent("your email here yo");
                    GeoProvider = new OpenStreetMap(config);
                    break;

                case "YahooPlaces":
                    config      = new YahooPlaceFinderConfig().SetKey(key);
                    GeoProvider = new YahooPlaceFinder(config);
                    break;

                case "CloudMade":
                    config      = new CloudMadeConfig().SetKey(key);
                    GeoProvider = new CloudMade(config);
                    break;
                }

                GeoProvider = GeoProvider != null ? GeoProvider : new GoogleGmap();

                GeoCoder gc = new GeoCoder(GeoProvider);

                result = gc.GetCoordinates(query);
            }
            return(result);
        }
 private void Init(IApplicationContext appContext, ControllerMgr controllerMgr)
 {
     this.m_appContext = appContext;
     this.m_ControllerMgr = controllerMgr;
     this.m_IGeoProvider = ServiceHelper.Lookup<IGeoProvider>(appContext);
     this.m_Tranceiverlist = ServiceHelper.Lookup<IPrediction>(appContext).TranceiverList;
     this.m_StatusBarService = ServiceHelper.Lookup<IStatusBarService>(appContext);
     this.m_polygonRegionlist = this.m_IGeoProvider.PolygonRegionList;
     this.m_IProjectManager = ServiceHelper.Lookup<IProjectManager>(appContext);
     this.lsbPolygonList.Items.Add("Full Map");
     this.lsbPolygonList.SelectedIndex = 0;
     foreach (GeoPolygonRegion region in this.m_polygonRegionlist)
     {
         this.lsbPolygonList.Items.Add(region.Name);
     }
 }
Exemple #28
0
 public void Update(IGeoProvider provider)
 {
     this.m_ClutterManagement.UpdateGeoInfoIDName(provider.GetGeoInfo.GetAllClutter());
 }