SearchPanel_Item.cs 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. using UnityEngine;
  2. using UnityEngine.UI;
  3. namespace GHZLangChao
  4. {
  5. /// <summary>
  6. /// ShowDaoHang 面板 -- 搜索面板 ---子物体
  7. /// </summary>
  8. public class SearchPanel_Item : MonoBehaviour
  9. {
  10. public Text Name; // 设备名称
  11. public Text System; // 承载系统
  12. public Text Pos; // 设备位置
  13. public Text Type;// 设备类别
  14. public Text Model;// 设备型号
  15. public Text Factory;// 厂家
  16. public Text Standards;// 规格
  17. public void Init(MachineParameters MachineParameter)
  18. {
  19. Name.text = MachineParameter.deviceName;
  20. System.text = MachineParameter.carryingSystem;
  21. Pos.text = MachineParameter.deviceLocation;
  22. Type.text = MachineParameter.equipmentType;
  23. if(MachineParameter.equipmentModel!=null)
  24. Model.text = MachineParameter.equipmentModel;
  25. else
  26. Model.text = "--";
  27. if(MachineParameter.factory!=null)
  28. Factory.text = MachineParameter.factory;
  29. else
  30. Factory.text = "--";
  31. if(MachineParameter.specification!=null)
  32. Standards.text = MachineParameter.specification;
  33. else
  34. Standards.text = "--";
  35. }
  36. }
  37. }