• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Forms.TabPage类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



TabPage类属于System.Windows.Forms命名空间,在下文中一共展示了TabPage类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: AddTab

        private void AddTab(string url, int? insertIndex = null)
        {
            browserTabControl.SuspendLayout();

            var browser = new BrowserTabUserControl(url)
            {
                Dock = DockStyle.Fill,
            };

            var tabPage = new TabPage(url)
            {
                Dock = DockStyle.Fill
            };

            //This call isn't required for the sample to work. 
            //It's sole purpose is to demonstrate that #553 has been resolved.
            browser.CreateControl();

            tabPage.Controls.Add(browser);

            if (insertIndex == null)
            {
                browserTabControl.TabPages.Add(tabPage);
            }
            else
            {
                browserTabControl.TabPages.Insert(insertIndex.Value, tabPage);
            }

            //Make newly created tab active
            browserTabControl.SelectedTab = tabPage;

            browserTabControl.ResumeLayout(true);
        }
开发者ID:bjarteskogoy,项目名称:CefSharp,代码行数:34,代码来源:BrowserForm.cs


示例2: InitTabControlPages

        private void InitTabControlPages()
        {
            foreach(var obj in CardLevels)
            {
                var page = new TabPage { Text = CardLevel.RoleCardLevelName(obj) };
                CardTabControl.TabPages.Add(page);

                var listData        = new BindingList<RoleCard>();
                var list            = new ListBox()
                {
                    Dock                = DockStyle.Fill,
                    ContextMenuStrip    = TabControlContextMenu,
                    DisplayMember       = "Name",
                    ValueMember         = "Id",
                    DataSource          = listData,
                };
                
                list.SelectedIndexChanged += (sender, msg) =>
                {
                    var item = list.SelectedItem as RoleCard;
                    if (ListOfRoleCardList[CardTabControl.SelectedIndex].Contains(item))
                    {
                        SelectedItem = item;

                        cardInfoControl1.BeginModify();
                        cardInfoControl1.Images     = CardImageDictionary[SelectedItem.Id];
                        cardInfoControl1.RoleCard   = SelectedItem;
                        cardInfoControl1.EndModify();
                    }
                };

                page.Controls.Add(list);
                ListOfRoleCardList.Add(listData);
            }
        }
开发者ID:xxy1991,项目名称:cozy,代码行数:35,代码来源:EditorForm.cs


示例3: AddSource

        public bool AddSource(string pathToSource, string title)
        {
            TabPage tpg = new TabPage(title);
            bool fRez = true;

            if (System.IO.File.Exists(pathToSource))
            {
                FileKeyValue fkv = new FileKeyValue(pathToSource);
                fkv.Dock = DockStyle.Fill;
                tpg.Controls.Add(fkv);
                Sources.Add(title, pathToSource);
            }
            else
            {
                Label lbl = new Label();
                lbl.TextAlign = ContentAlignment.MiddleCenter;
                lbl.Text = "!!!!!!!!!!!!!!!!!!!!!!!!!!!!\r\n\r\nTHERE IS NO EQUIVALENT FILE\r\n\r\nPAY ATTENTION TO THIS ISSUE \r\n IF IT IS A DEFAULT TAB PAGE\r\n\r\n!!!!!!!!!!!!!!!!!!!!!!!!!!!!";
                lbl.Font = new System.Drawing.Font(this.Font, FontStyle.Bold);
                lbl.ForeColor = Color.Red;
                lbl.Padding = new System.Windows.Forms.Padding(100);
                lbl.Dock = DockStyle.Fill;
                tpg.BackColor = Color.LightPink;
                tpg.Controls.Add(lbl);
                fRez = false;

                this.panel1.Padding = new Padding(10);
                this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
                this.panel1.BackColor = Color.Red;
            }

            this.tabControl1.TabPages.Add(tpg);

            return fRez;
        }
开发者ID:AndrewEastwood,项目名称:desktop,代码行数:34,代码来源:TabSource.cs


