コード例 #1
0
        public MvcControl SetActiveTabByCaption(string caption)
        {
            MvcTabPage tabPage = FindTabByCaption(caption);

            if (tabPage != null)
            {
                SelectedTab = tabPage;
                return(tabPage.MvcControl);
            }

            return(null);
        }
コード例 #2
0
        private int FindIndexToInsert(MvcTabPage tabPage)
        {
            int i = 0;

            for (; i < TabPages.Count; i++)
            {
                if (((MvcTabPage)TabPages[i]).Order > tabPage.Order)
                {
                    break;
                }
            }
            return(i);
        }
コード例 #3
0
        public void AddTab(MvcControl mvcControl)
        {
            Debug.Assert(m_isInitialized, "Still not initialized");

            MvcTabPage tabPage = new MvcTabPage(this, mvcControl);

            tabPage.VisibleChanged += OnTabVisibleChanged;
            int index = FindIndexToInsert(tabPage);

            TabPages.Insert(index, tabPage);
            tabPage.Initialize();



            m_tabPages.Add(tabPage);
        }
コード例 #4
0
        private void OnTabVisibleChanged(object sender, EventArgs e)
        {
            Debug.Assert(sender != null && sender is MvcTabPage);
            MvcTabPage tabPage = (MvcTabPage)sender;

            if (!tabPage.Visible)
            {
                TabPages.Remove(tabPage);
            }
            else //from non visible to  visible: need to insert
            {
                int index = FindIndexToInsert(tabPage);

                TabPages.Insert(index, tabPage);
            }
        }
コード例 #5
0
ファイル: MvcControl.cs プロジェクト: radislavB/AlmLoggers
 internal void Initialize(MvcTabPage parent)
 {
     m_mvcTabPage = parent;
     Initialize();
 }