private void dgLayers_CellClick(object sender, DataGridViewCellEventArgs e) { if (_elements == null) { return; } if (_elements.Count <= e.RowIndex || e.RowIndex < 0) { return; } if (e.ColumnIndex == 3) { FormLayerProperties dlg = new FormLayerProperties(_elements[e.RowIndex].dataset, _elements[e.RowIndex].layer); dlg.ShowDialog(); } }
private void OnLayerProperties(object sender, EventArgs e) { var dlg = new FormLayerProperties(_mapDocument, _map, FeatureLayer.Class.Dataset, FeatureLayer); if (dlg.ShowDialog() == DialogResult.OK) { if (_mapDocument.Application is IMapApplication) { ((IMapApplication)_mapDocument.Application).RefreshTOCElement((ILayer)FeatureLayer); ((IMapApplication)_mapDocument.Application).RefreshActiveMap(DrawPhase.All); } if (_mapDocument.FocusMap != null) { _mapDocument.FocusMap.TOC.Reset(); } } }