12345678910111213141516171819202122232425262728293031323334353637 |
- using UnityEngine;
- using UnityEngine.UI;
- using TMPro;
- namespace GHZLangChao
- {
- /// <summary>
- /// ShowDaoHang 面板 -- 故障面板 ---子物体
- /// </summary>
- public class FaultPanel_Item : AbstractController
- {
- public TextMeshProUGUI Name; // 设备名称
- public TextMeshProUGUI System; // 承载系统
- public TextMeshProUGUI Level; // 告警级别
- public TextMeshProUGUI Time;// 告警时间
- private AlarmData AlarmData;
- public void Init(AlarmData AlarmData)
- {
- this.AlarmData = AlarmData;
- Name.text = AlarmData.title;
- System.text = AlarmData.carryingSystem;
- Level.text = AlarmData.level;
- Time.text = AlarmData.equipmentAlarmTime;
- }
- private Color mButtonColor = new Color(102,178,255,128);
- public void ClickButton()
- {
- Debug.Log($"选择了{name}");
- GetComponent<RawImage>().color = mButtonColor;
- XunJianManager.AlarmData = AlarmData;
- BasicDeviceControl.AlarmData = AlarmData;
- }
- }
- }
|