private void buttonInsertNode_Click(object sender, EventArgs e) { if (listViewNodeList.SelectedIndices.Count > 0) { int nSelIndex = listViewNodeList.SelectedIndices[0]; GSOPoint3ds nodes = GetCurNodes(); if (nodes != null && nodes.Count > nSelIndex) { m_GlobeControl.Globe.AddToEditHistroy(mlayer, mfeature, EnumEditType.Modify); GSOPoint3d newPoint = new GSOPoint3d(); try { newPoint.X = Double.Parse(textBoxX.Text); newPoint.Y = Double.Parse(textBoxY.Text); newPoint.Z = Double.Parse(textBoxZ.Value.ToString()); } catch (System.Exception exp) { Log.PublishTxt(exp); } nodes.Insert(nSelIndex, newPoint); /* * ListViewItem item = new ListViewItem(); * item.SubItems.Add(textBoxX.Text); * item.SubItems.Add(textBoxY.Text); * item.SubItems.Add(textBoxZ.Text); * listViewNodeList.Items.Insert(nSelIndex,item); */ UpdateNodeViewList(); // 选中刚才的那个索引 SelectItem(m_nCurSelected); if (m_GlobeControl != null) { m_GlobeControl.Refresh(); } } } }