using NEIntelligentControl2.Windows.BoostStation; using SVGViewer.Manager; using SVGViewer.Models.Editer; using SVGViewer.Views; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Input; namespace NEIntelligentControl2.Models.BoostStation { /// /// 升压站事件编辑器 /// internal class BoostStationEventEditer : IEditer { public PenManager PenManager { get; set; } public Action EditCompleted { get; set; } public void MouseLeftButtonDown(SVGCanvas canvas, object sender, MouseButtonEventArgs e) { if (e.ClickCount < 2) return; var point = e.GetPosition(canvas); var v = canvas.GetVisualByPoint(point); if (v == null || string.IsNullOrWhiteSpace(v.InitialShapeInfo.Event)) return; SubStationWindow sbsw = new SubStationWindow(v.InitialShapeInfo.Event); sbsw.Owner = Application.Current.MainWindow; sbsw.ShowDialog(); } public void MouseLeftButtonUp(SVGCanvas canvas, object sender, MouseButtonEventArgs e) { } public void MouseMove(SVGCanvas canvas, object sender, MouseEventArgs e) { } } }