コード例 #1
0
        public void LoadFromIDatabase(QueryEventArgs args)
        {
            var uc  = new ucWorkspace();
            var tab = new WinControls.TabControl.TabPage("Workspace " + (tabMain.TabPages.Count + 1).ToString());

            uc.ParentTabControl = tabMain;
            uc.Dock             = DockStyle.Fill;
            tab.Controls.Add(uc);
            tabMain.TabPages.Add(tab);
            tabMain.SelectedTab = tab;
            uc.LoadFromIDatabase(args);
        }
コード例 #2
0
        private ucWorkspace addWorkspace(WinControls.TabControl.TabPage tabPage)
        {
            var uc = new ucWorkspace();

            uc.Settings = _settings;
            bool add = false;

            if (tabPage == null)
            {
                tabPage = new WinControls.TabControl.TabPage();
                add     = true;
            }
            tabPage.Text        = "Workspace " + (tabMain.TabPages.Count + 1).ToString();
            uc.ParentTabControl = tabMain;
            uc.Dock             = DockStyle.Fill;
            tabPage.Controls.Add(uc);
            if (add)
            {
                tabMain.TabPages.Add(tabPage);
                tabMain.SelectedTab = tabPage;
            }
            return(uc);
        }