private void changeLineSegment(Point2D newPnt)
{
int index = (int)draggingVertex.Attributes["Index"];
int _partIndex = (int)draggingVertex.Attributes["PartIndex"];
foreach (Feature item in hoverLayer.Features)
{
if (item.Attributes.ContainsKey("PartIndex") && (int)item.Attributes["PartIndex"] == _partIndex)
{
if (item.Geometry is GeoLine)
{
int index0 = (int)item.Attributes["Index0"];
int index1 = (int)item.Attributes["Index1"];
if (index0 == index)
{
( ( item.Geometry ) as GeoLine ).Parts[0][0] = newPnt;
}
else if (index1 == index)
{
( ( item.Geometry ) as GeoLine ).Parts[0][1] = newPnt;
}
}
}
}
}