123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- /**
- *
- * @author seagle
- * @date 2024-7-22
- * @Description 管路图元件对象封装
- */
- using Aitex.Core.Common.DeviceData;
- using log4net;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Xml.Linq;
- namespace MECF.Framework.UI.Core.DxfScript
- {
- public class GasAnalogControl4Jet : GasBaseShape
- {
- public GasButton InnerButton { get; set; } = null;
- public GasButton TopButton { get; set; } = null;
- public GasButton LeftButton { get; set; } = null;
- public GasButton RightButton { get; set; } = null;
- public AITMfcData AITMfcData { get; set; }
- public bool IsMfm { get; set; } = true;
- public string RampngKey { get; set; }
- public string AlarmValueKey { get; set; }
- public string ValueKey { get; set; }
- public string MaxValueKey { get; set; }
- public string UnitKey { get; set; }
- public string Name { get; set; }
- public GasAnalogControl4Jet(GasButton innerButton, GasButton topButton, GasButton leftButton, GasButton rightButton)
- {
- InnerButton = innerButton;
- TopButton = topButton;
- LeftButton = leftButton;
- RightButton = rightButton;
- Id = innerButton.Id;
- SetDataKey();
- }
- public override bool Contains(double x, double y)
- {
- return InnerButton.Contains(x, y);
- }
- public override void Move(double x, double y)
- {
- InnerButton.Move(x, y);
- TopButton.Move(x, y);
- LeftButton.Move(x, y);
- RightButton.Move(x, y);
- }
- private void SetDataKey()
- {
- IsMfm = TopButton.InnerText.Text.Contains("MFM");
- Name = IsMfm ? TopButton.InnerText.Text : $"MFC{TopButton.InnerText.Text}";
- Name = Name.Replace(" ", "");
- ValueKey = $"PM1.{Name}.Feedback";
- UnitKey = $"PM1.{Name}.Unit";
- AlarmValueKey= $"PM1.{Name}.AlarmWatchTable";
- RampngKey = $"PM1.{Name}.Ramping";
- MaxValueKey = $"PM1.{Name}.Scal";
- }
- }
- }
|