Ejemplo n.º 1
0
 private void dataGridView1_SelectionChanged(object sender, EventArgs e)
 {
     //如果是来自地图窗口的就不继续
     if (FromMapWindow)
     {
         return;
     }
     //如果两个窗口当前选集都是空的 也没必要继续
     if (Layer.Selection.Count == 0 && dataGridView1.SelectedRows.Count == 0)
     {
         return;
     }
     //更新当前窗口的选择集
     Layer.ClearSelection();
     foreach (DataGridViewRow row in dataGridView1.SelectedRows)
     {
         //空值也可能会被选中
         if (row.Cells[0].Value != null)
         {
             Layer.AddSelectedFeatureByID((int)(row.Cells[0].Value));
         }
     }
     //更新地图窗口的显示
     MapWindow.UpdateMap();
 }
Ejemplo n.º 2
0
 private void btClearSelect_Click(object sender, EventArgs e)
 {
     if (layer == null)
     {
         return;
     }
     layer.ClearSelection();
     UpdateMap();
     //statusStrip1.Text = "0";
 }
Ejemplo n.º 3
0
        private void dataGridView1_Click(object sender, EventArgs e)
        {
            GISLayer layer = document.layers[document.layers.Count - 1];

            layer.ClearSelection();
            for (int i = 0; i < dataGridView1.SelectedRows.Count; i++)
            {
                layer.Features[(int)(dataGridView1.SelectedRows[i].Cells[0].Value)].Selected = true;
            }
            updateview();
        }
Ejemplo n.º 4
0
 private void btClearSelect_Click(object sender, EventArgs e)
 {
     if (layer == null)
     {
         return;
     }
     layer.ClearSelection();
     UpdateMap();
     //toolStripStatusLabel1.Text = "0";
     toolStripStatusLabel2.Text = "click @";
     //statusStrip1.Text = "0";
     UpdateAttributeWindow();
 }