${iServer2_SpatialOperateEventArgs_Title}

${iServer2_SpatialOperateEventArgs_Description}

Наследование: SuperMap.Web.Service.ServiceEventArgs
        private void spatialService_ProcessCompleted(object sender, SpatialOperateEventArgs e)
        {
            //清除图层中选中要素
            drawLayer.ClearFeatures();

            if (e.Result == null)
            {
                MessageBox.Show("No Result!");
                return;
            }

            //将合并后的形状绘制到图层中
            Feature f = new Feature
            {
                Geometry = e.Result.ToGeometry(),
                Style = (SuperMap.Web.Core.Style)App.Current.Resources["CustomDiagonalBlackHatchFillSymbol"]
            };
            drawLayer.Features.Add(f);

            //将合并后的形状更新到服务器
            Entity entity = new Entity
            {
                Shape = e.Result,
                ID = ids[ids.Count - 2]
            };
            UpdateEntityParameters parameters = new UpdateEntityParameters
            {
                MapName = "Changchun",
                LayerName = "Vegetable@changchun",
                Entity = entity
            };
            UpdateEntityService updateEntityService = new UpdateEntityService("http://localhost:7080/demo");
            updateEntityService.ProcessAsync(parameters);
            updateEntityService.Failed += new EventHandler<ServiceFailedEventArgs>(Service_Failed);
            updateEntityService.ProcessCompleted += new EventHandler<EditEventArgs>(Service_ProcessCompleted);
        }
 private void OnProcessCompleted(SpatialOperateEventArgs args)
 {
     if (ProcessCompleted != null)
     {
         Application.Current.RootVisual.Dispatcher.BeginInvoke(
             ProcessCompleted, new object[] { this, args });
     }
 }
 private void request_Completed(object sender, RequestEventArgs e)
 {
     JsonObject jsonObject = (JsonObject)JsonObject.Parse(e.Result);
     ServerGeometry result = ServerGeometry.FromJson(jsonObject);
     LastResult = result;
     SpatialOperateEventArgs args = new SpatialOperateEventArgs(result, e.Result, e.UserState);
     OnProcessCompleted(args);
 }
 private void sos_ProcessCompleted(object sender, SpatialOperateEventArgs e)
 {
     if (e.Result == null)
     {
         MessageBox.Show("No Result!");
         return;
     }
     ServerGeometry r = e.Result;
     SuperMap.Web.Core.Geometry g = r.ToGeometry();
     Feature f = new Feature { Geometry = g, Style = (SuperMap.Web.Core.Style)App.Current.Resources["CustomDiagonalBlackHatchFillSymbol"] };
     resultLayer.Features.Add(f);
 }