void v_OnPositionChanged(object sender, DataVertex.VertexPositionChangedEventArgs e) { var vertex = (DataVertex)sender; if (Area.VertexList.Keys.Any(v => v.Id == vertex.Id)) { var vc = Area.VertexList.First(v => v.Key.Id == vertex.Id).Value; //throw new NotImplementedException(); _viewmodel.Do(new VertexPositionChangeOperation(Area, vc, e.OffsetX, e.OffsetY, vertex)); } }
void vertex_OnPositionChanged(object sender, DataVertex.VertexPositionChangedEventArgs e) { if (View == null || View.Area == null) { return; } var vertex = (DataVertex)sender; if (View.Area.VertexList.Keys.Any(v => v.Id == vertex.Id)) { var vc = View.Area.VertexList.First(v => v.Key.Id == vertex.Id).Value; //throw new NotImplementedException(); OnNext(new VertexPositionChangeOperation(View.Area, vc, e.OffsetX, e.OffsetY, vertex)); } }