예제 #1
0
        public static void UpdateTabs(IInspectPane pane)
        {
            bool tabUpdated = false;

            if (pane.CurTabs != null)
            {
                IList list = pane.CurTabs as IList;
                if (list != null)
                {
                    for (int i = 0; i < list.Count; i++)
                    {
                        Update((InspectTabBase)list[i]);
                    }
                }
                else
                {
                    foreach (InspectTabBase curTab in pane.CurTabs)
                    {
                        Update(curTab);
                    }
                }
            }
            if (!tabUpdated)
            {
                pane.CloseOpenTab();
            }
            void Update(InspectTabBase tab)
            {
                if (tab.IsVisible && tab.GetType() == pane.OpenTabType)
                {
                    tab.TabUpdate();
                    tabUpdated = true;
                }
            }
        }
예제 #2
0
        public static void UpdateTabs(IInspectPane pane)
        {
            bool flag = false;

            foreach (InspectTabBase curTab in pane.CurTabs)
            {
                if (curTab.IsVisible && curTab.GetType() == pane.OpenTabType)
                {
                    curTab.TabUpdate();
                    flag = true;
                }
            }
            if (!flag)
            {
                pane.CloseOpenTab();
            }
        }