Example #1
0
 public virtual void OnTabSelect(YxTabItem tableView)
 {
     if (tableView == null)
     {
         return;
     }
     if (tableView.GetToggle().value.Equals(true))
     {
         TabSelectAction(tableView);
         StartCoroutine(YxTools.WaitExcuteCalls(OnTabSelectAction));
     }
 }
Example #2
0
 public virtual void OnTabSelect(YxTabItem tableView)
 {
     if (tableView == null)
     {
         return;
     }
     if (tableView.GetToggle().value)
     {
         TabSelectAction(tableView);
         if (gameObject.activeInHierarchy)
         {
             StartCoroutine(OnTabSelectAction.WaitExcuteCalls());
         }
     }
 }
Example #3
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="tabItem"></param>
        public void OnChageTabeClick(YxTabItem tabItem)
        {
            if (tabItem == null)
            {
                return;
            }
            var toggle = tabItem.GetToggle();

            if (toggle == null || !tabItem.GetToggle().value)
            {
                return;
            }
            var tabData = tabItem.GetData <TabData>();

            if (tabData == null)
            {
                return;
            }
            var view  = tabData.View;
            var tabId = tabItem.Id;

            view = view == null && ViewsDictionary.ContainsKey(tabId) ? ViewsDictionary[tabId] : view;
            if (view == null)
            {
                if (ViewsDictionary.ContainsKey(tabId))
                {
                    view = ViewsDictionary[tabId];
                }
                else
                {
                    if (ViewsDictionary.ContainsKey("0"))
                    {
                        view = ViewsDictionary["0"];
                    }
                }
            }
            if (view == null)
            {
                return;
            }
            OnChageTab(view, tabData);
        }
Example #4
0
 protected virtual void TabSelectAction(YxTabItem tableView)
 {
 }