74 lines
2.0 KiB
C#
74 lines
2.0 KiB
C#
using Runtime;
|
|
using UnityEngine.UI;
|
|
using TMPro;
|
|
using UnityEngine;
|
|
|
|
namespace HK
|
|
{
|
|
public class PrintReceiptUI : UIBase
|
|
{
|
|
[SerializeField] private TMP_Text txtName;
|
|
[SerializeField] private TMP_Text txtOrderID;
|
|
[SerializeField] private Button btnConfirm;
|
|
[SerializeField] private Button btnReprintReceipt;
|
|
[SerializeField] private TMP_Text txtWaitPrinter;
|
|
|
|
public override void OnInit()
|
|
{
|
|
base.OnInit();
|
|
|
|
#region AutoGen_Init
|
|
|
|
txtName = GetValue<TMP_Text>("txtName");
|
|
txtOrderID = GetValue<TMP_Text>("txtOrderID");
|
|
btnConfirm = GetValue<Button>("btnConfirm");
|
|
btnReprintReceipt = GetValue<Button>("btnReprintReceipt");
|
|
txtWaitPrinter = GetValue<TMP_Text>("txtWaitPrinter");
|
|
|
|
btnConfirm.onClick.AddListener(OnClickbtnConfirm);
|
|
btnReprintReceipt.onClick.AddListener(OnClickbtnReprintReceipt);
|
|
|
|
#endregion
|
|
}
|
|
|
|
public override void OnOpen()
|
|
{
|
|
base.OnOpen();
|
|
txtWaitPrinter.gameObject.SetActive(true);
|
|
btnConfirm.gameObject.SetActive(false);
|
|
btnReprintReceipt.gameObject.SetActive(false);
|
|
txtName.text = ShoppingCartManager.Instance.ShoppingCart.userName;
|
|
|
|
}
|
|
|
|
#region AutoGen_Method
|
|
|
|
private void OnClickbtnConfirm()
|
|
{
|
|
}
|
|
|
|
private void OnClickbtnReprintReceipt()
|
|
{
|
|
}
|
|
|
|
#endregion
|
|
|
|
public override void OnDispose()
|
|
{
|
|
base.OnDispose();
|
|
|
|
#region AutoGen_Dispose
|
|
|
|
btnConfirm.onClick.RemoveListener(OnClickbtnConfirm);
|
|
btnReprintReceipt.onClick.RemoveListener(OnClickbtnReprintReceipt);
|
|
|
|
txtName = null;
|
|
txtOrderID = null;
|
|
btnConfirm = null;
|
|
btnReprintReceipt = null;
|
|
txtWaitPrinter = null;
|
|
|
|
#endregion
|
|
}
|
|
}
|
|
} |