PartnerSbRecommendPanelCtrl.cs 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /// #pkgName FGUI包名
  2. /// #panelName UIPanel名字
  3. /// #UIName = $"{#pkgName}{#panelName}" UIKey名字
  4. /// 该脚本由模板创建
  5. /// created by cb 2024
  6. using FairyGUI;
  7. using FL.Data;
  8. using XGame.Framework.UI;
  9. namespace FL.FGUI
  10. {
  11. /// <summary>
  12. /// UI逻辑处理类
  13. /// </summary>
  14. /// <typeparam name=""></typeparam>
  15. public partial class PartnerSbRecommendPanelCtrl : UIController<PartnerSbRecommendPanelVM>
  16. {
  17. protected override void OnEnable(object intent)
  18. {
  19. AddUIListenres();
  20. VM.Tabs.selectedIndex = 0;
  21. ShowUI();
  22. }
  23. protected override void OnDisable()
  24. {
  25. RemoveUIListenres();
  26. }
  27. #region UI事件
  28. private void AddUIListenres()
  29. {
  30. VM.Tab1Btn.onClick.Add(OnClickTab1Btn);
  31. VM.Tab2Btn.onClick.Add(OnClickTab2Btn);
  32. VM.Tab3Btn.onClick.Add(OnClickTab3Btn);
  33. }
  34. private void RemoveUIListenres()
  35. {
  36. VM.Tab1Btn.onClick.Remove(OnClickTab1Btn);
  37. VM.Tab2Btn.onClick.Remove(OnClickTab2Btn);
  38. VM.Tab3Btn.onClick.Remove(OnClickTab3Btn);
  39. }
  40. private void OnClickTab1Btn(EventContext context)
  41. {
  42. }
  43. private void OnClickTab2Btn(EventContext context)
  44. {
  45. }
  46. private void OnClickTab3Btn(EventContext context)
  47. {
  48. }
  49. #endregion
  50. private bool _init = false;
  51. private void InitView()
  52. {
  53. if(_init) return;
  54. _init = true;
  55. VM.List.ListType = EGListType.Virtual;
  56. }
  57. private void ShowUI()
  58. {
  59. }
  60. }
  61. }