using DefaultNamespace.ProcessMode; using System.Collections; using System.Collections.Generic; using System.Threading; using TMPro; using UnityEngine; using UnityEngine.UI; /// /// 绑定终端、启动监控、到货验收 /// public class ELP_TerminalMonitorsArrivalHandover : MonoBehaviour { public TMP_InputField Select; /// /// 终端号选择面板 /// public GameObject TerminalNumPanel; /// /// 车牌号输入框 /// public TMP_InputField CarNum; /// /// 车牌号查询按钮 /// public Button CarNumSelect; /// /// 车牌号校验结果 /// public GameObject CarNumoutcome; /// /// 终端号右移按钮 /// public Button AddRightBt; /// /// 右侧终端号显示面板 /// public GameObject RightPanel; /// /// 监控按钮 /// public Button monitorbt; /// /// 预警按钮 /// public Button Earlywarning; /// /// 到货交接按钮 /// public Button connectbt; bool isclickright = false; void Start() { Earlywarning.onClick.AddListener(() => { MotionFramework.MotionEngine.GetModule().HandleClick(new List() { "true" }); }); monitorbt.onClick.AddListener(() => { MotionFramework.MotionEngine.GetModule().HandleClick(new List() { "true" }); }); connectbt.onClick.AddListener(() => { MotionFramework.MotionEngine.GetModule().HandleClick(new List() { "true" }); }); CarNumSelect.onClick.AddListener(() => { if (CarNum.text.Contains("苏F88428")) { MotionFramework.MotionEngine.GetModule().HandleClick(new List() { RightPanel.activeInHierarchy.ToString().ToLower(),"true" }); CarNumoutcome.SetActive(true); } }); AddRightBt.onClick.AddListener(() => { isclickright = true; RightPanel.SetActive(true); TerminalNumPanel.SetActive(false); }); } void Update() { if (Select.text != "" && !isclickright) { TerminalNumPanel.SetActive(true); AddRightBt.gameObject.SetActive(true); } else { TerminalNumPanel.SetActive(false); AddRightBt.gameObject.SetActive(false); } } }