using CCS.App; using System.Collections; using System.Collections.Generic; using UnityEngine; public class inspectResultList_Button : MonoBehaviour { // Use this for initialization public TextMesh text_id; //序列号 public TextMesh text_Tag;//标题内容 public TextMesh text_status;//状态 public int tatus; private Color gray;//0 灰色 private Color yellow;//1 黄色 private Color green;//2 绿色 private Color red;//3 红色 void Start() { yellow = new Color(255f, 183 / 255f, 0); green = new Color(183 / 255f, 210 / 255f, 0); red = new Color(1f, 0f, 0f); } public void SetText_ID(string txt) { text_id.text = txt; } public void SetText_Tag(string txt) { text_Tag.text = txt; } public void SetText_Status(StartInspect startInspect) { switch (startInspect) { case StartInspect.Undetected: text_status.text = "未检测"; text_status.color = Color.gray; break; case StartInspect.To_be_tested: break; case StartInspect.qualified: text_status.text = "合格"; text_status.color = Color.green; break; case StartInspect.Unqualified: text_status.text = "不合格"; text_status.color = Color.red; break; default: break; } } }