当前位置: 首页>>代码示例>>C#>>正文


C# TabPage.Show方法代码示例

本文整理汇总了C#中System.Windows.Forms.TabPage.Show方法的典型用法代码示例。如果您正苦于以下问题:C# TabPage.Show方法的具体用法?C# TabPage.Show怎么用?C# TabPage.Show使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Windows.Forms.TabPage的用法示例。


在下文中一共展示了TabPage.Show方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: createFractalForm

        private FractalForm createFractalForm(string text)
        {
            FractalForm frmchild = new FractalForm();
              frmchild.MdiParent = this;
              //child Form will now hold a reference value to the tab control
              frmchild.TabCtrl = tabControl1;

              frmchild.Dock = System.Windows.Forms.DockStyle.Fill;
              frmchild.Location = new System.Drawing.Point(0, 0);
              frmchild.Text = text;

              //Add a Tabpage and enables it
              TabPage tp = new TabPage();
              tp.Parent = tabControl1;
              tp.Text = frmchild.Text;
              tp.Show();

              //child Form will now hold a reference value to a tabpage
              frmchild.TabPage = tp;

              //Activate the MDI child form
              childCount++;

              //Activate the newly created Tabpage
              tabControl1.SelectedTab = tp;

              frmchild.Show();
              return frmchild;
        }
开发者ID:Wethospu,项目名称:FractalMachine,代码行数:29,代码来源:MDIForm.cs

示例2: ShowPage

 /// <summary>
 /// 显示指定的page,并使之成为当前page
 /// </summary>
 /// <param name="container"></param>
 /// <param name="page"></param>
 public static void ShowPage(TabControl container,TabPage page)
 {
     if (!container.Contains(page))
     {
         container.TabPages.Add(page);
     }
     page.Show();
     container.SelectTab(page);
 }
开发者ID:lijuntao0607,项目名称:InvoicingManagement,代码行数:14,代码来源:TabControlManager.cs

示例3: SetupAndShowMdiChildForm

        public void SetupAndShowMdiChildForm(Form mdiParent, TabControl masterTabControl)
        {
            MasterTabControl = masterTabControl;
            MdiParent = mdiParent;

            var newTab = new TabPage(Text);
            ChildTabPage = newTab;
            newTab.Parent = masterTabControl;

            newTab.Show();

            Show();

            if (!MaximizeBox)
                WindowState = FormWindowState.Normal;

            masterTabControl.SelectedTab = newTab;
        }
开发者ID:Klocman,项目名称:MSREG,代码行数:18,代码来源:MdiChildForm.cs

示例4: AddForm

 private void AddForm(String name)
 {
     if (pageDictionary.Keys.Contains(name))
     {
         tabControlMain.TabPages[pageDictionary[name]].Select();
     }
     else
     {
         if (MenuConfig.MenuConfigSettings.Keys.Contains(name))
         {
             MenuConfigModel model = MenuConfig.MenuConfigSettings[name];
             try
             {
                 Type t = _assembly.GetType(model.OperateFormFullName);
                 object obj = Activator.CreateInstance(t);
                 Form frm = (Form)obj;
                 if (model.DialogModel)
                 {
                     frm.StartPosition = FormStartPosition.CenterScreen;
                     frm.ShowDialog(this);
                 }
                 else
                 {
                     TabPage page = new TabPage();
                     frm.TopLevel = false;
                     frm.WindowState = FormWindowState.Maximized;
                     frm.Dock = DockStyle.Fill;
                     page.Text = frm.Text + "      ";
                     page.Controls.Add(frm);
                     page.Tag = name;
                     tabControlMain.TabPages.Add(page);
                     pageDictionary.Add(name, tabControlMain.TabCount - 1);
                     page.Show();
                     tabControlMain.SelectTab(page);
                     frm.Show();
                 }
             }
             catch (Exception ex)
             {
                 _log.Error(String.Format("主窗体加载子窗体出现错误::配置名[{0}]\r\n", name), ex);
             }
         }
     }
 }
开发者ID:raindyi,项目名称:BusinessReport,代码行数:44,代码来源:MainForm.cs

示例5: IndicatorAdded

 private void IndicatorAdded(object sender, CandleChartControl.IndiEventArgs ie)
 {
     if (ie.indi.CreateOwnPanel == false || ie.indi.ownPane == null) return;
     // надо вкладку создать
     var tp = new TabPage { Parent = panesTabCtrl, Text = ie.indi.UniqueName, Tag = ie.indi };
     tp.Show();
     panesTabCtrl.SelectedTab = tp;
 }
