GasAITValve.cs 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /**
  2. *
  3. * @author seagle
  4. * @date 2024-7-22
  5. * @Description 管路图元件对象封装
  6. */
  7. using System;
  8. using System.Collections.Generic;
  9. using System.Linq;
  10. using System.Text;
  11. using System.Threading.Tasks;
  12. namespace MECF.Framework.UI.Core.DxfScript
  13. {
  14. public class GasAITValve : GasBaseShape
  15. {
  16. public GasCircle InnerCircle { get; set; } = null;
  17. public GasText InnerText { get; set; } = null;
  18. public GasPolyLine InnerPolyLine { get; set; } = null;
  19. public string Name { get; set; }
  20. public string Key { get; set; }
  21. public GasAITValve(GasCircle circle, GasText text, GasPolyLine polyLine)
  22. {
  23. InnerCircle = circle;
  24. InnerText = text;
  25. InnerPolyLine = polyLine;
  26. Enable = InnerPolyLine == null;
  27. Id = circle.Id;
  28. Name = $"ValveAV{InnerText.Text}";
  29. Key = $"PM1.{Name}.Feedback";
  30. }
  31. public override bool Contains(double x, double y)
  32. {
  33. return InnerCircle.Contains(x, y);
  34. }
  35. public override void Move(double x, double y)
  36. {
  37. InnerCircle.Move(x, y);
  38. InnerText.Move(x, y);
  39. InnerPolyLine?.Move(x, y);
  40. }
  41. }
  42. }