DeviceInfo_Item.cs 807 B

123456789101112131415161718192021222324252627282930
  1. using Blue;
  2. using UnityEngine;
  3. using UnityEngine.UI;
  4. namespace GHZLangChao
  5. {
  6. public class DeviceInfo_Item : AbstractController
  7. {
  8. private DeviceParameters DeviceParameter;
  9. [SerializeField] private Button DetailsBtn;
  10. private void Start()
  11. {
  12. DetailsBtn.onClick.AddListener(ClickDetails);
  13. }
  14. int i;
  15. public void Init(DeviceParameters DeviceParameter,int i)
  16. {
  17. this.DeviceParameter = DeviceParameter;
  18. this.i = i;
  19. }
  20. private void ClickDetails()
  21. {
  22. DeviceParameter.deviceModel = "NetView400"+i;
  23. this.SendCommand(new DeviceDetailsUpdataDataCommand(DeviceParameter)); // 触发事件,打开面板,更新数据
  24. }
  25. }
  26. }