Exemplo n.º 1
0
        /* Usage: View the data of selected layer
         * Author: Ding
         * Time: 2019/03/22
         */
        private void miAccessData_Click(object sender, EventArgs e)
        {
            IMap m_map = axMapControl1.Map;

            if (m_mapDocumentName == string.Empty)  //If no map was loaded, the function won't run, preventing stack overfolw.
            {
                MessageBox.Show("ERROR: 没有可显示的图层!");
                return;
            }
            DataOperator dataOperator = new DataOperator(axMapControl1.Map);
            DataBoard    dataBoard    = new DataBoard(axMapControl1.Map, dataOperator.GetLayerDataTable(m_map.get_Layer(0).Name));

            //default show the datatable of teh frist layer
            dataBoard.Show();
        }
Exemplo n.º 2
0
        //when the selected layer was changed, dispaly the datatable of the newly selected layer
        private void cbLayerList_SelectedIndexChanged(object sender, EventArgs e)
        {
            DataOperator dataOperator = new DataOperator(m_map);

            dataGridView1.DataSource = dataOperator.GetLayerDataTable(cbLayerList.SelectedItem.ToString());
        }