U3D_TobaccoWarehouseISMDTSy.../Assets/Scripts/YL/DeviceBaseInfoPanel.cs

44 lines
1.5 KiB
C#

using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class DeviceBaseInfoPanel : MonoBehaviour
{
public Button Offbutton;
public Text Nametext, Cartext, Controlstext, Positiontext, Traytext, Operationtext, Palletnumbertext, Electriccurrenttext, Tasknumbertext, Forewarningtext,
Electriccurrent, cornertext, Startingpointtext, Endpointtext;
void Start()
{
Offbutton.onClick.AddListener(() =>
{
gameObject.SetActive(false);
});
}
public void Getdata(string Name,string Car,string Controls,string Positiont,string Tray,string Operation,string Palletnumber,string Electriccurrent,string Tasknumber,string Forewarn,string
Ect,string Corner,string Starting,string Endpoint,Action action)
{
this.Nametext.text = Name;
this.Cartext.text = Car;
this.Controlstext.text = Controls;
this.Palletnumbertext.text = Positiont;
this.Traytext.text = Tray;
this.Operationtext.text = Operation;
this.Palletnumbertext.text = Palletnumber;
this.Electriccurrenttext.text = Electriccurrent;
this.Tasknumbertext.text = Tasknumber;
this.Forewarningtext.text = Forewarn;
this.Electriccurrenttext.text = Ect;
this.cornertext.text = Corner;
this.Startingpointtext.text = Starting;
this.Endpointtext.text = Endpoint;
Offbutton.onClick.AddListener(() =>
{
action?.Invoke();
});
}
}