private void OnCloseSearchDialog() { object[] array = GameSection.GetEventData() as object[]; if (array != null) { searchType = tmpSearchType; if ((bool)array[0]) { int nowPage = (int)array[1]; FriendSearchResult friendSearchResult = array[2] as FriendSearchResult; recvList = ChangeData(friendSearchResult.search); pageNumMax = friendSearchResult.pageNumMax; base.nowPage = nowPage; if (searchType == SEARCH_TYPE.ID) { searchID = (array[3] as string); } else if (searchType == SEARCH_TYPE.NAME) { searchName = (array[3] as string); } RefreshUI(); } } }
private void SearchPrefabs(SEARCH_TYPE searchType) { fileNameList.Clear(); var guids = AssetDatabase.FindAssets("t:prefab"); foreach (var guid in guids) { var path = AssetDatabase.GUIDToAssetPath(guid); var obj = AssetDatabase.LoadAssetAtPath(path, typeof(GameObject)) as GameObject; bool result = false; { switch (searchType) { case SEARCH_TYPE.MISSING_SPRITE: result = HasMissingSprite(obj); break; case SEARCH_TYPE.MISSING_COMPONENT: result = HasMissingComponent(obj); break; } } if (result) { fileNameList.Add(obj.name); } } }
public void SearchForPlate(SEARCH_TYPE type, string searchNumber, string cameraNameFilter, DateTime start, DateTime end, int minMatchScore, SEARCH_PROGRESS_DEL progressCallBack, SEARCH_COMPLETE_DEL completeCB) { m_SearchStopped = false; m_MinMatchScore = minMatchScore; m_SearchProgressCB = progressCallBack; m_SearchCompleteCB = completeCB; m_CameraNameFilter = cameraNameFilter; m_SearchString = searchNumber; m_SearchStartTime = start; m_SearchEndTime = end; m_SearchType = type; if (m_SearchType == SEARCH_TYPE.MOTION || m_SearchType == SEARCH_TYPE.PLATE) { m_SearchThread = new Thread(SearchFilesLoop); } else if (m_SearchType == SEARCH_TYPE.ALL_IMAGES) { m_SearchThread = new Thread(DumpImagesInRangeLoop); } m_Stop = false; m_SearchThread.Start(); }
private void OnQuery_AUTO_SEARCH() { GameSection.StayEvent(); searchType = SEARCH_TYPE.AUTO; SendGetList(0, delegate(bool b) { SetDirty(UI.GRD_LIST); RefreshUI(); GameSection.ResumeEvent(b, null); }); }
private string GetButtonMessage(SEARCH_TYPE type) { var message = string.Empty; switch (type) { case SEARCH_TYPE.MISSING_SPRITE: message = "MissingSprite"; break; case SEARCH_TYPE.MISSING_COMPONENT: message = "MissingComponent"; break; } return(message); }
public IResult ProcessSearchQuery(string query, SEARCH_TYPE type) { IResult result = null; query = "search?q=" + query; try { //var pages = _fbClient.Get("search?q=spotted+ufmg&type=page").ToString(); switch (type) { case SEARCH_TYPE.user: var users = _fbClient.Get(query + "&type=" + type).ToString(); result = JsonConvert.DeserializeObject <ResultBase <BaseNode> >(users, _settings); break; case SEARCH_TYPE.page: var pages = _fbClient.Get(query + "&type=" + type).ToString(); result = JsonConvert.DeserializeObject <ResultBase <PageNode> >(pages, new PageNodeConverter()); break; case SEARCH_TYPE.@event: var events = _fbClient.Get(query + "&type=" + type).ToString(); result = JsonConvert.DeserializeObject <ResultBase <BaseNode> >(events, _settings); break; case SEARCH_TYPE.group: var groups = _fbClient.Get(query + "&type=" + type).ToString(); result = JsonConvert.DeserializeObject <ResultBase <BaseNode> >(groups, _settings); break; default: var pages2 = _fbClient.Get(query).ToString(); result = JsonConvert.DeserializeObject <ResultBase <BaseNode> >(pages2, _settings); break; } } catch { throw; } return(result); }
public SearchDealerBox(SEARCH_TYPE search_type) : this() { this.search_type = search_type; }
private void OnQuery_ID_SEARCH() { tmpSearchType = SEARCH_TYPE.ID; }
public override void Initialize() { isInitializeSend = false; tmpSearchType = searchType; base.Initialize(); }
public virtual void ExecuteSearch(string searchTerm, SEARCH_TYPE searchType, GISEnvelope searchArea, GISLayerInfo featureLayer) { throw new NotSupportedException(string.Format("Server type {0} does not expose a search interface.", this._Server.Type)); }
public override void ExecuteSearch(string searchTerm, SEARCH_TYPE searchType, GISEnvelope searchArea, GISLayerInfo featureLayer) { if (searchType == SEARCH_TYPE.Geocode) { // http://{0}/{1}?SERVICE={2}&VERSION={3}&REQUEST=GetFeatureInfo&LAYERS={4}&QUERY_LAYERS={4}&STYLES=&BBOX={5}&FEATURE_COUNT=10&HEIGHT={6}&WIDTH={7}&FORMAT=image%2Fpng&INFO_FORMAT=text%2Fxml&SRS={8}&X={9}&Y={10} OGCEnvelope envelope = new OGCEnvelope(searchArea); string requestUrl = string.Format(FEATURE_INFO_URL, Server.Host, Server.ServletPath, OGC_SERVICE_TYPE.WMS, Server.Version, (featureLayer as OGCLayer).Id, (envelope as OGCEnvelope).ToBBoxString(), _imageHeight, _imageWidth, searchArea.CoordinateSystem, _imageWidth / 2, _imageHeight / 2); GISFeatureResponse response = new GISFeatureResponse(); response._envelope = searchArea; response._layers = new List<GISLayerInfo>() { featureLayer }; response.HasError = false; response.LastRequest = requestUrl; webClient.GetRequest(requestUrl, ProcessQueryResponse, response); } else { List<GISLayerInfo> layers = new List<GISLayerInfo>(); GetQueryLayers(Server.ActiveService, ref layers); string queryLayers = string.Empty; foreach (GISLayerInfo layer in layers) { queryLayers += layer.Id; } string requestUrl = GetUrl(OGC_OPERATION.GetFeatureInfo, OGC_SERVICE_TYPE.WMS, Server.ActiveService as OGCService, queryLayers.Cast<OGCLayer>(), new OGCEnvelope(searchArea), _imageWidth, _imageHeight); //http://<hostname>/<deploy_name>/com.esri.wms.Esrimap?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&SRS=EPSG:4326&BBOX=-117,38,-90,49&WIDTH=600&HEIGHT=400&QUERY_LAYERS=States&X=200&Y=150& GISFeatureResponse response = new GISFeatureResponse() { SearchTerm = searchTerm }; response._envelope = new GISEnvelope(); response._layers = new List<GISLayerInfo>() { new OGCLayer("Search", "Search") }; response.HasError = false; response.LastRequest = requestUrl; webClient.GetRequest(requestUrl, ProcessSearchResponse, response); } }
public override void ExecuteSearch(string searchTerm, SEARCH_TYPE searchType, GISEnvelope searchArea, GISLayerInfo featureLayer) { string activeServiceName = Server.ActiveService.Name.IndexOf("__") > 0 ? Server.ActiveService.Name.Substring(0, Server.ActiveService.Name.IndexOf("__")) : Server.ActiveService.Name; EsriEnvelope queryEnvelope = new EsriEnvelope(searchArea); string requestUrl = string.Empty; if (searchType == SEARCH_TYPE.Geocode) { //http://planthardiness.ars.usda.gov/ArcGIS/rest/services/uspz/MapServer/identify?geometryType=esriGeometryPoint&geometry=-120%2C40&tolerance=10&mapExtent=-119%2C38%2C-121%2C41&imageDisplay=400%2C300%2C96 //http://services.arcgisonline.com/ArcGIS/rest/services/Specialty/Soil_Survey_Map/MapServer/identify?geometryType=esriGeometryPoint&geometry=19.23865%2C48.23152&sr=102100&layers=0&time=&layerTimeOptions=&layerdefs=&tolerance=100&mapExtent=19.23865%2C48.23152%2C19.23865%2C48.23152&imageDisplay=600%2C550%2C96&returnGeometry=true&maxAllowableOffset=&f=json requestUrl = String.Format(GEOCODE_URL, Server.Host, Server.ServletPath, activeServiceName, searchArea.CenterX, searchArea.CenterY); } else if (searchType == SEARCH_TYPE.Identify) { //http://planthardiness.ars.usda.gov/ArcGIS/rest/services/uspz/MapServer/identify?geometryType=esriGeometryPoint&geometry=-120%2C40&tolerance=10&mapExtent=-119%2C38%2C-121%2C41&imageDisplay=400%2C300%2C96 //http://services.arcgisonline.com/ArcGIS/rest/services/Specialty/Soil_Survey_Map/MapServer/identify?geometryType=esriGeometryPoint&geometry=19.23865%2C48.23152&sr=102100&layers=0&time=&layerTimeOptions=&layerdefs=&tolerance=100&mapExtent=19.23865%2C48.23152%2C19.23865%2C48.23152&imageDisplay=600%2C550%2C96&returnGeometry=true&maxAllowableOffset=&f=json requestUrl = String.Format(GEOCODE_URL, Server.Host, Server.ServletPath, activeServiceName, searchArea.CenterX, searchArea.CenterY); } else { requestUrl = String.Format(QUERY_URL, Server.Host, activeServiceName, Server.ActiveService.ServiceType, Server.ActiveService.BaseLayers[0].Id, queryEnvelope.ToJSON(), Server.ServletPath); } EsriFeatureResponse response = new EsriFeatureResponse(); response._envelope = searchArea; response._layers = new List<GISLayerInfo>() { featureLayer }; response.HasError = false; response.LastRequest = requestUrl; try { webClient.GetRequest(requestUrl, new EventHandler<WebEventArgs>(ProcessQueryReturn), response); //wc.DownloadStringAsync(new Uri(requestUrl), new AsyncState() { Response = response, CurrentState = Server.ActiveService }); } catch (Exception ex) { Server.RaiseSearchResponse(new GISResponse() { HasError = true, ErrorMessage = string.Format("{0}: {1}", ex.Message), LastRequest = requestUrl, LastResponse = string.Empty, _layers = new List<GISLayerInfo>() { Server.ActiveService.BaseLayers[0] }, _envelope = queryEnvelope }); } }
public void ExecuteSearch(string searchTerm, SEARCH_TYPE searchType, GISEnvelope searchArea) { if (Controller.RequestProcessing) return; else Controller.RequestProcessing = true; if (FeatureLayer == null) { List<GISLayerInfo> layers = GetQueryLayers(); if (layers.Count() > 0) { _featureLayer = layers.First(); } } Controller.ExecuteSearch(searchTerm, searchType, searchArea, FeatureLayer); }
public override void ExecuteSearch(string searchTerm, SEARCH_TYPE searchType, GISEnvelope searchArea, GISLayerInfo featureLayer) { int maxFeaturesReturned = 20; string requestUrl = String.Format(QUERY_URL, Server.Host, Server.ServletPath, Server.ActiveService.Id, false, Server.Version); string requestXml = BuildQuery(featureLayer, maxFeaturesReturned, searchArea); EsriFeatureResponse response = new EsriFeatureResponse() { SearchTerm = searchTerm }; response._envelope = searchArea; response._layers = new List<GISLayerInfo>() { featureLayer }; response.HasError = false; response.LastRequest = requestXml; webClient.PostRequest(requestUrl, Server.UseForm ? ApplyFormEncoding(requestXml) : requestXml, ProcessSearchReturn, response); }
public void SearchForPlate( SEARCH_TYPE type, string searchNumber, string cameraNameFilter, DateTime start, DateTime end, int minMatchScore, SEARCH_PROGRESS_DEL progressCallBack, SEARCH_COMPLETE_DEL completeCB) { m_SearchStopped = false; m_MinMatchScore = minMatchScore; m_SearchProgressCB = progressCallBack; m_SearchCompleteCB = completeCB; m_CameraNameFilter = cameraNameFilter; m_SearchString = searchNumber; m_SearchStartTime = start; m_SearchEndTime = end; m_SearchType = type; if (m_SearchType == SEARCH_TYPE.MOTION || m_SearchType == SEARCH_TYPE.PLATE) { m_SearchThread = new Thread(SearchFilesLoop); } else if (m_SearchType == SEARCH_TYPE.ALL_IMAGES) { m_SearchThread = new Thread(DumpImagesInRangeLoop); } m_Stop = false; m_SearchThread.Start(); }
private void OnQuery_SEARCH_NAME() { tmpSearchType = SEARCH_TYPE.NAME; GameSection.SetEventData(0); }