private Module1() { FrameworkApplication.State.Deactivate("planet_state_connection"); ProjectOpenedEvent.Subscribe(OnProjectOpen); ProjectClosedEvent.Subscribe(OnProjectClose); ProjectSavingEvent.Subscribe(OnProjectSaving); }
//public void RemoveWorkListLayer(IWorkList workList) //{ // 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() { LayersRemovingEvent.Subscribe(OnLayerRemovingAsync); DrawCompleteEvent.Subscribe(OnDrawCompleted); ProjectOpenedAsyncEvent.Subscribe(OnProjectOpendedAsync); ProjectSavingEvent.Subscribe(OnProjectSavingAsync); }
//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); }