/// <summary>
 /// Waiting for the active map view to change in order to setup event listening
 /// </summary>
 /// <param name="args"></param>
 private void OnActiveMapViewChangedEvent(ActiveMapViewChangedEventArgs args)
 {
     if (args.IncomingView != null)
     {
         SetPolygonLayer();
     }
 }
        /// <summary>
        /// Set Enclosure flag
        /// </summary>
        /// <param name="obj">ActiveMapViewChangedEventArgs</param>
        private void OnActiveMapViewChanged(ActiveMapViewChangedEventArgs obj)
        {
            if (obj == null || obj.IncomingView == null || obj.IncomingView.Map == null)
            {
                FrameworkApplication.State.Deactivate(EnableEnclosure);
                return;
            }

            QueuedTask.Run(() =>
            {
                using UtilityNetwork un = GetUtilityNetworkFromActiveMap();
                using DiagramManager dm = un?.GetDiagramManager();
                try
                {
                    DiagramTemplate dt = dm?.GetDiagramTemplate(csTemplateName);
                    if (dt == null)
                    {
                        FrameworkApplication.State.Deactivate(EnableEnclosure);
                    }
                    else
                    {
                        FrameworkApplication.State.Activate(EnableEnclosure);
                    }
                }
                catch
                {
                    FrameworkApplication.State.Deactivate(EnableEnclosure);
                }
            });
        }
Esempio n. 3
0
 private void OnActiveMapViewChanged(ActiveMapViewChangedEventArgs obj)
 {
     if (obj.IncomingView != null && obj.IncomingView.Time != null)
     {
         SetTimeProperties(obj.IncomingView.Time);
     }
 }
Esempio n. 4
0
 private void OnActiveMapViewChanged(ActiveMapViewChangedEventArgs obj)
 {
     if (obj.IncomingView == null)
     {
         return;
     }
     CheckNewLayers();
 }
		private void OnActiveMapViewChanged(ActiveMapViewChangedEventArgs obj)
		{
			System.Diagnostics.Debug.WriteLine("Enter ActiveMapViewChangedEvent");
			if (obj.IncomingView == null)
				return;
			System.Diagnostics.Debug.WriteLine("Incoming is not null");
			GetLayersInMap();
		}
        /// <summary>
        /// アクティブなマップビューが変わった場合に発生
        /// </summary>
        private void OnActiveMapViewChanged(ActiveMapViewChangedEventArgs args)
        {
            // レイヤーを取得
            GetLayers();

            // DataGridをクリアして選択しているフィーチャを解除
            Clear();
        }
Esempio n. 7
0
 private void OnActiveMapViewChanged(ActiveMapViewChangedEventArgs obj)
 {
     if (obj.IncomingView == null)
     {
         return;
     }
     //populate the snap list with layers in the incoming active map
     PopulateSnapList();
 }
 /// <summary>
 /// Waiting for the active map view to change in order to setup event listening
 /// </summary>
 /// <param name="args"></param>
 private void OnActiveMapViewChangedEvent(ActiveMapViewChangedEventArgs args)
 {
     if (args.IncomingView != null)
     {
         SetUpRowEventListener(args.IncomingView, PolygonLayerName, PointLayerName);
         ActiveMapViewChangedEvent.Unsubscribe(_activeMapViewChangedEvent);
         _activeMapViewChangedEvent = null;
     }
 }
        /// <summary>
        /// Event delegate for the ActiveMapViewChangedEvent
        /// </summary>
        private void OnActiveMapViewChanged(ActiveMapViewChangedEventArgs obj)
        {
            if (obj.IncomingView == null)
            {
                Camera = null;
                return;
            }

            Camera = obj.IncomingView.Camera;
        }
 /// <summary>
 /// The active map view changed therefore we refresh the feature layer drop-down
 /// </summary>
 /// <param name="args"></param>
 private void OnActiveMapViewChanged(ActiveMapViewChangedEventArgs args)
 {
     if (args.IncomingView == null)
     {
         return;
     }
     SelectedFeatureDataTable = null;
     ChartResult = null;
     GetFeatureLayers();
 }
