private void OnCellClick(object sender, DataGridViewCellEventArgs e) { _layerHandle = (int)layerGrid[0, e.RowIndex].Tag; if (e.ColumnIndex == 0) { bool isVisible = (bool)layerGrid[0, e.RowIndex].Value; layerGrid[0, e.RowIndex].Value = !isVisible; var layerName = layerGrid[e.ColumnIndex + 1, e.RowIndex].Value.ToString(); _mapLayersHandler.EditLayer(_layerHandle, layerName, !isVisible); } if (e.ColumnIndex == 1) { MarkCurrentLayerName(e.RowIndex); _mapLayersHandler.set_MapLayer(_layerHandle); //itemConvertToGrid25.Enabled = false; //itemAlwaysKeepOnTop.Checked = _mapLayersHandler.CurrentMapLayer.KeepOnTop; if (global.MappingMode == fad3MappingMode.grid25Mode) { if (_mapLayersHandler.CurrentMapLayer.LayerType == "ShapefileClass") { var sf = _mapLayersHandler.CurrentMapLayer.LayerObject as Shapefile; //itemConvertToGrid25.Enabled = sf.ShapefileType == ShpfileType.SHP_POINT; } } } }
private void DataGridLayers_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (_gridIsClicked && dataGridLayers.SelectedItems.Count > 0) { MapLayersHandler.set_MapLayer(((MapLayer)dataGridLayers.SelectedItem).Handle); SetRowsNormalFont(); SelectCurrentLayerInGrid(); } }