/// <summary> /// Combo Box constructor /// </summary> public DEMCombo() { Parameter.DEMCombo = this; LayersAddedEvent.Subscribe(UpdateCombo); LayersMovedEvent.Subscribe(UpdateCombo); LayersRemovedEvent.Subscribe(UpdateCombo); ActiveMapViewChangedEvent.Subscribe(UpdateCombo); UpdateCombo(null); }
/// <summary> /// Funzione da richiamare allo scattare dell'evento 'Chiusura Mappa'. /// </summary> /// <param name="args"></param> private void AllaChiusuraMappa(MapClosedEventArgs args) { this.Clear(); this.UpdateCombo(); LayersAddedEvent.Unsubscribe(EventoLayerInTOC); LayersMovedEvent.Unsubscribe(EventoLayerInTOC); LayersRemovedEvent.Unsubscribe(EventoLayerInTOC); //MapPropertyChangedEvent.Unsubscribe(AllaVariazioneProprietaMappa); // Occurs when any property of a map is changed. MapMemberPropertiesChangedEvent.Unsubscribe(EventoLayerInTOC); }
private void AddEvents() { LayersAddedEvent.Subscribe(OnLayersAdded); LayersMovedEvent.Subscribe(OnLayersMoved); LayersRemovedEvent.Subscribe(OnLayersRemoved); MapMemberPropertiesChangedEvent.Subscribe(OnMapMemberPropertiesChanged); TOCSelectionChangedEvent.Subscribe(OnTocSelectionChanged); DrawStartedEvent.Subscribe(OnDrawStarted); DrawCompleteEvent.Subscribe(OnDrawCompleted); ActiveToolChangedEvent.Subscribe(OnActiveToolChangedEvent); EditCompletedEvent.Subscribe(OnEditCompleted); }
/// <summary> /// Combo Box constructor /// </summary> public ComboBoxFeatureLayer() { mappa = ProAddInSR.funzioniVariabiliGlobali.FunzioniGlobali.RicavaMappaAttiva(); UpdateCombo(); MapViewInitializedEvent.Subscribe(OnMapViewCaricata); // Occurs when the map view has initialized --> Cioè aperta nuova Mappa, e caricata da zero!! LayersAddedEvent.Subscribe(EventoLayerInTOC); LayersMovedEvent.Subscribe(EventoLayerInTOC); LayersRemovedEvent.Subscribe(EventoLayerInTOC); MapClosedEvent.Subscribe(AllaChiusuraMappa); MapPropertyChangedEvent.Subscribe(AllaVariazioneProprietaMappa); // Occurs when any property of a map is changed. MapMemberPropertiesChangedEvent.Subscribe(EventoLayerInTOC); // Occurs when any property of layer or standalone table changed. }
private void OnMapViewCaricata(MapViewEventArgs args) { funzioniVariabiliGlobali.VariabiliGlobali.blnMappaAttivaCaricata = true; this.Clear(); this.UpdateCombo(); LayersAddedEvent.Subscribe(EventoLayerInTOC); LayersMovedEvent.Subscribe(EventoLayerInTOC); LayersRemovedEvent.Subscribe(EventoLayerInTOC); MapClosedEvent.Subscribe(AllaChiusuraMappa); MapPropertyChangedEvent.Subscribe(AllaVariazioneProprietaMappa); // Occurs when any property of a map is changed. MapMemberPropertiesChangedEvent.Subscribe(EventoLayerInTOC); // Occurs when any property of layer or standalone table changed. }
private async void OnMapClosed(MapClosedEventArgs args) { LayersAddedEvent.Unsubscribe(OnLayersAdded); LayersMovedEvent.Unsubscribe(OnLayersMoved); LayersRemovedEvent.Unsubscribe(OnLayersRemoved); MapMemberPropertiesChangedEvent.Unsubscribe(OnMapMemberPropertiesChanged); TOCSelectionChangedEvent.Unsubscribe(OnTocSelectionChanged); ActiveToolChangedEvent.Unsubscribe(OnActiveToolChangedEvent); EditCompletedEvent.Unsubscribe(OnEditCompleted); DrawCompleteEvent.Unsubscribe(OnDrawCompleted); DrawStartedEvent.Unsubscribe(OnDrawStarted); while (Count >= 1) { VectorLayer vectorLayer = this[0]; await RemoveLayer(vectorLayer); } }