BoostStationEventEditer.cs 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. using NEIntelligentControl2.Windows.BoostStation;
  2. using SVGViewer.Manager;
  3. using SVGViewer.Models.Editer;
  4. using SVGViewer.Views;
  5. using System;
  6. using System.Collections.Generic;
  7. using System.Linq;
  8. using System.Text;
  9. using System.Threading.Tasks;
  10. using System.Windows;
  11. using System.Windows.Input;
  12. namespace NEIntelligentControl2.Models.BoostStation
  13. {
  14. /// <summary>
  15. /// 升压站事件编辑器
  16. /// </summary>
  17. internal class BoostStationEventEditer : IEditer
  18. {
  19. public PenManager PenManager { get; set; }
  20. public Action<object> EditCompleted { get; set; }
  21. public void MouseLeftButtonDown(SVGCanvas canvas, object sender, MouseButtonEventArgs e)
  22. {
  23. if (e.ClickCount < 2) return;
  24. var point = e.GetPosition(canvas);
  25. var v = canvas.GetVisualByPoint(point);
  26. if (v == null || string.IsNullOrWhiteSpace(v.InitialShapeInfo.Event)) return;
  27. SubStationWindow sbsw = new SubStationWindow(v.InitialShapeInfo.Event);
  28. sbsw.Owner = Application.Current.MainWindow;
  29. sbsw.ShowDialog();
  30. }
  31. public void MouseLeftButtonUp(SVGCanvas canvas, object sender, MouseButtonEventArgs e)
  32. {
  33. }
  34. public void MouseMove(SVGCanvas canvas, object sender, MouseEventArgs e)
  35. {
  36. }
  37. }
  38. }