protected virtual void OnLayerAdded(LayerAddedEventArgs args)
 {
     if (LayerAdded != null)
     {
         LayerAdded(this, args);
     }
 }
 void browseDialog_LayerAdded(object sender, LayerAddedEventArgs e)
 {
     FrameworkElement elem = sender as FrameworkElement;
     MapApplication.Current.HideWindow(elem);
     object[] tag = elem.Tag as object[];
     EventHandler<BrowseForLayerCompletedEventArgs> onComplete = tag[0] as EventHandler<BrowseForLayerCompletedEventArgs>;
     if (onComplete == null)
         return;
     onComplete(this, new BrowseForLayerCompletedEventArgs() { Layer = e.Layer, UserState = tag[1] });            
 }
 void AddContentDialog_LayerAdded(object sender, LayerAddedEventArgs e)
 {
     if (e.Layer == null)
     {
         return;
     }
     if (Map != null)
     {
         OnLayerAdded(e);
         ShowMapContents();
     }
 }
 protected virtual void OnLayerAdded(LayerAddedEventArgs args)
 {
     if (LayerAdded != null)
         LayerAdded(this, args);
 }
        void AddContentDialog_LayerAdded(object sender, LayerAddedEventArgs e)
        {
            if (e.Layer == null)
                return;			
            if (Map != null)
            {
			    OnLayerAdded(e);
                ShowMapContents();
            }
        }
Пример #6
0
 internal void AddContentDialog_LayerAdded(object sender, LayerAddedEventArgs e)
 {
     if (e.Layer == null)
         return;
     if (View.Instance != null)
     {
         SidePanelHelper.ShowMapContents();
         if (e.Layer is FeatureLayer)
         {
             FeatureLayer featureLayer = e.Layer as FeatureLayer;
             featureLayer.UpdateCompleted += applyAutomaticClustering;
         }
         else if (e.Layer is CustomGraphicsLayer)
         {
             CustomGraphicsLayer customGraphicsLayer = e.Layer as CustomGraphicsLayer;
             customGraphicsLayer.UpdateCompleted += applyAutomaticClustering;
         }
         View.Instance.AddLayerToMap(e.Layer, true, null);
     }
 }
 void browseDialog_LayerAdded(object sender, LayerAddedEventArgs e)
 {
     View.Instance.AddContentDialog_LayerAdded(this, e);
 }
        private void AddContentDialog_LayerAdded(object sender, LayerAddedEventArgs e)
        {
            if (e.Layer is FeatureLayer)
            {
                FeatureLayer featureLayer = e.Layer as FeatureLayer;
                featureLayer.UpdateCompleted += applyAutomaticClustering;
            }

            View.Instance.AddLayerToMap(e.Layer, true, Core.LayerExtensions.GetTitle(e.Layer));
        }
 void browseDialog_LayerAdded(object sender, LayerAddedEventArgs e)
 {
     View.Instance.AddContentDialog_LayerAdded(this, e);
 }