pFeatureClass = pFeatureLayer.FeatureClass; pFeatureCursor = pFeatureClass.Search((IQueryFilter)pSpatialFilter,false); pFeature = pFeatureCursor.NextFeature();
while (pFeature != null) {
listView1.Items.Add(pLayer.Name); } } } }
}
=============================== »Ø´ðÍøÓÑÉØ»ªÏìµ±µ±¹ØÓÚ¸ü¸Ä·ûºÅµÄ´úÂë ===============================
private void axTOC1_OnDoubleClick(object sender, ITOCControlEvents_OnDoubleClickEvent e) {
esriTOCControlItem itemType = esriTOCControlItem.esriTOCControlItemNone; IBasicMap basicMap = null; ILayer layer = null; object unk = null; object data = null;
axTOC1.HitTest(e.x, e.y, ref itemType, ref basicMap, ref layer, ref unk, refdata);
if (e.button == 1) { if (itemType == esriTOCControlItem.esriTOCControlItemLegendClass) { //È¡µÃͼÀý
ILegendClass pLegendClass =((ILegendGroup)unk).get_Class((int)data);
//´´½¨·ûºÅÑ¡ÔñÆ÷SymbolSelectorʵÀý
FormSymbolControl SymbolSelectorFrm= newFormSymbolControl(pLegendClass, layer);
if (SymbolSelectorFrm.ShowDialog()== DialogResult.OK) { //¾Ö²¿¸üÐÂÖ÷Map¿Ø¼þ
//m_mapControl.ActiveView.PartialRefresh(esriViewDrawPhase.esriViewGeography, null, null);
axMap1.ActiveView.PartialRefresh(esriViewDrawPhase.esriViewGeography, null, null);
//ÉèÖÃеķûºÅ
pLegendClass.Symbol = SymbolSelectorFrm.pSymbol; //¸üÐÂÖ÷Map¿Ø¼þºÍͼ²ã¿Ø¼þ this.axMap1.ActiveView.Refresh(); this.axTOC1.Refresh(); } } } }
=============================== »Ø´ðÍøÓÑÉØ»ªÏìµ±µ±¹ØÓÚÏÔʾÊôÐԵĴúÂë ===============================
///
/// Ìî³äDataTableÖеÄÊý¾Ý /// /// /// ///
public static DataTable CreateDataTable(ILayer pLayer, string tableName) {
//´´½¨¿ÕDataTable DataTable pDataTable = CreateDataTableByLayer(pLayer, tableName); //´´½¨DataTableµÄÐжÔÏó DataRow pDataRow = null;
//È¡µÃͼ²ãÀàÐÍ
string shapeType = getShapeType(pLayer);
Ïà¹ØÍÆ¼ö£º