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