usando System; usando System.Collections.Generic; usando System.Linq; // usando System.Windows; // usando System.Windows.Forms; usando System.Text; usando System.Threading; usando System.Threading.Tasks; usando ArcGIS.Desktop.Core.Geoprocessing; usando ArcGIS.Desktop.Framework; usando ArcGIS.Desktop.Framework.Contracts; usando ArcGIS.Desktop.Framework.Dialogs; usando ArcGIS.Desktop.Mapping; usando ArcGIS.Desktop.Core; usando ArcGIS.Desktop.Framework.Threading.Tasks; espacio de nombresProAppModule1 { interna clase Button1: ArcGIS.Desktop.Framework.Contracts.Button { cadena de salida = " gisoracle " ; protegida override void OnClick () { capa FeatureLayer = MapView.Active.Map.Layers [ 0 ] como FeatureLayer; string path = Project.Current.DefaultGeodatabasePath + " / " ; Seleccionar (capa, camino + salida); } Pública boolSeleccione (capa FeatureLayer, cadena de salida) { try { var resultado = QueuedTask.Run (() => { var args = Geoprocessing.MakeValueArray (capa, de salida); retorno Geoprocessing.ExecuteToolAsync ( " analysis.Select " , args); } ); volver verdadera ; } Catch (Exception ex) { MessageBox.Show ( " 错误: " + ex.Message.ToString ()); volver falsa ; } } } }