private void ServiceInfo_RetrieveServiceInfoCompleted(object sender, RetrieveServiceInfoEventArgs e) { if (--_servicesLeft <= 1) { ArcGisServiceInfo.ServiceInfo.RetrieveServiceInfoCompleted -= ServiceInfo_RetrieveServiceInfoCompleted; ArcGisServiceInfo.ServiceInfo.RetrieveFeatureInfoCompleted -= ServiceInfo_RetrieveFeatureInfoCompleted; IsDropDownOpen = true; } try { if (e.Error != null) { ErrorHelper.OnError(MethodBase.GetCurrentMethod().DeclaringType.Name, "Error pulling arcgis service from server", e.Error); return; } App.Current.Dispatcher.Invoke((Action) delegate { Services.Add(e.ServiceData); NotifyPropertyChanged("ServicesView"); }); } catch (Exception ex) { ErrorHelper.OnError(MethodBase.GetCurrentMethod().DeclaringType.Name, "Error pulling arcgis services from server", ex); } }
private void RetrieveServiceInfoCompleted(object sender, RetrieveServiceInfoEventArgs e) { try { if (e.Error != null) { ErrorHelper.OnError(MethodBase.GetCurrentMethod().DeclaringType.Name, "Error pulling service info", e.Error); return; } Service = e.ServiceData; IsLayerDropDownOpen = true; } catch (Exception ex) { ErrorHelper.OnError(MethodBase.GetCurrentMethod().DeclaringType.Name, "Error pulling service info", ex); } }