예제 #1
0
        private void UnwireEvents()
        {
            LayersRemovingEvent.Unsubscribe(OnLayerRemovingAsync);
            DrawCompleteEvent.Unsubscribe(OnDrawCompleted);

            ProjectOpenedAsyncEvent.Unsubscribe(OnProjectOpendedAsync);
            ProjectSavingEvent.Unsubscribe(OnProjectSavingAsync);
        }
예제 #2
0
        private void UnwireEvents()
        {
            //MapViewInitializedEvent.Unsubscribe(OnMapViewInitialized);
            LayersRemovingEvent.Unsubscribe(OnLayerRemovingAsync);
            DrawCompleteEvent.Unsubscribe(OnDrawCompleted);

            ProjectOpenedAsyncEvent.Unsubscribe(OnProjectOpendedAsync);
            ProjectSavingEvent.Unsubscribe(OnProjectSavingAsync);

            ProjectItemsChangedEvent.Unsubscribe(OnProjectItemsChanged);
            ProjectItemRemovingEvent.Unsubscribe(OnProjectItemRemoving);

            MapMemberPropertiesChangedEvent.Unsubscribe(OnMapMemberPropertiesChanged);
        }
예제 #3
0
        //public void RemoveWorkListLayer(IWorkList workList)
        //{
        //	if (_layersByWorklistName.ContainsKey(workList.Name))
        //	{

        //	}
        //	if (_layerByWorkList.ContainsKey(workList))
        //	{
        //		_layerByWorkList.Remove(workList);
        //		Layer layer = MapView.Active.Map.GetLayersAsFlattenedList()
        //							 .First(l => l.Name == workList.Name);
        //		QueuedTask.Run(() => MapView.Active.Map.RemoveLayer(layer));
        //	}
        //}

        #region Events

        private void WireEvents()
        {
            // creating a project
            // 1. OnProjectOpened
            // 2. OnWriteSettings
            // 3. OnMapViewInitialized
            // 4. OnDrawCompleted

            //MapViewInitializedEvent.Subscribe(OnMapViewInitialized);
            LayersRemovingEvent.Subscribe(OnLayerRemovingAsync);
            DrawCompleteEvent.Subscribe(OnDrawCompleted);

            ProjectOpenedAsyncEvent.Subscribe(OnProjectOpendedAsync);
            ProjectSavingEvent.Subscribe(OnProjectSavingAsync);

            ProjectItemsChangedEvent.Subscribe(OnProjectItemsChanged);
            ProjectItemRemovingEvent.Subscribe(OnProjectItemRemoving);

            MapMemberPropertiesChangedEvent.Subscribe(OnMapMemberPropertiesChanged);
        }
 protected override bool Initialize()
 {
     ProjectOpenedEvent.Subscribe(OnProjectOpened);
     ProjectOpenedAsyncEvent.Subscribe(OnProjectOpenedAsync);
     return(base.Initialize());
 }