开发者ID:johnmensen,项目名称:TradeSharp,代码行数:8,代码来源:ChartForm.cs

示例6: newTabToolStripMenuItem_Click_1

        private void newTabToolStripMenuItem_Click_1(object sender, EventArgs e)
        {
            // Set up the title of New tab.
            string title = "Tab " + (TabControl.TabCount + 1).ToString();

            // Create the Tab Object with the pre-set title.
            TabPage newTab = new TabPage(title);

            // Set the width and height of the new tab to the size of the browser window.
            newTab.Height = TabControl.Height;
            newTab.Width = TabControl.Width - 8;

            // Create a new Web Browser control.
            WebBrowser tabBrowser = new WebBrowser();

            // Set the width and height of thw new web browser to the size of the new tab page.
            tabBrowser.Width = newTab.Width;
            tabBrowser.Height = newTab.Height;

            // Add the new tab page to the main tab control.
            TabControl.TabPages.Add(newTab);

            // Add the web browser to the new tab.
            newTab.Controls.Add(tabBrowser);

            // Set anchors for the new web browser.
            tabBrowser.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
            | System.Windows.Forms.AnchorStyles.Left)
            | System.Windows.Forms.AnchorStyles.Right)));

            // Show the new tab.
            newTab.Show();
        }
开发者ID:Porterbg,项目名称:Freeflex,代码行数:33,代码来源:MainWindow.cs

示例7: AddTab

        protected void AddTab()
        {
            var tabPage = new TabPage();
            tabPage.Text = "blank";
            var browser = new GeckoWebBrowser();
            browser.Dock = DockStyle.Fill;
            tabPage.DockPadding.Top = 25;
            tabPage.Dock = DockStyle.Fill;

            // add a handler showing how to view the DOM
            //			browser.DocumentCompleted += (s, e) => 	TestQueryingOfDom(browser);

            // add a handler showing how to modify the DOM.
            //			browser.DocumentCompleted += (s, e) => TestModifyingDom(browser);

            AddToolbarAndBrowserToTab(tabPage, browser);

            m_tabControl.TabPages.Add(tabPage);
            tabPage.Show();
            m_tabControl.SelectedTab = tabPage;

            // Uncomment this to stop links from navigating.
            // browser.DomClick += StopLinksNavigating;

            // Demo use of ReadyStateChange.
            browser.ReadyStateChange += (s, e) => this.Text = browser.Document.ReadyState;
        }
开发者ID:K-Library-NET,项目名称:dotNET,代码行数:27,代码来源:Main.cs

示例8: CCProjectsView

        public CCProjectsView(CCProjectsViewMgr viewMgr, string viewName)
        {
            if (viewName == string.Empty)
            {
                viewName = "NewView" + viewMgr.TabControl.TabCount;
            }

            bUserView = true;
            bReadOnly = false;
            Text = viewName;
            m_viewMgr = viewMgr;
            m_tabPage = CreateTabPage(viewMgr, viewName);
            m_listView = CreateListView(viewMgr, m_tabPage);
            m_tabPage.Show();
            m_listView.Show();
        }
开发者ID:kascomp,项目名称:CruiseControl.NET,代码行数:16,代码来源:ProjectViewMgr.cs

示例9: ShowTabForm

        private void ShowTabForm(string text)
        {
            try
            {
                if (text == btn_BaseInfo.Text)
                {
                    frm = new frmBaseInfo();
                }
                if (text == btn_Account.Text)
                {
                    frm = new frmAccount();
                }
                if (text == btn_Manage.Text)
                {
                    frm = new frmDeliver();
                }
                if (text == btn_Notice.Text)
                {
                    frm = new frmNotice();
                }
                frm.TopLevel = false;
                TabPage tp = new TabPage();
                tp.Controls.Add(frm);
                frm.Dock = DockStyle.Fill;
                this.tabControl1.TabPages.Add(tp);
                tabControl1.SelectedTab = tp;
                tp.Show();

                frm.Show();
            }
            catch
            {
            }
        }
开发者ID:hahaer222,项目名称:security-ProtectionMonitoring,代码行数:34,代码来源:FrmSearchInfo.cs