Esempio n. 11
0
        private void OnActiveMapViewChanged(ActiveMapViewChangedEventArgs obj)
        {
            if (obj.IncomingView == null)
            {
                return;
            }
            CreateReportViewModel vm = FrameworkApplication.DockPaneManager.Find("CreateReport_CreateReport") as CreateReportViewModel;

            vm.UpdateCollectionsAsync();
        }
 private void OnActiveMapViewChanged(ActiveMapViewChangedEventArgs obj)
 {
     if (obj.IncomingView == null)
     {
         return;
     }
     ActionOnGuiThread(async() =>
     {
         await GetLayersInMapAsync();
     });
 }
 private void OnActiveMapViewChanged(ActiveMapViewChangedEventArgs obj)
 {
     DockPaneIsEnabled = obj.IncomingView != null;
     if (obj.IncomingView == null)
     {
         Camera = null;
         return;
     }
     System.Diagnostics.Debug.WriteLine($@"{obj.IncomingView.GetType().ToString()}");
     Camera = obj.IncomingView.Camera;
 }
Esempio n. 14
0
        private void OnActiveMapViewChanged(ActiveMapViewChangedEventArgs activeMapViewChangedEventArgs)
        {
            System.Diagnostics.Debug.WriteLine("OnActiveMapViewChanged");
            var newMapView = activeMapViewChangedEventArgs.IncomingView;

            if (newMapView == null)
            {
                return;
            }
            GetFeatureLayers(newMapView);
        }
 private void OnActiveViewChanged(ActiveMapViewChangedEventArgs args)
 {
     if (!_mapViewNotInitialized)
     {
         return;
     }
     _mapViewNotInitialized = false;
     ChartResult            = new KeyValuePair <string, int> [0];
     FeatureLayers.Clear();
     GetFeatureLayers();
 }
Esempio n. 16
0
 private void OnActiveMapViewChangedEvent(ActiveMapViewChangedEventArgs obj)
 {
     if (obj.IncomingView == null)
     {
         // there is no active map view - disable the UI
         return;
     }
     // we have an active map view - enable the UI
     AOILayers        = null;
     SelectedAOILayer = null;
     SetAOILayers();
 }
Esempio n. 17
0
 private void OnActiveMapViewChanged(ActiveMapViewChangedEventArgs obj)
 {
     if (obj.IncomingView == null)
     {
         return;
     }
     System.Diagnostics.Debug.WriteLine("OnActiveMapViewChanged");
     ActionOnGuiThread(async() =>
     {
         await GetLayersInMapAsync();
     });
 }
        private async void OnActiveMapViewChanged(ActiveMapViewChangedEventArgs activeMapViewChangedEventArgs)
        {
            // remove the old bookmarks
            this.Clear();
            if (activeMapViewChangedEventArgs.IncomingView == null)
            {
                return;
            }
            await UpdateCombo(activeMapViewChangedEventArgs.IncomingView);

            Enabled       = true; //enables the ComboBox
            SelectedIndex = 0;
        }
        /// <summary>
        /// Event handler when the active MapView changes
        /// </summary>
        /// <param name="obj"></param>
        private void OnActiveMapViewChangedEvent(ActiveMapViewChangedEventArgs obj)
        {
            if (obj.IncomingView == null)
            {
                FeatureItems.Clear();
                return;
            }
            //Clear the list first
            if (FeatureItems?.Count > 0)
            {
                FeatureItems.Clear();
            }

            UpdateSymbolList();
        }
        private void OnActiveMapViewChanged(ActiveMapViewChangedEventArgs args)
        {
            if (args.IncomingView == null)
            {
                SetProperty(ref _selectedLayer, null, () => SelectedLayer);
                _layers.Clear();
                SetProperty(ref _selectedOID, null, () => SelectedOID);
                _layerSelection.Clear();
                _fieldAttributes.Clear();
                return;
            }

            _activeMap = args.IncomingView.Map;
            UpdateForActiveMap();
        }
        /// <summary>
        /// Event Handler to update the MapControl when the ActiveMap changes.
        /// </summary>
        /// <param name="args"></param>
        private void OnActiveMapViewChanged(ActiveMapViewChangedEventArgs args)
        {
            if (args.IncomingView == null)
            {
                return;
            }
            if (MapView.Active == null)
            {
                return;
            }
            var vm = FrameworkApplication.DockPaneManager.Find("OverviewMapControl_MapControlDockpane") as MapControlDockpaneViewModel;

            if (vm != null)
            {
                vm.ActiveMap = args.IncomingView.Map.Name;
            }
            InitializeMapControl();
        }
        private void OnActiveMapViewChangedEvent(ActiveMapViewChangedEventArgs obj)
        {
            if (obj.IncomingView == null)
            {
                // there is no active map view - disable the UI
                return;
            }

            OperationRasterLayers        = null;
            SelectedOperationRasterLayer = null;

            VarietyRasterLayers        = null;
            SelectedVarietyRasterLayer = null;

            VarietyDBFTables        = null;
            SelectedVarietyDBFTable = null;

            // we have an active map view - enable the UI
            SetRasterLayers();
            SetStandaloneTables();
        }
        private void OnActiveMapViewChanged(ActiveMapViewChangedEventArgs activeMapViewChangedEventArgs)
        {
            try
            {
                // We are only interested in the current mapview, when focus changes, we do not refresh if we are still on the current active mapview
                if (activeMapViewChangedEventArgs.IncomingView == null)
                {
                    return;
                }
                if (activeMapViewChangedEventArgs.IncomingView == _currentActiveMapView)
                {
                    return;
                }
                _currentActiveMapView = activeMapViewChangedEventArgs.IncomingView;

                RefreshLayerComboBox();
                ResetTab();
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error in OnActiveMapViewChanged:  " + ex.ToString(), "Error");
            }
        }
