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


C# TabPage.Select方法代码示例

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


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

示例1: toolStripStatusLabel1_Click

        private void toolStripStatusLabel1_Click(object sender, EventArgs e)
        {
            // add browser tab
            TabPage newBrowserTab = new TabPage();

            // add an underlying browser
            WebBrowser newBrowser = new WebBrowser();
            newBrowser.Dock = DockStyle.Fill;
            newBrowser.DocumentCompleted += new WebBrowserDocumentCompletedEventHandler(webBrowser1_DocumentCompleted);

            // add tab and a browser to the tab control/*
            newBrowserTab.Controls.Add(newBrowser);
            this.tabControl1.TabPages.Add(newBrowserTab);
            newBrowserTab.Name = comboBox1.Text;

            // navigate and focus new tab
            newBrowserTab.Select();
            newBrowser.Navigate("http://krypton-project.webs.com/start");
            newBrowser.Name = "webBrowser2";
            newBrowserTab.Controls.Add(statusStrip1);
        }
开发者ID:Krypton-Project,项目名称:Fox,代码行数:21,代码来源:phantom.cs

示例2: webBrowser1_NewWindow

        private void webBrowser1_NewWindow(object sender, CancelEventArgs e)
        {
            // add browser tab
            TabPage newBrowserTab = new TabPage();

            // add an underlying browser
            WebBrowser newBrowser = new WebBrowser();
            newBrowser.Dock = DockStyle.Fill;
            newBrowser.DocumentCompleted += new WebBrowserDocumentCompletedEventHandler(webBrowser1_DocumentCompleted);

            // add tab and a browser to the tab control/*
            newBrowserTab.Controls.Add(newBrowser);
            this.tabControl1.TabPages.Add(newBrowserTab);
            newBrowserTab.Name = comboBox1.Text;

            // navigate and focus new tab
            newBrowserTab.Select();
            ((WebBrowser)tabControl1.SelectedTab.Controls[0]).Navigate(((WebBrowser)
                tabControl1.SelectedTab.Controls[0]).StatusText);
            newBrowser.Name = "webBrowser2";
            e.Cancel = true;
        }
开发者ID:Krypton-Project,项目名称:Fox,代码行数:22,代码来源:phantom.cs

示例3: newTabToolStripMenuItem_Click

 private void newTabToolStripMenuItem_Click(object sender, EventArgs e)
 {
     TabPage tb = new TabPage();
     TextBox tx = new TextBox();
     tx.Font = MaintextBox.Font;
     tx.ScrollBars = ScrollBars.Both;
     tx.TextChanged += (MaintextBox_TextChanged_1);
     tx.Dock = DockStyle.Fill;
     tx.Multiline = true;
     tb.Text = "untitled";
     tb.Controls.Add(tx);
     tabControl.Controls.Add(tb);
     tb.BringToFront();
     tb.Select();
     tb.PerformLayout();
 }
开发者ID:kryptonX,项目名称:pamphlet,代码行数:16,代码来源:Form1.cs

示例4: openToolStripMenuItem_Click

        private void openToolStripMenuItem_Click(object sender, EventArgs e)
        {
            OpenFileDialog op = new OpenFileDialog();
            op.Filter = filter.ToString();
            if (op.ShowDialog() == DialogResult.OK)
            {
                if (((TextBox)tabControl.SelectedTab.Controls[0]).Text.Length > 0)
                {
                    TabPage tb = new TabPage();
                    TextBox tx = new TextBox();
                    tx.Font = MaintextBox.Font;
                    tx.ScrollBars = ScrollBars.Both;
                    tx.TextChanged += (MaintextBox_TextChanged_1);
                    tx.Dock = DockStyle.Fill;
                    tx.Multiline = true;
                    tb.Text = "untitled";
                    tb.Controls.Add(tx);
                    tabControl.Controls.Add(tb);
                    tb.BringToFront();
                    tb.Select();
                    tb.PerformLayout();
                    using (System.IO.StreamReader sr = new System.IO.StreamReader(op.FileName))
                    {
                        tx.Text = (sr.ReadToEnd());
                        sr.Dispose();
                    }

                }
                else
                {
                    using (System.IO.StreamReader sr = new System.IO.StreamReader(op.FileName))
                    {
                        ((TextBox)tabControl.SelectedTab.Controls[0]).Text = (sr.ReadToEnd());
                        tabControl.SelectedTab.Text = op.FileName;
                        sr.Dispose();
                    }
                }
            }
        }
开发者ID:kryptonX,项目名称:pamphlet,代码行数:39,代码来源:Form1.cs

示例5: ModifiData

        private void ModifiData()
        {
            string so = this.gv_SalesOrder.GetFocusedRowCellValue(gv_SalesOrder.Columns.ColumnByFieldName("sSO")).ToString();
            ZX.Win.FunctionParameter FP = new ZX.Win.FunctionParameter();
            FP = (ZX.Win.FunctionParameter)this.Tag;
            FP.pub_Object = so;
            //MessageBox.Show(this.MdiParent.Name.ToString());
            Form f = SystemClass.ApplicationFormMain.LoadFunction("Form_Main_WorkOrd", FP, this.MdiParent);

            System.Windows.Forms.TabPage TP = new System.Windows.Forms.TabPage(f.Text);
            TP.Tag = f;
            TP.ToolTipText = f.Text;
            foreach (Control item in this.ParentForm.Controls)
            {
                if ((item is System.Windows.Forms.TabControl) && (item.Name == "TabControFormList"))
                {
                    TabControl c = (TabControl)item;
                    c.TabPages.Add(TP);
                    c.SelectedTab = TP;
                }
            }
            TP.Select();

            this.Close();
        }
