Пример #1
0
        // WORKAROUND: Selected is never raised if the first tab is selected. (which is annoying if you want to initialize it)
        public void SelectTab(string tabPageName, bool forceSelection)
        {
            if (!forceSelection)
            {
                base.SelectTab(tabPageName);
            }
            else
            {
                if (!TabPages.ContainsKey(tabPageName))
                {
                    return;
                }

                TabPage targetTab = First(x => x.Name.Equals(tabPageName));

                if (TabPages.IndexOfKey(tabPageName) == 0)
                {
                    OnSelected(new TabControlEventArgs(targetTab, 0, TabControlAction.Selected));
                }
                else
                {
                    base.SelectTab(tabPageName);
                }
            }
        }
Пример #2
0
        public void UnHighlightTabPage(string key)
        {
            int i = TabPages.IndexOfKey(key);

            if (i != -1)
            {
                UnHighlightTabPage(i);
            }
        }
Пример #3
0
        public void HighlightTab(string key)
        {
            int i = TabPages.IndexOfKey(key);

            if (i >= 0)
            {
                HighlightTab(i);
            }
        }
Пример #4
0
        public void SelectTab(string tabPageName)
        {
            var index = TabPages.IndexOfKey(tabPageName);

            if (index == -1)
            {
                return;
            }
            SelectTab(index);
        }
Пример #5
0
        public void HighlightTabPage(string key)
        {
            int i = TabPages.IndexOfKey(key);

            HighlightTabPage(i);
        }