123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using UnityEngine.EventSystems;
- using DG.Tweening;
- using CCS.App;
- public class InspectList_Button : MonoBehaviour
- {
- public TextMesh text_num, text_name, text_isOk;
- public Material material_Undetected, material_To_be_tested, material_qualified, material_Unqualified;
- public int status;
- public int jiluStaatus;
- public bool isChange;
- public string content;
- public string mainSubtasks;
- public string endResultViewPos;
- public int viewTag;
- public string code;
- public StartInspect startInspect = StartInspect.Undetected;
- public void OnSelect(bool isSelect)
- {
- if (isSelect)
- {
- this.GetComponent<MeshRenderer>().material = material_To_be_tested;
- text_isOk.text = "待结测";
- }
- else
- {
- SetBtnState();
- }
- }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- void OnEnable()
- {
- SetBtnState();
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- }
- public void SetBtnState()
- {
- switch (startInspect)
- {
- case StartInspect.Undetected:
- this.GetComponent<MeshRenderer>().material = material_Undetected;
- text_isOk.text = "未检测";
- break;
- case StartInspect.To_be_tested:
-
- break;
- case StartInspect.qualified:
- this.GetComponent<MeshRenderer>().material = material_qualified;
- text_isOk.text = "合格";
- break;
- case StartInspect.Unqualified:
- this.GetComponent<MeshRenderer>().material = material_Unqualified;
- text_isOk.text = "不合格";
- break;
- default:
- break;
- }
- }
- }
|