示例4: InitializeRFGenTab

        private void InitializeRFGenTab()
        {
            this.m_tabRFGen = new System.Windows.Forms.TabPage();
            this.m_tabRFGen.SuspendLayout();
            this.m_MainTab.Controls.Add(this.m_tabRFGen);

            // 
            // m_tabRFGen
            // 
            //this.m_tabRFGen.Controls.Add(this.m_groupControl_Commands);
            //this.m_tabRFGen.Controls.Add(this.m_ReportTextBox);
            this.m_tabRFGen.Location = new System.Drawing.Point(4, 26);
            this.m_tabRFGen.Name = "m_tabRFGen";
            this.m_tabRFGen.Padding = new System.Windows.Forms.Padding(3);
            this.m_tabRFGen.Size = new System.Drawing.Size(1084, 510);
            this.m_tabRFGen.TabIndex = 1;
            this.m_tabRFGen.Text = "Signal Generator [BETA]";
            this.m_tabRFGen.UseVisualStyleBackColor = true;
            this.m_tabRFGen.Enter += new System.EventHandler(this.OnTabRFGen_Enter);

            m_GraphTrackingGenerator = new ZedGraph.ZedGraphControl();
            m_tabRFGen.Controls.Add(m_GraphTrackingGenerator);

            InitializeTrackingGeneratorGraph();
        }
开发者ID:RFExplorer,项目名称:rfexplorer-1,代码行数:25,代码来源:MainFormGenerator.cs


示例5: AddTab

        /// <summary>
        /// 根据某个url添加界面
        /// </summary>
        /// <param name="url"></param>
        /// <param name="insertIndex"></param>
        private void AddTab(string url, int? insertIndex = null)
        {
            browerTabControl.SuspendLayout();

            var brower = new UserControl1(url)
            {
                Dock=DockStyle.Fill,
            };

            var tabPage = new TabPage(url)
            {
                Dock = DockStyle.Fill
            };

            brower.CreateControl();
            tabPage.Controls.Add(brower);

            if (insertIndex == null)
            {
                browerTabControl.TabPages.Add(tabPage);
            }
            else
            {
                browerTabControl.TabPages.Insert(insertIndex.Value, tabPage);
            }

            browerTabControl.SelectedTab = tabPage;
            browerTabControl.ResumeLayout(true);
        }
开发者ID:lukeandshuo,项目名称:HydataBrowser,代码行数:34,代码来源:BrowerForm.cs


示例6: MultipleGraphics

        public MultipleGraphics(ResultResearch r)
        {
            InitializeComponent();

            this.research = r;

            SortedDictionary<double, SortedDictionary<double, SubGraphsInfo>>.KeyCollection keys =
                this.research.Result.Keys;
            foreach (double k in keys)
            {
                Chart graphic = new Chart();
                graphic.Titles.Add("Network Size = " + this.research.Size.ToString());

                ChartArea chArea = new ChartArea("Current Level = " + k.ToString());
                chArea.AxisX.Title = "Mu";
                chArea.AxisY.Title = "Order";
                graphic.ChartAreas.Add(chArea);

                Series s = new Series("Current Level = " + k.ToString());
                s.ChartType = SeriesChartType.Line;
                s.Color = Color.Red;
                foreach (KeyValuePair<double, SubGraphsInfo> v in this.research.Result[k])
                {
                    s.Points.Add(new DataPoint(v.Key, v.Value.avgOrder));
                }
                graphic.Series.Add(s);

                graphic.Dock = DockStyle.Fill;
                TabPage page = new TabPage("Current Level = " + k.ToString());
                page.Controls.Add(graphic);
                this.graphicsTab.TabPages.Add(page);

                this.graphics.Add(graphic);
            }
        }
开发者ID:kocharyan-ani,项目名称:random_networks_explorer,代码行数:35,代码来源:MultipleGraphics.cs


示例7: NumericUpDownActorsValueChanged

 private void NumericUpDownActorsValueChanged(object sender, EventArgs e)
 {
     var value = (int)this.numericUpDownActors.Value;
     if (value < this.tabControlActors.TabCount)
     {
         for (int i = this.tabControlActors.TabCount - 1; i >= value; i--)
         {
             this.tabControlActors.TabPages.RemoveAt(i);
             Project.BTActors.RemoveAt(i);
         }
     }
     else
     {
         this.tabControlActors.SuspendLayout();
         for (int i = this.tabControlActors.TabCount; i < value; i++)
         {
             var page = new TabPage((i + 1).ToString(CultureInfo.InvariantCulture));
             var panel = new BattleTestActorPanel();
             page.Controls.Add(panel);
             panel.Dock = DockStyle.Fill;
             this.tabControlActors.TabPages.Add(page);
             Project.BTActors.Add(Project.Data.Actors[0]);
         }
         this.tabControlActors.ResumeLayout(true);
     }
 }
开发者ID:borisblizzard,项目名称:arcreator,代码行数:26,代码来源:BattleTestDialog.cs


