Пример #1
0
        public override void Run()
        {
            ILegendItem selectedItem = (GIS.FrameWork.Application.App.Legend as GIS.Common.Dialogs.Legend).SelectedLegendMenuItem;

            if (selectedItem != null)
            {
                if (selectedItem is FeatureLayer)
                {
                    FeatureLayerActions fla = new FeatureLayerActions();
                    if (fla != null)
                    {
                        fla.ExportData(selectedItem as IFeatureLayer);
                    }
                }
                else if (selectedItem is RasterLayer)
                {
                    RasterLayerActions rla = new RasterLayerActions();
                    if (rla != null)
                    {
                        rla.ExportData((selectedItem as RasterLayer).DataSet);
                    }
                }
                else if (selectedItem is ImageLayer)
                {
                    ImageLayerActions ila = new ImageLayerActions();
                    if (ila != null)
                    {
                        ila.ExportData((selectedItem as ImageLayer).DataSet);
                    }
                }
            }
        }
Пример #2
0
 /// <summary>
 /// Handles export data from this layer.
 /// </summary>
 protected override void OnExportData()
 {
     ImageLayerActions?.ExportData(Image);
 }