private void buttonDelAttribute_Click(object sender, EventArgs e) { if (MessageBox.Show("确定要删除该属性字段?", "提示!", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { try { GSOFeatureLayer pFeatureLayer = geoLayer as GSOFeatureLayer; if (pFeatureLayer == null) { return; } GSOFeatureDataset dataset = pFeatureLayer.Dataset as GSOFeatureDataset; dataset.DeleteField(listBoxAttribute.SelectedItem.ToString()); if (listBoxAttribute.SelectedItem != null) { listBoxAttribute.Items.Remove(listBoxAttribute.SelectedItem); dataset.SaveAs(@"F:\新建文件夹"); MessageBox.Show("删除字段成功!", "提示!"); } if (m_globeControl != null) { m_globeControl.Refresh(); } } catch (System.Exception exp) { Log.PublishTxt(exp); } } }