示例8: Initialize

            public override void Initialize ()
            {
                _textBox = new TextBox() {
                    Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right,
                    Font = new Font("Courier New", 9F, FontStyle.Regular, GraphicsUnit.Point, 0),
                    Location = new Point(0, 0),
                    Margin = new Padding(0),
                    Multiline = true,
                    ScrollBars = ScrollBars.Vertical,
                    Size = new Size(500, 263),
                    TabIndex = 0,
                    MaxLength = 0,
                };

                _tabPage = new TabPage() {
                    Location = new Point(4, 22),
                    Padding = new Padding(3),
                    Size = new Size(500, 263),
                    TabIndex = 1,
                    Text = "Text View",
                    UseVisualStyleBackColor = true,
                };

                _tabPage.Controls.Add(_textBox);

                _textBox.TextChanged += (s, e) => { OnModified(); RebuildElementIndex(); };
                _textBox.PreviewKeyDown += (s, e) => { e.IsInputKey = true; };
                _textBox.KeyUp += (s, e) => { UpdateElementLabel(); };
                _textBox.MouseClick += (s, e) => { UpdateElementLabel(); };

                InitializeStatusBar();
            }
开发者ID:DMV-Jumbo,项目名称:NBTExplorer,代码行数:32,代码来源:EditHex.cs


示例9: addVersionButton_Click

 private void addVersionButton_Click(object sender, EventArgs e)
 {
     ItemVersion itemversion = item.NewItemVersion();
     TabPage ctrl = new TabPage();
     ctrl.Controls.Add(new ItemVersionCtrl(itemversion,ctrl));
     itemVersionTabCtrl.TabPages.Add(ctrl);
 }
开发者ID:EternalDeiwos,项目名称:CardCrafter,代码行数:7,代码来源:ItemCtrl.cs


示例10: MainFrm

        public MainFrm()
        {
            InitializeComponent();

            Text = GetVersionString();

            LauncherHelper.LoadBanlist();

            var loginTab = new TabPage("Login");
            m_loginWindow = new LoginFrm();
            loginTab.Controls.Add(m_loginWindow);
            mainTabs.TabPages.Add(loginTab);
            m_chatWindow = new ChatFrm();
            GameWindow = new HubGameList_frm();
            m_rankingWindow = new RankingFrm();
            m_devpointWindow = new SupportFrm();
            m_filemanagerWindow = new FileManagerFrm();
            m_customizerWindow = new CustomizeFrm();

            Program.ChatServer.ServerMessage += ServerMessage;

            mainTabs.SelectedIndexChanged += TabChange;

            ApplyTranslation();
        }
开发者ID:Tic-Tac-Toc,项目名称:DevProLauncher,代码行数:25,代码来源:Main_frm.cs


示例11: InitData

        private void InitData()
        {
            #region 生成按钮

            foreach (var m in CommonHelper.ConfigHelper.Config.CategoryConfig.CategoryList)
            {
                TabPage tab = new TabPage(m.Name);
                FlowLayoutPanel flowPanel = new FlowLayoutPanel();
                flowPanel.Dock = DockStyle.Fill;
                if (null != m.CategoryItemList && m.CategoryItemList.Count > 0)
                {
                    for (int k = 0; k < m.CategoryItemList.Count; k++)
                    {
                        var model = m.CategoryItemList[k];
                        Button bt = new Button();
                        bt.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
                        bt.Name = model.AssemblyName;
                        bt.Text = model.Name;
                        bt.AutoSize = true;
                        bt.Height = 25;
                        bt.Margin = new System.Windows.Forms.Padding(5);
                        bt.Padding = new System.Windows.Forms.Padding(3);
                        bt.Click += new EventHandler(bt_Click);
                        bt.MouseEnter += new EventHandler(bt_MouseEnter);
                        bt.MouseLeave += new EventHandler(bt_MouseLeave);
                        flowPanel.Controls.Add(bt);
                    }
                }
                tab.Controls.Add(flowPanel);
                this.tabMenu.TabPages.Add(tab);
            }

            #endregion 生成按钮
        }
开发者ID:leebivip,项目名称:XCLWinKits,代码行数:34,代码来源:Index.cs


