直接上源码: 定义全局变量: int index=0;
/// <summary> /// @R_502_5962@Task查询多个图层,并绑定数据 /// </summary> /// <param name="ListUrl">图层Url集合</param> /// <param name="strsql">图层查询sql</param> private voID @R_502_5962@ByMultiUrl(List<string> ListUrl,string strsql) { if (strsql=="") { MessageBox.Show("请输入筛选条件!"); return; } loadingMask.LoadMask(); intUrlCount = ListUrl.Count; if (intUrlCount != 0) { string url = ListUrl[index]; @R_502_5962@Task @R_502_5962@Task = new @R_502_5962@Task(url); @R_502_5962@Task.Failed += @R_502_5962@Task_AllFailed; @R_502_5962@ @R_502_5962@ = new @R_502_5962@(); @R_502_5962@.ReturnGeometry = true; @R_502_5962@.Where = strsql; @R_502_5962@.OutFIElds.Add("*"); @R_502_5962@Task.ExecuteAsync(@R_502_5962@); @R_502_5962@Task.ExecuteCompleted += (sender2,args2) => { @R_502_5962@Task obj@R_502_5962@Task = sender2 as @R_502_5962@Task; Featureset pFeatureset = obj@R_502_5962@Task.LastResult; foreach (Graphic item in pFeatureset) { xmfwxGraphicList.Add(item); } index++; @R_502_5962@Fun(ListUrl,strsql); }; } }
</pre> </div><h2><strong> @R_502_5962@Fun()函数:</strong></h2><div><strong></strong><pre name="code" > private voID @R_502_5962@Fun(List<string> ListUrl,string strsql) { if (index == intUrlCount) { index = 0; System.windows.Data.PagedCollectionVIEw pageVIEw = new System.windows.Data.PagedCollectionVIEw(xmfwxGraphicList); resultGrID.ItemsSource = pageVIEw; this._GrdWorkBox_Pager.source = pageVIEw; this.CtrlSearchBox.Binding(resultGrID); this.CtrlSearchBox.BingindTextBoxNotify(this.TxtTip,pageVIEw); TextBlockExtension.SetRedText(TxtTip,xmfwxGraphicList.Count.ToString()); TxtTip.Text = xmfwxGraphicList.Count.ToString(); loadingMask.UnLoadMask(); if (xmfwxGraphicList.Count <= 0) { MessageBox.Show("没查到相关数据!"); } return; } @R_502_5962@ByMultiUrl(ListUrl,strsql); }总结
以上是内存溢出为你收集整理的(ArcGIS API For Silverlight )QueryTask 跨图层查询,并监控查询的完成!全部内容,希望文章能够帮你解决(ArcGIS API For Silverlight )QueryTask 跨图层查询,并监控查询的完成!所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)