/// <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();
        }
예제 #2
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();
        }
예제 #3
0
 protected override void OnClick()
 {
     PlanetGalleryChangedEvent.Publish(new PlanetGalleryChangedEventArgs("prev", "next"));
 }