/// <summary> /// 界面中 增加管道 /// </summary> /// <param name="pipe"></param> /// <param name="Start"></param> /// <param name="End"></param> public void AddPipe(Pipe pipe, Point Start, Point End) { Path path = new Path(); path.Stroke = pipe.GetColorBrush(); path.Data = DrawPipe(Start, End); path.StrokeThickness = App.StrokeThinkness * 2/3; path.SetValue(Canvas.ZIndexProperty, -1); path.ToolTip = pipe; context.Children.Add(path); listpath.Add(path); }
/// <summary> /// 界面中 添加管道, /// </summary> /// <param name="pipe"></param> /// <param name="line"></param> /// <returns>创建的path</returns> public Path AddPipe(Pipe pipe, VectorLine line) { Path path = new Path(); path.Stroke = pipe.GetColorBrush(); path.Data = DrawPipe(line.StartPoint , line.EndPoint); path.StrokeThickness = App.StrokeThinkness * 2 / 3; path.SetValue(Canvas.ZIndexProperty, -1); path.ToolTip = pipe; context.Children.Add(path); listpath.Add(path); return path; }