예제 #1
0
        public void DownloadInfo()
        {
            Const_Request CR = new Const_Request();

            _forms      = CR.GetRequestFormPlaceMethod();
            _categories = CR.GetRequestPlaceCategoriesMethod();
            _types      = CR.GetRequestTypesOf_UseMethod();
            if (_forms != null && _categories != null && _types != null)
            {
                Dispatcher.BeginInvoke(new ThreadStart(delegate { Status = true; }));
            }
            secondThread.Abort();
        }
예제 #2
0
 private Form_Place GetRequestFormPlace <T>(string url)
 {
     try
     {
         var response = _httpClient.GetAsync(url).Result;
         response.EnsureSuccessStatusCode();
         var        content = response.Content.ReadAsStringAsync().Result;
         Form_Place model   = JsonConvert.DeserializeObject <Form_Place>(content);
         return(model);
     }
     catch (Exception)
     {
         return(GetRequestFormPlace <Form_Place>($"arcgis/rest/services/Cadastre/Thematic/MapServer/1?f=pjson"));
     }
 }