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); } } } } }
public override void Run() { ILegendItem selectedItem = (GIS.FrameWork.Application.App.Legend as GIS.Common.Dialogs.Legend).SelectedLegendMenuItem; if (selectedItem != null) { LabelSetupCommand labelSetup = new LabelSetupCommand(); ILabelLayer _labelLayer = labelSetup._LabelLayer; if (_labelLayer == null) { return; } FeatureLayerActions fla = new FeatureLayerActions(); if (fla != null) { _labelLayer.DynamicVisibilityWidth = _labelLayer.FeatureLayer.MapFrame.ViewExtents.Width; fla.LabelExtents(_labelLayer); } } }
public override void Run() { ILegendItem selectedItem = (GIS.FrameWork.Application.App.Legend as GIS.Common.Dialogs.Legend).SelectedLegendMenuItem; if (selectedItem != null) { if (_labelLayer == null) { _labelLayer = new MapLabelLayer(selectedItem as IFeatureLayer); (selectedItem as FeatureLayer).LabelLayer = _labelLayer; (selectedItem as FeatureLayer).ShowLabels = true; } _labelLayer.CreateLabels(); FeatureLayerActions fla = new FeatureLayerActions(); if (fla != null) { fla.LabelSetup(_labelLayer); } } }