123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- using Blue;
- using UnityEngine;
- using UnityEngine.UI;
- namespace GHZLangChao
- {
- public class DeviceInfo_Item : AbstractController
- {
- private DeviceParameters DeviceParameter;
- public Transform currentPos;
- public DataItem item;
- [SerializeField] private Button DetailsBtn;
- private IQueueSystem mQueueSystem;
- private void Start()
- {
- DetailsBtn.onClick.AddListener(ClickDetails);
- }
- int i;
- public void Init(DeviceParameters DeviceParameter, int i, DataItem item)
- {
- this.DeviceParameter = DeviceParameter;
- this.i = i;
- this.item = item;
- }
- private void ClickDetails()
- {
- DeviceParameter.deviceModel = "NetView400" + i;
-
- this.SendCommand(new DeviceDetailsUpdataDataCommand(DeviceParameter, currentPos, item));
- item.gameObject.SetActive(false);
- }
- private void OnEnable()
- {
- if (mQueueSystem == null)
- mQueueSystem = this.GetService<IQueueSystem>();
- mQueueSystem.Add(gameObject);
- }
- private void OnDestroy()
- {
- mQueueSystem.Remove(gameObject);
- }
- }
- }
|