Exemplo n.º 1
0
        /// <summary>
        /// Open attribute table
        /// </summary>
        private void cmdTable_Click(object sender, EventArgs e)
        {
            if (_basicMap == null)
            {
                return;
            }

            UncheckOtherButtonsButMe(cmdTable);

            Map mainMap = _basicMap as Map;

            if (mainMap != null)
            {
                foreach (ILayer layer in mainMap.GetAllLayers())
                {
                    IFeatureLayer fl = layer as IFeatureLayer;

                    if (fl == null)
                    {
                        continue;
                    }
                    if (fl.IsSelected == false)
                    {
                        continue;
                    }
                    fl.ShowAttributes();
                }
            }
            else
            {
                foreach (ILayer layer in _basicMap.GetLayers())
                {
                    IFeatureLayer fl = layer as IFeatureLayer;

                    if (fl == null)
                    {
                        continue;
                    }
                    if (fl.IsSelected == false)
                    {
                        continue;
                    }
                    fl.ShowAttributes();
                }
            }
        }