private void btn_ok_Click(object sender, EventArgs e) { if (combo_layer.SelectedItem == null) { MessageBox.Show("没有图层!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } if (combo_unit.SelectedItem == null || text_dis.Text == null || text_path == null) { MessageBox.Show("请完善距离、单位、路径", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } data_operate dop = new data_operate(); feaLyr = dop.GetLayerByName(map, combo_layer.SelectedItem.ToString()) as IFeatureLayer; distance = System.Convert.ToDouble(text_dis.Text); unit = combo_unit.SelectedItem.ToString(); MapAnalysis.BufferAnalysis(feaLyr, path, distance, unit); }
private void btn_ok_Click(object sender, EventArgs e) { IActiveView map_trans = map as IActiveView; MapAnalysis.SelectMapFeaturesByAttributeQuery(map_trans, feaLyr, textbox_sql.Text); }