示例10: GenerateControls

        /// <summary>
        /// Calls the other overload of GenerateControls using the hidden id parameter.
        /// </summary>
        /// <param name="id">A SensorIdentification containing an already-detected sensor's info</param>
        /// <param name="mPossibleIds">A list of possible letters we can assign to that sensor.</param>
        private void GenerateControls(String sensorLabel)
        {
            if (mTabControl.TabPages.ContainsKey(sensorLabel) == false)
            {
                TabPage newpage = new TabPage(sensorLabel);
                ComboBox newcombo = new ComboBox();

                newcombo.Name = "newComboBox";
                newcombo.AutoCompleteMode = AutoCompleteMode.SuggestAppend;

                foreach (BoneType t in Enum.GetValues(typeof(BoneType)))
                    newcombo.Items.Add(t.ToString());

                newpage.Controls.Add(newcombo);
                newcombo.Dock = DockStyle.None;
                newcombo.Left = (mTabControl.Width / 2) - newcombo.Width;
                newcombo.Top = (mTabControl.Height / 2) - newcombo.Height;

                if (mNexus.GetSensor(sensorLabel) != null)
                {
                    newcombo.SelectedIndex = (Int32)this.mSensorMappings[sensorLabel];
                }

                this.mTabControl.TabPages.Add(newpage);
                newpage.Show();
            }
        }
开发者ID:bittwiddler1,项目名称:SENSOR-AWARE-PERSONAL-TRAINER,代码行数:32,代码来源:MappingDialog.cs