Esempio n. 24
0
 private async void OnActiveMapViewChanged(ActiveMapViewChangedEventArgs activeMapViewChangedEventArgs)
 {
     await QueuedTask.Run(() =>
     {
         // If no active mapview, then return
         if (MapView.Active == null)
         {
             return;
         }
         // Check for needed feature class
         var featLayer = MapView.Active.Map.FindLayers("Clip_Polygon_Asphalt").FirstOrDefault() as FeatureLayer;
         // If this key layer is not present, deactivate the dockpane
         if (featLayer == null)
         {
             // Deactivate
             FrameworkApplication.State.Deactivate("ShowPerMapPane");
         }
         else
         {
             FrameworkApplication.State.Activate("ShowPerMapPane");
         }
     });
 }
 private void OnActiveViewChanged(ActiveMapViewChangedEventArgs args)
 {
     if (!_mapViewNotInitialized) return;
     _mapViewNotInitialized = false;
     ChartResult = new KeyValuePair<string, int>[0];
     FeatureLayers.Clear();
     GetFeatureLayers();
 }
 private void OnActiveMapViewChanged(ActiveMapViewChangedEventArgs obj)
 {
   LoadBookmarks();
 }
Esempio n. 27
0
        private void OnActiveMapViewChanged(ActiveMapViewChangedEventArgs obj)
        {
#pragma warning disable CS4014 // Because this call is not awaited, execution of the current method continues before the call is completed
            LoadBookmarks();
#pragma warning restore CS4014 // Because this call is not awaited, execution of the current method continues before the call is completed
        }
 private void OnActiveMapViewChanged(ActiveMapViewChangedEventArgs obj)
 {
     CheckContext();
 }
 private void OnActiveMapViewChanged(ActiveMapViewChangedEventArgs obj)
 {
   if (obj.IncomingView == null)
   {
     Camera = null;
     return;
   }
     
   Camera = obj.IncomingView.Camera;
 }
 private void OnActiveMapViewChanged(ActiveMapViewChangedEventArgs obj)
 {
   if (obj.IncomingView != null && obj.IncomingView.Time != null)
     SetTimeProperties(obj.IncomingView.Time);
 }
Esempio n. 31
0
 private void OnActiveViewChanged(ActiveMapViewChangedEventArgs args)
 {
     RunEnabled = false;
 }
    private void OnActiveMapViewChanged(ActiveMapViewChangedEventArgs args)
    {
      if (args.IncomingView == null)
      {
        SetProperty(ref _selectedLayer, null, () => SelectedLayer);
        _layers.Clear();
        SetProperty(ref _selectedOID, null, () => SelectedOID);
        _layerSelection.Clear();
        _fieldAttributes.Clear();
        return;
      }

      _activeMap = args.IncomingView.Map;
      UpdateForActiveMap();
    }
 private void OnActiveViewChanged(ActiveMapViewChangedEventArgs args)
 {
   RunEnabled = false;
 }
Esempio n. 34
0
 /// <summary>
 /// Called when the active map view changes.
 /// </summary>
 private void OnActiveViewChanged(ActiveMapViewChangedEventArgs args)
 {
     SetHeadingFromMapView(args.IncomingView);
 }
Esempio n. 35
0
 private void OnActiveMapViewChanged(ActiveMapViewChangedEventArgs obj)
 {
     LoadBookmarks();
 }
 /// <summary>
 /// Handler for active map view changed event
 /// </summary>
 /// <param name="obj"></param>
 private async void OnActiveMapViewChanged(ActiveMapViewChangedEventArgs obj)
 {
     await ResetSurfaceNames();
 }