Example #1
0
        public void CreateTabPage(string text)
        {
            bool isExist = TabPages.Select(item => item.Text).Contains(text);

            if (isExist)
            {
                this.SelectedTabPage = TabPages.Where(item => item.Text == text).First();
            }
            else
            {
                XtraTabPage page = new XtraTabPage();
                page.Text = text;
                page.Controls.Add(UserControlFactory.CreateInstance(text));
                TabPages.Add(page);
                this.SelectedTabPage = page;
            }
        }