开发者ID:BGCX262,项目名称:zxerp2013-svn-to-git,代码行数:25,代码来源:Form_Main_SalesOrder.cs

示例6: zxPanel1_MouseDoubleClick

        private void zxPanel1_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            Form Frm = null;

            Point formPoint = this.PointToClient(Control.MousePosition);//鼠标相对于窗体左上角的坐标

            Point ZxpanelPoint = this.PointToClient(zxPanel1.Location);//zxpanel1的位置

            //两个坐标相减
            Point ItemPoint = new Point((formPoint.X - ZxpanelPoint.X), (formPoint.Y - ZxpanelPoint.Y - 20));

            //foreach (IPaintItem item1 in zxPanel1.m_paintitems)
            //{

            //    MessageBox.Show(formPoint.ToString() + "=" + item1.ItemLocate.ToString() + "+" + ZxpanelPoint.ToString());
            //    //MessageBox.Show(item1.ItemLocate.ToString());
            //}

            IPaintItem item = this.zxPanel1.GetItemAtPoint(ItemPoint);
            if (item != null && item is PaintUnit)
            {
                //string itemname = ZX.Controls.DotNetMagic.Controls.InputBox.InputBox.ShowInputBox();
                //MessageBox.Show(item.ItemName);
                //MessageBox.Show(item.ItemSpace);

                string FunctionID = "";
                FunctionID = item.ItemSpace;//sender.ToString();
                FormMainFP.pub_Object = FunctionID;//为特殊功能做准备

                //判断是否有权限
                string strSqlAUTHORITY = "SELECT * FROM SYS_USER_AUTHORITY where iValidFlag>0 and sFunctionID='" + FunctionID + "' and sRole='" + FormMainFP.Pub_sRole + "'";
                if ((ZX.ZXSystem.DBUtility.DbHelperSQL.Query(strSqlAUTHORITY).Tables[0].Rows.Count) == 0)
                {

                    ////ShowstatusMessage("没有权限访问");
                    //strMessageLable.BackColor = Color.Blue;
                    //strMessageLable.ForeColor = Color.White;
                    //strMessageLable.Text = "没有权限访问";
                    ShowLabelMessage("没有权限访问");
                    return;
                }

                string strSql = "SELECT * FROM SYS_Functions where sFunctionID='" + FunctionID + "'";
                if ((ZX.ZXSystem.DBUtility.DbHelperSQL.Query(strSql).Tables[0].Rows.Count) > 0)
                {
                    zxPanel1.Visible = false;
                }

                if (PeculiarFunction(FunctionID) == false)//判断是不是特殊功能
                {

                    Frm = SystemClass.ApplicationFormMain.LoadFunction(FunctionID, FormMainFP, this);
                    if (Frm != null)
                    {

                        System.Windows.Forms.TabPage TP = new System.Windows.Forms.TabPage(Frm.Text);
                        TP.Tag = Frm;
                        TP.ToolTipText = Frm.Text;
                        this.TabControFormList.TabPages.Add(TP);
                        this.TabControFormList.SelectedTab = TP;
                        TP.Select();

                        AddAgoFormList();

                    }
                }

            }

            //MessageBox.Show("OK");
        }
开发者ID:BGCX262,项目名称:zxerp2013-svn-to-git,代码行数:71,代码来源:Form_Main.cs

示例7: ToolNext_Click

        /// <summary>
        /// 点击事件
        /// </summary>
        /// <param name="FunctionText">功能名称</param>
        private void ToolNext_Click(string FunctionText)
        {
            string id = ZX.ZXSystem.DBUtility.DbHelperSQL.GetSingle("select sFunctionID  from SYS_FUNCTIONs where sFunctionName like '%" + FunctionText + "%'").ToString();
            Form Frm = null;
            Frm = SystemClass.ApplicationFormMain.LoadFunction(id, FormMainFP, this);
            if (Frm != null)
            {
                System.Windows.Forms.TabPage TP = new System.Windows.Forms.TabPage(Frm.Text);
                TP.Tag = Frm;
                TP.ToolTipText = Frm.Text;
                this.TabControFormList.TabPages.Add(TP);
                this.TabControFormList.SelectedTab = TP;
                TP.Select();

                AddAgoFormList();

            }
        }
开发者ID:BGCX262,项目名称:zxerp2013-svn-to-git,代码行数:22,代码来源:Form_Main.cs

示例8: Form_Main_KeyUp

 private void Form_Main_KeyUp(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.F11)
     {
         ZX.Win.FunctionParameter FP = new ZX.Win.FunctionParameter();
         FP.ToolStripitemDisplayStyle = ToolStripItemDisplayStyle.ImageAndText;
         FP.functionFormID = "-1";
         ZX.Win.ReflectionFunction RF = new ZX.Win.ReflectionFunction();
         Form frm = RF.LoadMdiForm("ZXSystem.Function.FunManage.dll", "ZXSystem.Function.FunManage.Form_Main_FunManage", this, FP);
         System.Windows.Forms.TabPage TP = new System.Windows.Forms.TabPage(frm.Text);
         TP.Tag = frm;
         this.TabControFormList.TabPages.Add(TP);
         this.TabControFormList.SelectedTab = TP;
         TP.Select();
         this.zxPanel1.Visible = false;
     }
     ///F12重新加载菜单
     if (e.KeyCode == Keys.F12)
     {
         AddMenu();
         AddToolStripMain();
         ZX.Win.SetToolBarIcon SBI1 = new ZX.Win.SetToolBarIcon();
         SBI1.SetImage(Application.StartupPath + @"\Images\TooBarIco\", this.ToolStripMain, ToolStripItemDisplayStyle.ImageAndText);
     }
 }
开发者ID:BGCX262,项目名称:zxerp2013-svn-to-git,代码行数:25,代码来源:Form_Main.cs


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