示例11: ShowMDIChildFormWithTab

        //private void ShowNewForm(object sender, EventArgs e)
        //{
        //    // Create a new instance of the child form.
        //    Form childForm = new Form();
        //    // Make it a child of this MDI form before showing it.
        //    childForm.MdiParent = this;
        //    childForm.Text = "Window " + childFormNumber++;
        //    childForm.Show();
        //}
        //private void OpenFile(object sender, EventArgs e)
        //{
        //    OpenFileDialog openFileDialog = new OpenFileDialog();
        //    openFileDialog.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Personal);
        //    openFileDialog.Filter = "Text Files (*.txt)|*.txt|All Files (*.*)|*.*";
        //    if (openFileDialog.ShowDialog(this) == DialogResult.OK)
        //    {
        //        string FileName = openFileDialog.FileName;
        //        // TODO: Add code here to open the file.
        //    }
        //}
        //private void SaveAsToolStripMenuItem_Click(object sender, EventArgs e)
        //{
        //    SaveFileDialog saveFileDialog = new SaveFileDialog();
        //    saveFileDialog.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Personal);
        //    saveFileDialog.Filter = "Text Files (*.txt)|*.txt|All Files (*.*)|*.*";
        //    if (saveFileDialog.ShowDialog(this) == DialogResult.OK)
        //    {
        //        string FileName = saveFileDialog.FileName;
        //        // TODO: Add code here to save the current contents of the form to a file.
        //    }
        //}
        //private void ExitToolsStripMenuItem_Click(object sender, EventArgs e)
        //{
        //    Application.Exit();
        //}
        //private void CutToolStripMenuItem_Click(object sender, EventArgs e)
        //{
        //    // TODO: Use System.Windows.Forms.Clipboard to insert the selected text or images into the clipboard
        //}
        //private void CopyToolStripMenuItem_Click(object sender, EventArgs e)
        //{
        //    // TODO: Use System.Windows.Forms.Clipboard to insert the selected text or images into the clipboard
        //}
        //private void PasteToolStripMenuItem_Click(object sender, EventArgs e)
        //{
        //    // TODO: Use System.Windows.Forms.Clipboard.GetText() or System.Windows.Forms.GetData to retrieve information from the clipboard.
        //}
        //private void ToolBarToolStripMenuItem_Click(object sender, EventArgs e)
        //{
        //    toolStrip.Visible = toolBarToolStripMenuItem.Checked;
        //}
        //private void StatusBarToolStripMenuItem_Click(object sender, EventArgs e)
        //{
        //    statusStrip.Visible = statusBarToolStripMenuItem.Checked;
        //}
        //private void CascadeToolStripMenuItem_Click(object sender, EventArgs e)
        //{
        //    LayoutMdi(MdiLayout.Cascade);
        //}
        //private void TileVerticalToolStripMenuItem_Click(object sender, EventArgs e)
        //{
        //    LayoutMdi(MdiLayout.TileVertical);
        //}
        //private void TileHorizontalToolStripMenuItem_Click(object sender, EventArgs e)
        //{
        //    LayoutMdi(MdiLayout.TileHorizontal);
        //}
        //private void ArrangeIconsToolStripMenuItem_Click(object sender, EventArgs e)
        //{
        //    LayoutMdi(MdiLayout.ArrangeIcons);
        //}
        //private void CloseAllToolStripMenuItem_Click(object sender, EventArgs e)
        //{
        //    foreach (Form childForm in MdiChildren)
        //    {
        //        childForm.Close();
        //    }
        //}
        /// <summary>
        /// Procedura che si occupa di aprire ed aggiornare il menu delle finestre
        /// </summary>
        /// <param name="aForm"></param>
        public FormBase ShowMDIChildFormWithTab(FormBase aFormToShow)
        {
            FormBase res = SearchChildren(aFormToShow);

            // if (!mdiFormAperta(aFormToShow))
            if (res == aFormToShow)
            {
                if (ATabControlInMainForm != null)
                {
                    aFormToShow.ParentTabCtrl = ATabControlInMainForm;
                    TabPage tp = new TabPage();
                    tp.Parent = ATabControlInMainForm;
                    tp.Text = aFormToShow.Text;
                    tp.Show();
                    aFormToShow.ParentTabPag = tp;

                    childFormNumber++;
                    ATabControlInMainForm.SelectedTab = tp;
//.........这里部分代码省略.........
开发者ID:mattocchi,项目名称:VS2005Commons,代码行数:101,代码来源:MDIParentBase.cs

示例12: NewWindow

 //新窗体或新选项卡
 private void NewWindow(fbParent fbp)
 {
     TabPage tp = new TabPage(fbp.Name);
     tp.Name = fbp.Name;
     tp.BackColor = this.BackColor;
     fbp.CloseButtonShow = false;
     tp.Controls.Add(fbp);
     tabControl1.TabPages.Add(tp);
     tabControl1.SelectedTab = tp;
     tp.Show();
 }
开发者ID:fatbudy,项目名称:CSSM,代码行数:12,代码来源:FormMain.cs

示例13: Preprocess

        /*
        protected void Preprocess (string sSearchString)
        {
            int i_Stress = Convert.ToInt32(true); // It should've been bool
            if (Regex.IsMatch (sSearchString, (string)">"))
            {
                i_Stress = Convert.ToInt32(true);
            }
            else
            {
                i_Stress = Convert.ToInt32(true); // Test
            }
            sSearchString = sSearchString.Replace(">", "");
            if (Regex.IsMatch (sSearchString, (string)"\\-"))
            {
                string[] arr_Range = Regex.Split (sSearchString, (string)"([0-9]*)\\-([0-9]*)");
                long l_start_id = long.Parse(arr_Range[1]);
                long l_end_id = long.Parse(arr_Range[2]);
                m_LexPreprocessor.PrepareLexemes (l_start_id, l_end_id, i_Stress);
            }
            else
            {
                long l_lexeme_id = long.Parse (sSearchString);
                m_LexPreprocessor.PrepareLexeme(l_lexeme_id, i_Stress);
            }

        }   //  Preprocess (...)
        */
        protected void ShowParseOutput()
        {
            int iWordform = 0, iPreviousID = -1;
            tabControl.TabPages.Clear();

            if (null == m_Parser)
            {
                MessageBox.Show("Internal error: Parser object is null.", "Zal error", MessageBoxButtons.OK);
                return;
            }

            int iWordForm = 0;
            CWordFormManaged wordform = null;
            EM_ReturnCode eRet = (EM_ReturnCode)m_Parser.eGetFirstWordForm(ref wordform);
            if (CErrorCode.bError(eRet))
            {
                MessageBox.Show("Error");
                return;
            }
            if(EM_ReturnCode.H_NO_ERROR != eRet)
            {
                MessageBox.Show("Form not found");
                return;
            }

            do
            {
                m_listWordForms.Add(wordform);
                AnalysisPanel ap = new AnalysisPanel(iWordform);
            //                ap.Location = new System.Drawing.Point(0, iWordform * ap.Size.Height + 4);
                string sWordForm = wordform.sWordForm();
                MarkStress(ref sWordForm, wordform);
                ap.sWordform = sWordForm;
                ap.sID = wordform.llLexemeId().ToString();
                ap.eoPOS = wordform.ePos();
                ap.eoAspect = wordform.eAspect();
                ap.eoGender = wordform.eGender();
                ap.eoCase = wordform.eCase();
                ap.eoNumber = wordform.eNumber();
                ap.eoAnimacy = wordform.eAnimacy();
                ap.eoPerson = wordform.ePerson();
                ap.eoReflexiveness = wordform.eReflexive();
                ap.eoSubparadigm = wordform.eSubparadigm();
                iWordform = 0;
                iPreviousID = (int)wordform.llLexemeId();
                TabPage tab_Lexeme = new TabPage(wordform.sWordForm());
            //                tab_Lexeme.Text = wordform.sWordForm();
                tab_Lexeme.AutoScroll = true;
                tab_Lexeme.Controls.Add(ap);
                tabControl.TabPages.Add(tab_Lexeme);
                tab_Lexeme.Show();
                tab_Lexeme.Focus();
                ++iWordform;
                ap.Show();

                eRet = (EM_ReturnCode)m_Parser.eGetNextWordForm(ref wordform);

            } while (EM_ReturnCode.H_NO_ERROR == eRet);
        }
开发者ID:kbogatyrev,项目名称:Zal-Windows,代码行数:87,代码来源:ZalTestLogic.cs

示例14: IndicatorEdited

        void IndicatorEdited(object sender, CandleChartControl.IndiEventArgs ie)
        {
            // проверяем надо ли название панели поменять если изменили название индикатора
            var oldName = (string) sender;
            // имя индикатора не поменялось, проверяем надо ли удалять панель или добавить
            if (oldName != ie.indi.UniqueName)
            {
                foreach (TabPage page in panesTabCtrl.TabPages)
                {
                    if (page.Text != oldName) continue;
                    page.Text = ie.indi.UniqueName;
                    page.Tag = ie.indi;
                    break;
                }
            }

            // проверяем надо ли вкладку изменить
            if (!ie.indi.CreateOwnPanel && ie.indi.ownPane != null)
            {
                // возможно надо табу удалить, проверяем есть ли вообще она
                foreach (TabPage page in panesTabCtrl.TabPages)
                {
                    if (page.Text != ie.indi.UniqueName) continue;
                    panesTabCtrl.TabPages.Remove(page);
                    ie.indi.IsPanelVisible = false;
                    return;
                }
            }

            // проверяем случай когда включили свою панель на индикаторе
            if (ie.indi.CreateOwnPanel && ie.indi.ownPane != null)
            {
                // проверяем может такая таба уже открыта
                foreach (TabPage page in panesTabCtrl.TabPages)
                {
                    if (page.Text != ie.indi.UniqueName) continue;
                    // нашли табу - ничего не делаем
                    page.Tag = ie.indi;
                    return;
                }
                // табы нет, создаем ее
                chart.chart.Panes.Add(ie.indi.ownPane, ie.indi.ownPane.PercentHeight);
                var tp = new TabPage { Parent = panesTabCtrl, Text = ie.indi.UniqueName, Tag = ie.indi };
                tp.Show();
                panesTabCtrl.SelectedTab = tp;
                ie.indi.IsPanelVisible = true;
                foreach (var series in ie.indi.SeriesResult)
                {
                    if(!ie.indi.ownPane.Series.ContainsSeries(series))
                        ie.indi.ownPane.Series.Add(series);
                }
            }
        }
开发者ID:johnmensen,项目名称:TradeSharp,代码行数:53,代码来源:ChartForm.cs

示例15: SubscribeIndicatorsEvents

 private void SubscribeIndicatorsEvents()
 {
     // строим табы
     foreach (BaseChartIndicator indi in chart.indicators)
     {
         if (indi.CreateOwnPanel)
         {
             // надо вкладку создать
             var tp = new TabPage { Parent = panesTabCtrl, Text = indi.UniqueName, Tag = indi};
             tp.Show();
             if (!indi.IsPanelVisible)
             {
                 foreach (Pane pane in chart.chart.Panes)
                 {
                     if (pane.Title != indi.ownPane.Title) continue;
                     chart.chart.Panes.Remove(pane);
                     break;
                 }
             }
         }
     }
     if (panesTabCtrl.TabCount > 0)
         panesTabCtrl.Show();
     chart.IndiAddEvent += IndicatorAdded;
     chart.IndiRemoveEvent += IndicatorDeleted;
     chart.IndiEditEvent += IndicatorEdited;
 }
开发者ID:johnmensen,项目名称:TradeSharp,代码行数:27,代码来源:ChartForm.cs


注:本文中的System.Windows.Forms.TabPage.Show方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。