55 lines
1.3 KiB
C#
55 lines
1.3 KiB
C#
using CHN;
|
|
using TMPro;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
using WI;
|
|
|
|
public class Panel_MachineDeleteRegistration : PanelBase, IPopupPanel
|
|
{
|
|
private Machine machine;
|
|
|
|
public TextMeshProUGUI Text_MachineName;
|
|
public Button Button_Registration;
|
|
public Button Button_Delete;
|
|
public Button Button_Close;
|
|
|
|
public override void AfterAwake()
|
|
{
|
|
Button_Registration.onClick.AddListener(OnClickRegistartionButton);
|
|
Button_Delete.onClick.AddListener(OnClickDeleteButton);
|
|
Button_Close.onClick.AddListener(Close);
|
|
}
|
|
|
|
public void Open()
|
|
{
|
|
gameObject.SetActive(true);
|
|
}
|
|
public void SetData(Machine machine)
|
|
{
|
|
this.machine = machine;
|
|
Text_MachineName.SetText(machine.machineName);
|
|
|
|
Open();
|
|
}
|
|
public void Close()
|
|
{
|
|
gameObject.SetActive(false);
|
|
}
|
|
private void OnClickRegistartionButton()
|
|
{
|
|
machine.gameObject.SetActive(true);
|
|
|
|
machine.machineKPI.isInteractable = true;
|
|
machine.machineKPI.SetActive(true);
|
|
Close();
|
|
}
|
|
private void OnClickDeleteButton()
|
|
{
|
|
machine.gameObject.SetActive(false);
|
|
|
|
machine.machineKPI.isInteractable = false;
|
|
machine.machineKPI.SetActive(false);
|
|
Close();
|
|
}
|
|
}
|