PartnerSbBagListLineItemCtrl.cs 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /// #pkgName FGUI包名
  2. /// #panelName UIPanel名字
  3. /// #UIName = $"{#pkgName}{#panelName}" UIKey名字
  4. /// 该脚本由模板创建
  5. /// created by cb 2024
  6. using XGame.Framework.UI;
  7. namespace FL.FGUI
  8. {
  9. /// <summary>
  10. /// UI逻辑处理类
  11. /// </summary>
  12. /// <typeparam name=""></typeparam>
  13. public partial class PartnerSbBagListLineItemCtrl : UIController<PartnerSbBagListLineItemVM>
  14. {
  15. protected override void OnEnable(object intent)
  16. {
  17. AddUIListenres();
  18. }
  19. protected override void OnDisable()
  20. {
  21. RemoveUIListenres();
  22. }
  23. #region UI事件
  24. private void AddUIListenres() { }
  25. private void RemoveUIListenres() { }
  26. #endregion
  27. public void OnRefresh(int index, PartnerSbBagListParam param)
  28. {
  29. if (param.Type == 0)
  30. {
  31. VM.Type.selectedIndex = 1;
  32. VM.TitleLabel.title = param.Title;
  33. }
  34. else
  35. {
  36. VM.Type.selectedIndex = 0;
  37. VM.List.BindDatas(param.SbList);
  38. }
  39. VM.Group.EnsureBoundsCorrect();
  40. }
  41. }
  42. }