56 lines
1.7 KiB
C#
56 lines
1.7 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;
|
|
|
|
void Start()
|
|
{
|
|
Offbutton.onClick.AddListener(() =>
|
|
{
|
|
gameObject.SetActive(false);
|
|
});
|
|
}
|
|
|
|
public void Getdata(string Car, string Controls, string Positiont, string Tray, string Operation, string Palletnumber, string Electriccurrent, string Tasknumber, string Forewarn, string
|
|
Ect, string Corner, string Starting, Action action)
|
|
{
|
|
this.Cartext.text = "С³µ" + Car;
|
|
if (Controls == "1")
|
|
{
|
|
this.Controlstext.text = "¿ÕÏÐ";
|
|
}
|
|
else if (Controls == "2")
|
|
{
|
|
this.Controlstext.text = "·±Ã¦";
|
|
}
|
|
this.Palletnumbertext.text = Positiont;
|
|
this.Traytext.text = Tray;
|
|
if (Operation == "True")
|
|
{
|
|
this.Operationtext.text = "ÔÚÏß";
|
|
}
|
|
else if (Operation == "False")
|
|
{
|
|
this.Operationtext.text = "ÀëÏß";
|
|
}
|
|
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;
|
|
Offbutton.onClick.AddListener(() =>
|
|
{
|
|
action?.Invoke();
|
|
});
|
|
}
|
|
}
|