Beispiel #1
0
        //重新打开属性表
        public bool ReloadAttributeTable()
        {
            try
            {
                m_barTable.Show();
                ILayer m_Layer = ClsGlobal.GetSelectedLayer(m_hookHelper);
                m_AttributeTable = new System.Data.DataTable();
                if (m_Layer == null)
                {
                    return(false);
                }

                if (m_Layer is IFeatureLayer)
                {
                    ReLoadFeatureLayerTable(m_Layer);
                }
                else if (m_Layer is IRasterLayer)
                {
                    ReLoadRasterLayerTable(m_Layer);
                }
                else
                {
                    return(false);
                }

                UpdateUI(m_Layer);
                m_gridfield.DataSource  = m_AttributeTable;
                m_gridfield.CurrentCell = null;
            }
            catch (System.Exception ex)
            {
                return(false);
            }
            return(true);
        }
        /// <summary>
        /// Occurs when this command is clicked
        /// </summary>
        public override void OnClick()
        {
            ILayer layer = ClsGlobal.GetSelectedLayer(m_hookHelper);

            if (layer is IFeatureLayer)
            {
                IFeatureLayer featureLayer = (IFeatureLayer)layer;
                featureLayer.Selectable = false;
            }
        }
Beispiel #3
0
        /// <summary>
        /// Occurs when this command is clicked
        /// </summary>
        public override void OnClick()
        {
            // TODO: Add CmdLayerProperties.OnClick implementation
            ILayer layer = ClsGlobal.GetSelectedLayer(m_hookHelper);

            if (layer == null)
            {
                return;
            }

            LibCerMap.FrmLayerProperties frm = new LibCerMap.FrmLayerProperties(layer);
            frm.ShowDialog();
        }
        /// <summary>
        /// Occurs when this command is clicked
        /// </summary>
        public override void OnClick()
        {
            // TODO: Add CmdJoinAttribute.OnClick implementation

            ILayer layer = ClsGlobal.GetSelectedLayer(m_hookHelper);

            if (layer is IFeatureLayer)
            {
                LibCerMap.FrmJoinAttribute frm = new LibCerMap.FrmJoinAttribute(pMapControl, layer, m_barTable, m_AttributeTable, m_gridfield, m_docktable);
                frm.ShowDialog();
            }
            else
            {
                MessageBox.Show("只有矢量图层才能进行数据表连接", "提示", MessageBoxButtons.OK);
            }
        }
        /// <summary>
        /// Occurs when this command is clicked
        /// </summary>
        public override void OnClick()
        {
            ILayer layer = ClsGlobal.GetSelectedLayer(m_hookHelper);

            if (m_subType == 1)
            {
                layer.MaximumScale = m_mapControl.MapScale;
            }
            if (m_subType == 2)
            {
                layer.MinimumScale = m_mapControl.MapScale;
            }
            if (m_subType == 3)
            {
                layer.MaximumScale = 0;
                layer.MinimumScale = 0;
            }
            m_mapControl.Refresh(esriViewDrawPhase.esriViewGeography, null, null);
        }