示例12: PropertiesForm

        public PropertiesForm(Folder f)
        {
            InitializeComponent();
            xFolder = f;
            this.Text = "Properties -- " + f.Name;
            groupBox4.Enabled = false;
            groupBox1.Enabled = false;
            LoadGeneral(f);
            tabPage1.Click += new EventHandler(tabPage1_Click);
            #if DEBUG
            TabPage tabPage2 = new TabPage();
            propertyGrid1.Dock = DockStyle.Fill;
            tabPage2.Controls.Add(this.propertyGrid1);
            tabPage2.Location = new System.Drawing.Point(4, 22);
            tabPage2.Name = "tabPage2";
            tabPage2.Padding = new System.Windows.Forms.Padding(3);
            tabPage2.Size = new System.Drawing.Size(509, 320);
            tabPage2.TabIndex = 1;
            tabPage2.Text = "Entry";
            tabPage2.UseVisualStyleBackColor = true;

            tabControl1.TabPages.Add(tabPage2);
            #endif
            this.Load +=new EventHandler(PropertiesForm_Load);
        }
开发者ID:709881059,项目名称:party-buffalo,代码行数:25,代码来源:PropertiesForm.cs


示例13: LoadXML

        public void LoadXML( FaceXML XML )
        {
            this.XML = XML;

            this.tabControl1.Controls.Clear();
            this.tabPage1.Controls.Clear();
            this.tabControl1.Controls.Add( tabPage1 );

            int width = tabPage1.Size.Width;
            int height = tabPage1.Size.Height;

            FaceImageListControl f = new FaceImageListControl( XML, this );
            f.Size = new Size( width, height );
            f.Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top;
            this.tabPage1.Controls.Add( f );

            AllFacesControl = f;
            FaceControls = new Dictionary<string, FaceImageListControl>();

            foreach ( KeyValuePair<String, List<FaceImage>> KVP in XML.Categories ) {
                TabPage p = new TabPage( KVP.Key );
                p.Size = new Size( width, height );
                f = new FaceImageListControl( KVP.Key, KVP.Value, AllFacesControl, this );
                f.Size = new Size( width, height );
                f.Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top;
                p.Controls.Add( f );
                this.tabControl1.Controls.Add( p );

                FaceControls.Add( KVP.Key, f );
            }
        }
开发者ID:AdmiralCurtiss,项目名称:FaceCopy,代码行数:31,代码来源:FaceForm.cs


示例14: DrawMaxSum

 public void DrawMaxSum(TabPage page)
 {
     int X = page.Width;
     int Y = page.Height;
     bt = new Button[row, col];
     for (int i = 0; i < row; i++)
     {
         for (int j = 0; j < col; j++)
         {
             bt[i, j] = new Button();
             bt[i, j].AutoSize = false;
             bt[i, j].Text = Convert.ToString(map[i, j]);
             bt[i, j].SetBounds(j * X / col, i * Y / row, X / col, Y / row);
             bt[i, j].Visible = true;
             page.Controls.Add(bt[i, j]);
         }
     }
     for (int i = 0; i < row; i++)
     {
         for (int j = 0; j < col; j++)
         {
             if (mark[i, j] == 1)
             {
                 bt[i, j].BackColor = Color.Yellow;
             }
         }
     }
 }
开发者ID:rocbomb,项目名称:homework-03,代码行数:28,代码来源:Form1.cs


示例15: Form1

        public Form1(string[] args)
        {
            this.Width = 800;
            this.Height = 600;
            InitializeComponent();
            _tabs = new TabControl();
            _tabs.Dock = DockStyle.Fill;
            Controls.Add(_tabs);

            var page = new TabPage("File0");
            page.Width = _tabs.Width;
            page.Height = Convert.ToInt32(_tabs.Height * 0.9);

            string path = calc(args);
            input(path);
            sum = new int[row, col];
            mark = new int[row, col];
            ans = -INF;

            MaxSum thismaxsum = new MaxSum(map, row, col, ref ans, ref mark, mode);
            DrawMaxSum(page);
            ShowMaxSum(page);
            _tabs.SelectedTab = page;
            _tabs.TabPages.Add(page);
        }
开发者ID:rocbomb,项目名称:homework-03,代码行数:25,代码来源:Form1.cs


