private Module1()
 {
     FrameworkApplication.State.Deactivate("planet_state_connection");
     ProjectOpenedEvent.Subscribe(OnProjectOpen);
     ProjectClosedEvent.Subscribe(OnProjectClose);
     ProjectSavingEvent.Subscribe(OnProjectSaving);
 }
        protected override bool Initialize()
        {
            //listen to project open/close events
            ProjectOpenedEvent.Subscribe(onProjectOpened);
            ProjectClosedEvent.Subscribe(onProjectClosed);

            return(base.Initialize());
        }
 protected override bool Initialize()
 {
     //Subscribe to event to see if the Label gallery context is set
     ProjectOpenedEvent.Subscribe(OnProjectOpened);
     ActiveMapViewChangedEvent.Subscribe(OnActiveMapViewChanged);
     DrawCompleteEvent.Subscribe(OnDrawComplete);
     LayersAddedEvent.Subscribe(OnLayersAdded);
     return(base.Initialize());
 }
        /// <summary>
        /// Constructor.
        /// </summary>
        public SettingsDockpaneViewModel()
        {
            NumberFormatInfo nfi = CultureInfo.CurrentCulture.NumberFormat;

            _saveCommand = new RelayCommand(() => SaveSettings(), () => true);

            //Settings will be loaded either when the project is opened (the settings pane is already visible) or when the pane is shown
            ProjectOpenedEvent.Subscribe((ProjectEventArgs e) => { LoadSettings(); });
        }
        /// <summary>
        /// Constructor for the dock pane
        /// </summary>
        protected SymbolPickerViewModel()
        {
            //Call UpdateStyleList
            UpdateStyleList();

            //Subscribe to the ProjectOpenedEvent and pass in OnProjectOpened as the delegate.
            ProjectOpenedEvent.Subscribe(OnProjectOpened);
            //ProjectItemsChangedEvent.Subscribe(OnProjectItemsChanged);
        }
        protected InspectorSettingsViewModel()
        {
            _getMapsCommand = new RelayCommand(() => GetMaps(), () => true);

            Utilities.ProUtilities.RunOnUiThread(() =>
            {
                BindingOperations.EnableCollectionSynchronization(_maps, _lockCollection);
                BindingOperations.EnableCollectionSynchronization(_layers, _lockCollection);
            });

            LayersAddedEvent.Subscribe(OnLayerAdded, false);
            LayersRemovedEvent.Subscribe(OnLayerRemoved, false);
            ProjectOpenedEvent.Subscribe(OnProjectOpened, false);
        }
        /// <summary>
        /// CTor
        /// </summary>
        public OpenMapviewsDockpaneViewModel()
        {
            BindingOperations.EnableCollectionSynchronization(ListOfMapviews, _lockCollection);

            // create a simulated list of mapviews
            // either when a project is opened or if a project is already open
            ProjectOpenedEvent.Subscribe((ProjectEventArgs e) => { CreateMapviewItemsAsync(); });
            if (Project.Current != null)
            {
                CreateMapviewItemsAsync();
            }

            ProjectClosedEvent.Subscribe((ProjectEventArgs e) =>
            {
                // cleanup temp folder
                if (!string.IsNullOrEmpty(_temporaryPath))
                {
                    System.IO.Directory.Delete(_temporaryPath, true);
                }
                _temporaryPath = string.Empty;
            });
        }
        // Constructor
        protected FileTileLoaderViewModel()
        {
            _saveFolder   = System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), @"RemoteSensing\ArcPro\FileTileLoader");
            _saveFullPath = System.IO.Path.Combine(_saveFolder, _saveFile);

            _getMapsCommand          = new RelayCommand(() => GetMaps(), () => true);
            _loadFileCommand         = new RelayCommand(() => LoadFiles(), () => true);
            _getFileWorkspaceCommand = new RelayCommand(() => GetFileWorkspace(), () => true);

            Utilities.ProUtilities.RunOnUiThread(() =>
            {
                BindingOperations.EnableCollectionSynchronization(_maps, _lockCollection);
                BindingOperations.EnableCollectionSynchronization(_featureLayers, _lockCollection);
                BindingOperations.EnableCollectionSynchronization(_fields, _lockCollection);
                BindingOperations.EnableCollectionSynchronization(_fileExtensions, _lockCollection);
            });

            LayersAddedEvent.Subscribe(OnLayersAdded, false);
            LayersRemovedEvent.Subscribe(OnLayersRemoved, false);
            ProjectOpenedEvent.Subscribe(OnProjectOpened, false);

            ReadFileExtensionsFromDisk();
        }
Esempio n. 9
0
 /// <summary>
 /// Constructor for the dock pane
 /// </summary>
 protected SymbolPickerViewModel()
 {
     UpdateStyleList();
     ProjectOpenedEvent.Subscribe(OnProjectOpened);
 }
Esempio n. 10
0
 protected override bool Initialize()               //Called when the Module is initialized.
 {
     ProjectOpenedEvent.Subscribe(OnProjectOpened); //subscribe to Project opened event
     return(base.Initialize());
 }
 /// <summary>
 /// Module constructor.  Subscribe to the ProjectOpened and ProjectClosed events.
 /// </summary>
 private Module1()
 {
     ProjectOpenedEvent.Subscribe(OnProjectOpen);
     ProjectClosedEvent.Subscribe(OnProjectClosed);
 }
 /// <summary>
 /// Constructor for the dock pane
 /// </summary>
 protected GalleryDockpaneViewModel()
 {
     UpdateStyleList();
     ProjectOpenedEvent.Subscribe(OnProjectOpened);
 }
Esempio n. 13
0
 private SapConfigModule()
 {
     ProjectOpenedEvent.Subscribe(OnProjectOpen);
     ProjectClosedEvent.Subscribe(OnProjectClose);
 }
 protected override bool Initialize()
 {
     ProjectOpenedEvent.Subscribe(OnProjectOpened);
     ProjectOpenedAsyncEvent.Subscribe(OnProjectOpenedAsync);
     return(base.Initialize());
 }
 /// <summary>
 /// Subscribe to the ProjectOpenedEvent when the DockPane is created.
 /// </summary>
 protected BookmarkDockPaneViewModel()
 {
     ProjectOpenedEvent.Subscribe(OnProjectOpened);
 }