public override void Run() { ILegendItem selectedItem = (GIS.FrameWork.Application.App.Legend as GIS.Common.Dialogs.Legend).SelectedLegendMenuItem; if (selectedItem != null) { if (selectedItem != null) { if (selectedItem is FeatureLayer) { FeatureLayerActions fla = new FeatureLayerActions(); if (fla != null && selectedItem != null) { fla.ShowProperties(selectedItem as IFeatureLayer); } } else if (selectedItem is RasterLayer) { RasterLayerActions rla = new RasterLayerActions(); if (rla != null && selectedItem != null) { rla.ShowProperties(selectedItem as IRasterLayer); } } else if (selectedItem is ImageLayer) { ImageLayerActions ila = new ImageLayerActions(); if (ila != null && selectedItem != null) { ila.ShowProperties(selectedItem as IImageLayer); } } } } }
/// <summary> /// Handles when this layer should show its properties by firing the event on the shared event sender. /// </summary> /// <param name="e">The event args.</param> protected override void OnShowProperties(HandledEventArgs e) { ImageLayerActions?.ShowProperties(this); }