57 lines
1.7 KiB
C#
57 lines
1.7 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using EasyInject.Attributes;
|
|
using TMPro;
|
|
/// <summary>
|
|
/// AGV UI弹窗面板
|
|
/// </summary>
|
|
[GameObjectBean]
|
|
public class AgvPopUI : AbstractPopUI
|
|
{
|
|
[Header("AGV")]
|
|
[Header("设备名称")]
|
|
public TMP_Text agv_deviceCode;
|
|
[Header("驱动名称")]
|
|
public TMP_Text agv_driverName;
|
|
[Header("在线状态")]
|
|
public TMP_Text agv_onlineStatus;
|
|
[Header("工作状态")]
|
|
public TMP_Text agv_wokingStatus;
|
|
[Header("起点设备")]
|
|
public TMP_Text agv_startDevice;
|
|
[Header("结束设备")]
|
|
public TMP_Text agv_endDevice;
|
|
[Header("当前动作")]
|
|
public TMP_Text agv_currentAction;
|
|
[Header("反馈状态")]
|
|
public TMP_Text agv_feedBack;
|
|
[Header("当前托盘")]
|
|
public TMP_Text agv_currentContainer;
|
|
[Header("反馈状态")]
|
|
public TMP_Text agv_lastContainer;
|
|
[Header("异常消息")]
|
|
public TMP_Text agv_message;
|
|
|
|
public override void Open(IDevice device)
|
|
{
|
|
AgvData data = device.DynamicData<AgvData>();
|
|
base.Open(device);
|
|
agv_currentAction.text = data.currentAction;
|
|
agv_currentContainer.text = data.container;
|
|
agv_deviceCode.text = data.deviecCode;
|
|
agv_driverName.text = data.driverName;
|
|
agv_message.text = data.errorMessage;
|
|
agv_endDevice.text = data.endDevice;
|
|
agv_startDevice.text = data.startDevice;
|
|
agv_onlineStatus.text = data.onlineStatus;
|
|
agv_wokingStatus.text = data.isWoking;
|
|
agv_feedBack.text = data.feedBack;
|
|
gameObject.SetActive(!gameObject.activeSelf);
|
|
|
|
rectTransform.transform.parent = device.Transform;
|
|
rectTransform.localPosition = Vector3.zero + offset;
|
|
|
|
}
|
|
}
|