PartnerEpiBookListItemCtrl.cs 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /// #pkgName FGUI包名
  2. /// #panelName UIPanel名字
  3. /// #UIName = $"{#pkgName}{#panelName}" UIKey名字
  4. /// 该脚本由模板创建
  5. /// created by cb 2024
  6. using FairyGUI;
  7. using XGame.Database;
  8. using XGame.Framework.UI;
  9. namespace FL.FGUI
  10. {
  11. /// <summary>
  12. /// UI逻辑处理类
  13. /// </summary>
  14. /// <typeparam name=""></typeparam>
  15. public partial class PartnerEpiBookListItemCtrl : UIController<PartnerEpiBookListItemVM>
  16. {
  17. protected override void OnEnable(object intent)
  18. {
  19. AddUIListenres();
  20. }
  21. protected override void OnDisable()
  22. {
  23. RemoveUIListenres();
  24. }
  25. #region UI事件
  26. private void AddUIListenres()
  27. {
  28. }
  29. private void RemoveUIListenres()
  30. {
  31. }
  32. #endregion
  33. public void OnRefresh(int index, int id)
  34. {
  35. var table = EpigraphTableRepo.Get(id);
  36. XGame.Framework.Assert.IsNotNull(table, $"铭文表不存在,id:{id}");
  37. VM.NameLabel.text = table.Name;
  38. VM.EpiLabel.Ctrl.SetEpiIcon(id, true);
  39. }
  40. }
  41. }