71 lines
1.8 KiB
C#
71 lines
1.8 KiB
C#
|
using UnityEngine.UI;
|
||
|
using TMPro;
|
||
|
using UnityEngine;
|
||
|
|
||
|
namespace HK
|
||
|
{
|
||
|
public class CommodityItem : UIItemBase
|
||
|
{
|
||
|
[SerializeField] private Button btnEditor;
|
||
|
[SerializeField] private Button btnDelete;
|
||
|
[SerializeField] private RawImage rawPic;
|
||
|
[SerializeField] private Button btnReduce;
|
||
|
[SerializeField] private TMP_Text txtCount;
|
||
|
[SerializeField] private Button btnAdd;
|
||
|
[SerializeField] private TMP_Text txtPrice;
|
||
|
[SerializeField] private TMP_Text txtProductName;
|
||
|
|
||
|
public override void OnInit()
|
||
|
{
|
||
|
base.OnInit();
|
||
|
#region AutoGen_Init
|
||
|
|
||
|
btnEditor = GetValue<Button>("btnEditor");
|
||
|
btnDelete = GetValue<Button>("btnDelete");
|
||
|
rawPic = GetValue<RawImage>("rawPic");
|
||
|
btnReduce = GetValue<Button>("btnReduce");
|
||
|
txtCount = GetValue<TMP_Text>("txtCount");
|
||
|
btnAdd = GetValue<Button>("btnAdd");
|
||
|
txtPrice = GetValue<TMP_Text>("txtPrice");
|
||
|
txtProductName = GetValue<TMP_Text>("txtProductName");
|
||
|
|
||
|
btnEditor.onClick.AddListener(OnClickbtnEditor);
|
||
|
btnDelete.onClick.AddListener(OnClickbtnDelete);
|
||
|
btnReduce.onClick.AddListener(OnClickbtnReduce);
|
||
|
btnAdd.onClick.AddListener(OnClickbtnAdd);
|
||
|
|
||
|
#endregion
|
||
|
}
|
||
|
|
||
|
#region AutoGen_Method
|
||
|
|
||
|
private void OnClickbtnEditor() {}
|
||
|
private void OnClickbtnDelete() {}
|
||
|
private void OnClickbtnReduce() {}
|
||
|
private void OnClickbtnAdd() {}
|
||
|
|
||
|
#endregion
|
||
|
|
||
|
public override void OnDispose()
|
||
|
{
|
||
|
base.OnDispose();
|
||
|
#region AutoGen_Dispose
|
||
|
|
||
|
btnEditor.onClick.RemoveListener(OnClickbtnEditor);
|
||
|
btnDelete.onClick.RemoveListener(OnClickbtnDelete);
|
||
|
btnReduce.onClick.RemoveListener(OnClickbtnReduce);
|
||
|
btnAdd.onClick.RemoveListener(OnClickbtnAdd);
|
||
|
|
||
|
btnEditor = null;
|
||
|
btnDelete = null;
|
||
|
rawPic = null;
|
||
|
btnReduce = null;
|
||
|
txtCount = null;
|
||
|
btnAdd = null;
|
||
|
txtPrice = null;
|
||
|
txtProductName = null;
|
||
|
|
||
|
#endregion
|
||
|
}
|
||
|
}
|
||
|
}
|