/** * * @author seagle * @date 2024-7-22 * @Description 管路图元件对象封装 */ using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace MECF.Framework.UI.Core.DxfScript { public class GasAITValve : GasBaseShape { public GasCircle InnerCircle { get; set; } = null; public GasText InnerText { get; set; } = null; public GasPolyLine InnerPolyLine { get; set; } = null; public string Name { get; set; } public string Key { get; set; } public GasAITValve(GasCircle circle, GasText text, GasPolyLine polyLine) { InnerCircle = circle; InnerText = text; InnerPolyLine = polyLine; Enable = InnerPolyLine == null; Id = circle.Id; Name = $"ValveAV{InnerText.Text}"; Key = $"PM1.{Name}.Feedback"; } public override bool Contains(double x, double y) { return InnerCircle.Contains(x, y); } public override void Move(double x, double y) { InnerCircle.Move(x, y); InnerText.Move(x, y); InnerPolyLine?.Move(x, y); } } }