/// <summary>
        /// Initial load but also
        /// listen for changes to the api key value and reload the gallery if detected
        /// </summary>
        public PlanetGalleryInline()
        {
            APIKeyChangedEvent.Subscribe((args) =>
            {
                this.Clear();
                //ArcGIS.Desktop.Framework.Dialogs.MessageBox.Show($"Name has changed:\r\nOld: {args.OldName}\r\nNew: {args.NewName}", "NameChangedEvent");
                _isInitialized = false;
                Initialize();
            });

            PlanetGalleryChangedEvent.Subscribe((args) =>
            {
                if (args.NewPage == "next")
                {
                    SetNextPage();
                }
                if (args.NewPage == "prev")
                {
                    SetPrevPage();
                }
            });

            PlanetGalleryFilterEvent.Subscribe((args) =>
            {
                FilterItems(args.FilterText);
            });

            //MapViewCameraChangedEvent.Subscribe(OnCameraChanged);
            Initialize();
        }
Exemplo n.º 2
0
        public AOI_Select()
        {
            IsSketchTool     = true;
            SketchType       = SketchGeometryType.Polygon;
            SketchOutputMode = SketchOutputMode.Map;

            APIKeyChangedEvent.Subscribe((args) =>
            {
                if (Module1.Current.API_KEY == null || Module1.Current.API_KEY.API_KEY_Value == null || Module1.Current.API_KEY.API_KEY_Value == "")
                {
                    if (_graphic != null)
                    {
                        _graphic.Dispose();
                        FrameworkApplication.SetCurrentToolAsync(null);
                    }
                }
            });
        }
Exemplo n.º 3
0
        /// <summary>
        /// Combo Box constructor
        /// </summary>
        public PlanetBasemapsComboBox()
        {
            APIKeyChangedEvent.Subscribe((args) =>
            {
                //Clear();
                //_isInitialized = false;
                UpdateCombo();
            });

            PlanetGalleryFilterEvent.Subscribe((args) =>
            {
                FilterItems(args.FilterText);
            });

            PlanetGalleryChangedEvent.Subscribe((args) =>
            {
                AppendItems();
            });

            UpdateCombo();
        }