private void Mc_MouseLeftButtonUp(object sender, MouseButtonEventArgs e) { WellLocation wl = GetClickWell(e); if (wl != null) { LayerControl lc = this.AssociatedObject as LayerControl; SelectWellLocations.Add(wl.WellNum); WellPosition = new Point(wl.X, wl.Y); Point p = lc.Root.RenderTransform.Transform(WellPosition);//转换到圆心 WellPointList.Add(p); this.TrackAdorner.RemoveLastPoint(); this.TrackAdorner.AddPoint(p); this.TrackAdorner.AddPoint(p); //执行画线事件 if (OnDrawWellLine != null) { UndoWellPointListHistory.Clear(); UndoSelectWellLocationstHistory.Clear(); OnDrawWellLine.Invoke(this); } } }
public void Redo() { Point p = UndoWellPointListHistory.Pop(); string s = UndoSelectWellLocationstHistory.Pop(); if (!IsStopMove) { this.TrackAdorner.Track.Points.Insert(this.TrackAdorner.Track.Points.Count - 1, p); } else { this.TrackAdorner.Track.Points.Add(p); } WellPointList.Add(p); SelectWellLocations.Add(s); }