12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- 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
- {
- /// <summary>
- /// 升压站事件编辑器
- /// </summary>
- internal class BoostStationEventEditer : IEditer
- {
- public PenManager PenManager { get; set; }
- public Action<object> 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)
- {
- }
- }
- }
|