ShanxiKnowledgeBase/SXElectricalInspection/Assets/Adam/Scripts/MobileTerminalController.cs

50 lines
1.3 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using Adam;
using Components;
using MobileTerminal;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using Utility;
//============================================================
//支持中文文件使用UTF-8编码
//@author #AUTHOR#
//@create #CREATEDATE#
//@company #COMPANY#
//
//@description:
//============================================================
public class MobileTerminalController : MonoBehaviour
{
public Transform tapContent;
public MobileTerminalTipsItem itemPrfab;
// Use this for initialization
private void Start()
{
OnTable();
}
public void OnTable()
{
if (tapContent.childCount > 0)
{
for (int i = 0; i < tapContent.childCount; i++)
{
Destroy(tapContent.GetChild(i).gameObject);
}
}
List<UserListItem> userList = UIManager.Instance.messageData.userList;
for (int i = 0; i < userList.Count; i++)
{
MobileTerminalTipsItem itemTip = Instantiate(itemPrfab, tapContent);
string info = $"{ userList[i].testpoint}:{ userList[i].valuepoint}";
itemTip.SetValue(info);
}
}
}