コード例 #1
0
        private void WebClient_OpenReadCompleted(object sender, OpenReadCompletedEventArgs e)
        {
            try
            {
                Collection <Type> knowTypes = new Collection <Type>();
                knowTypes.Add(typeof(EsriFieldType));
                knowTypes.Add(typeof(EsriGeometryType));

                DataContractJsonSerializer dcjs      = new DataContractJsonSerializer(typeof(ArcGISLayerInfo), knowTypes);
                ArcGISLayerInfo            layerInfo = dcjs.ReadObject(e.Result) as ArcGISLayerInfo;
                e.Result.Close();
                e.Result.Dispose();

                if (InfoReady != null)
                {
                    layerInfo.IsReady = true;
                    InfoReady(this, new ArcGISLayerInfoEventArgs(layerInfo));
                }
            }
            catch (Exception ex)
            {
                if (InfoReady != null)
                {
                    InfoReady(this, new ArcGISLayerInfoEventArgs(ex.Message));
                }
            }
        }
コード例 #2
0
 public QueryTool(ArcGISQueryLayer queryLayer, ArcGISLayerInfo layerInfo)
 {
     this.QueryLayer = queryLayer;
     this.LayerInfo  = layerInfo;
 }
コード例 #3
0
 public ArcGISLayerInfoEventArgs(ArcGISLayerInfo layerInfo)
 {
     this._layerInfo = layerInfo;
 }