123456789101112131415161718192021222324252627282930 |
- using System;
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using UnityEngine.UI;
- public class SPJK_ObsItem : MonoBehaviour
- {
- public ObsData _data;
- public Text nameText;
- public Text typeText;
- public Text codeText;
- public Text updataTimeText;
-
- public void SetData(ObsData data)
- {
- _data = data;
- nameText.text = _data.name;
- switch (_data.type)
- {
- case obsType.BuYuanObs:
- typeText.text = "分类:<color=#FFFFFF>补元</color>";
- break;
- case obsType.TaoKouObs:
- typeText.text = "分类:<color=#FFFFFF>套口</color>";
- break;
- }
- codeText.text = $"编码:<color=#FFFFFF>{_data.deviceId}</color>";;
- }
- }
|