Ejemplo n.º 1
0
        //public string NameOfItemControl (Control ctrl)
        //{
        //    return TabPages[IndexOfItemControl (ctrl)].Text;
        //}

        //public int IndexOfItemControl (Control ctrl) {
        //    int iRes = -1
        //        , indx = 0;

        //    while ((indx < TabCount) && (iRes < 0)) {
        //        //if (TabPages [indx].Controls.Contains (ctrl) == true)
        //        if (TabPages[indx].Controls[0].Equals (ctrl) == true) //??? тоже не работает
        //            iRes = indx;
        //        else
        //            ;

        //        indx ++;
        //    }

        //    return iRes;
        //}

        private static string getNameTab(string text, TYPE_TAB type)
        {
            int cntSpace = 5;

            if (type == TYPE_TAB.FLOAT)
            {
                cntSpace += 4;
            }
            else
            {
                ;
            }

            return(new string(' ', 1) + text + new string(' ', cntSpace));
        }
Ejemplo n.º 2
0
 public PropertyTab(int id, TYPE_TAB type)
 {
     this.id = id; this.type = type;
 }
Ejemplo n.º 3
0
        //public void TabPagesClear()
        //{
        //    while (TabCount > 1)
        //        TabPages.RemoveAt (TabCount - 1);

        //    m_listTypeTabs.Clear ();
        //}

        public void AddTabPage(string name, int id, TYPE_TAB typeTab)
        {
            m_listPropTabs.Add(new PropertyTab(id, typeTab));
            this.TabPages.Add(name, getNameTab(name, typeTab));
        }
Ejemplo n.º 4
0
        //public void TabPagesClear()
        //{
        //    while (TabCount > 1)
        //        TabPages.RemoveAt (TabCount - 1);

        //    m_listTypeTabs.Clear ();
        //}
        /// <summary>
        /// Добавить вкладку
        /// </summary>
        /// <param name="tab">Объект вкладки</param>
        /// <param name="name">Наименование(заголовок) вкладки</param>
        /// <param name="id">Идентификатор вкладки</param>
        /// <param name="typeTab">Тип вкладки</param>
        public void AddTabPage(Control tab, string name, int id, TYPE_TAB typeTab)
        {
            m_listPropTabs.Add(new PropertyTab(id, typeTab));
            this.TabPages.Add(name, getNameTab(name, typeTab));
            this.TabPages[TabCount - 1].Controls.Add(tab);
        }