示例16: FormGeneratedCode

        public FormGeneratedCode(List<GeneratedCode> generatedCodes)
        {
            InitializeComponent();

            this.generatedCodes = generatedCodes;

            tabControl1.TabPages.Clear();
            foreach (GeneratedCode gc in generatedCodes)
            {
                TabPage tp = new TabPage(Path.GetFileName(gc.Path));
                tabControl1.TabPages.Add(tp);
                tp.Tag = gc;

                RichTextBox tb = new RichTextBox();
                tb.AcceptsTab = true;
                tb.DetectUrls = false;
                tb.Dock = DockStyle.Fill;
                tb.Font = new Font("Lucida Console", 9.75F, FontStyle.Regular, GraphicsUnit.Point, 162);
                tb.Location = new System.Drawing.Point(3, 3);
                tb.Text = gc.Code;
                tb.WordWrap = false;

                tb.TextChanged += delegate {
                    (tp.Tag as GeneratedCode).Code = tb.Text;
                };

                tp.Controls.Add(tb);
            }

            tabControl1.SelectedIndex = 0;
        }
开发者ID:fizikci,项目名称:Cinar,代码行数:31,代码来源:FormGeneratedCode.cs


示例17: GlobalWindowManager_WindowAdded

        void GlobalWindowManager_WindowAdded(object sender, GwmWindowEventArgs e)
        {
            OptionsForm optionsForm = e.Form as OptionsForm;
            if (optionsForm != null)
            {

                TabPage tp = new TabPage("QuickSearch");
                tp.BackColor = SystemColors.Window;
                tp.AutoScroll = true;
                OptionsControl optionsControl = new OptionsControl();
                //optionsControl.BackColor = SystemColors.Control;
                tp.Controls.Add(optionsControl);
                TabControl tc = optionsForm.Controls.Find("m_tabMain", false)[0] as TabControl;
                //System.Drawing.Image image = Resources.search_icon_16;
                //tc.ImageList.Images.Add("QuickSearch", image);
                //tp.ImageKey = "QuickSearch";
                tc.TabPages.Add(tp);
                //optionsForm.VisibleChanged += new EventHandler(delegate(object o, EventArgs em)
                //{
                //    em.
                //});
                optionsControl.Dock = DockStyle.Top;
                Button buttonOK = optionsForm.Controls.Find("m_btnOK", false)[0] as Button;
                buttonOK.Click += delegate(object senderr, EventArgs evtarg) {
                    optionsControl.OKButtonPressed(senderr, evtarg);
                    //removeBuiltinQuickFind(host);
                    this.qsControl.UpdateWidth();
                    //this.qsControl.
                    
                };
                //buttonOK.Click += new EventHandler(optionsControl.OKButtonPressed);

            }
        }
开发者ID:iamkarlson,项目名称:keepass-quicksearch,代码行数:34,代码来源:QuickSearchExt.cs


示例18: AddTabPage

 public static void AddTabPage(this TabControl tc, TabPage tabpage)
 {
   if (!tc.TabPages.Contains(tabpage))
   {
     tc.TabPages.Add(tabpage);
   }
 }
开发者ID:shengqh,项目名称:RCPA.Core,代码行数:7,代码来源:GuiUtils.cs


示例19: NewFile

        public static void NewFile(TabControl tabcontrol)
        {
            int sotab = tabcontrol.TabCount;
            //MessageBox.Show(sotab.ToString());
            int i=0;
            for (i = 0; i < sotab; )
            {
                int dem = 0;
                foreach (TabPage page in tabcontrol.TabPages)
                {
                    if (page.Text == "New File" + i.ToString())
                    {
                        dem++;
                    }
                }
                if (dem == 0)
                    break;
                else i++;
            }

            //if (i < sotab)
            {
                TabPage newpage = new TabPage();
                newpage.Text = "New File" + i.ToString();

                RichTextBox newrtb = new RichTextBox();
                newrtb.Dock = DockStyle.Fill;
                newrtb.WordWrap = false;
                newpage.Controls.Add(newrtb);

                tabcontrol.TabPages.Add(newpage);
                tabcontrol.SelectedTab = newpage;
            }
        }
开发者ID:hungnv0789,项目名称:vhtm,代码行数:34,代码来源:BasicCommand.cs


示例20: AddTab

        /// <summary>
        /// Adds a tab.
        /// </summary>
        /// <param name="name">The tab name.</param>
        /// <param name="tabFactory">The tab factory.</param>
        public void AddTab(string name, Func<ControlPanelTab> tabFactory)
        {
            TabPage tabPage = new TabPage(name);
            tabPage.Tag = tabFactory;

            controlPanelTabControl.TabPages.Add(tabPage);
        }
开发者ID:dougrathbone,项目名称:mbunit-v3,代码行数:12,代码来源:ControlPanelDialog.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Forms.TableLayoutCellPaintEventArgs类代码示例发布时间:2022-05-26
下一篇:
C# Forms.TabControlEventArgs类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap