當前位置: 首頁>>代碼示例>>C#>>正文


C# Forms.TabControl類代碼示例

本文整理匯總了C#中System.Windows.Forms.TabControl的典型用法代碼示例。如果您正苦於以下問題:C# TabControl類的具體用法?C# TabControl怎麽用?C# TabControl使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


TabControl類屬於System.Windows.Forms命名空間,在下文中一共展示了TabControl類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: Attach

    public static void Attach (Panel ParentArg)
    { Tabs = new TabControl () ;

      Tabs.Parent = ParentArg ;
      Tabs.Dock = DockStyle.Fill ;
      Tabs.Multiline = true ;
    }
開發者ID:kcb146,項目名稱:editor,代碼行數:7,代碼來源:TabManager.CS

示例2: Attach

 public override void Attach(TabControl aFrame, string name)
 {
     base.Attach(aFrame, project.Name);
     IDEApplication.Instance.Editors.Insert(0, this);
     redCodeProjectBindingSource.DataSource = project;
     ActivateControl();
 }
開發者ID:pavelsavara,項目名稱:nMars,代碼行數:7,代碼來源:ProjectEditor.cs

示例3: InitializeComponent

    /// <summary>
    /// Required method for Designer support - do not modify
    /// the contents of this method with the code editor.
    /// </summary>
    private void InitializeComponent()
    {
      this.m_ButtonPanel = new System.Windows.Forms.Panel();
      this.m_TabControl = new System.Windows.Forms.TabControl();
      this.SuspendLayout();
      // 
      // m_ButtonPanel
      // 
      this.m_ButtonPanel.Dock = System.Windows.Forms.DockStyle.Bottom;
      this.m_ButtonPanel.Location = new System.Drawing.Point(0, 218);
      this.m_ButtonPanel.Name = "m_ButtonPanel";
      this.m_ButtonPanel.Size = new System.Drawing.Size(272, 40);
      this.m_ButtonPanel.TabIndex = 0;
      // 
      // m_TabControl
      // 
      this.m_TabControl.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)));
      this.m_TabControl.Location = new System.Drawing.Point(4, 8);
      this.m_TabControl.Name = "m_TabControl";
      this.m_TabControl.SelectedIndex = 0;
      this.m_TabControl.Size = new System.Drawing.Size(264, 200);
      this.m_TabControl.TabIndex = 1;
      // 
      // TabbedDialogView
      // 
      this.Controls.Add(this.m_TabControl);
      this.Controls.Add(this.m_ButtonPanel);
      this.Name = "TabbedDialogView";
      this.Size = new System.Drawing.Size(272, 258);
      this.Load += new System.EventHandler(this.EhView_Load);
      this.ResumeLayout(false);

    }
開發者ID:Altaxo,項目名稱:Altaxo,代碼行數:39,代碼來源:TabbedElementControl.cs

示例4: 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

示例5: TabDragDrop

 public TabDragDrop(TabControl tabControl)
 {
     tabControl1 = tabControl;
     tabControl1.AllowDrop = true;
     this.tabControl1.DragOver += new System.Windows.Forms.DragEventHandler(this.tabControl1_DragOver);
     this.tabControl1.MouseMove += new System.Windows.Forms.MouseEventHandler(this.tabControl1_MouseMove);
 }
開發者ID:450640526,項目名稱:HtmExplorer,代碼行數:7,代碼來源:TabDragDrop.cs

示例6: monitor

            public monitor(DynamicNode n)
            {
                //MessageBox.Show(n.Owner.ToString());

                props = n.GetType().GetProperties();

                this.Text = "Resource monitor - " + n.ToString();
                this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow;
                this.ClientSize = new System.Drawing.Size(480, 640);
                this.StartPosition = FormStartPosition.Manual;
                //this.Location = new Point(this.Parent

                // TABS
                tc = new TabControl();
                tc.Dock = DockStyle.Fill;
                tp_props = new TabPage();
                tc.Controls.AddRange(new Control[] { tp_props });

                // Datagrid for properties
                pg_props = new PropertyGrid();
                pg_props.SelectedObject = n;
                pg_props.Dock = DockStyle.Fill;
                tp_props.Controls.Add(pg_props);

                t = new Timer();
                t.Interval = 100;
                t.Tick += delegate(object sender, EventArgs e) { pg_props.Refresh(); };
                t.Start();

                this.Controls.Add(tc);
            }
開發者ID:r-bel,項目名稱:glorg2,代碼行數:31,代碼來源:ResourceMonitor.cs

示例7: PutControls

        public void PutControls(List<IExtension> extensions, OMenuItems menu, TabControl tabControl, int clientId, int contractId)
        {
            if (extensions != null)
            {
                foreach (var extension in extensions)
                {
                    if (extension.MainMenu == menu)
                    {
                        TabPage tabPageExtension = new TabPage();
                        tabPageExtension.SuspendLayout();
                        tabPageExtension.Name = extension.ExtensionName;
                        tabPageExtension.Text = extension.ExtensionName;
                        tabPageExtension.UseVisualStyleBackColor = true;
                        extension.ClientId = clientId;
                        extension.ContractId = contractId;

                        UserControl control = (UserControl)extension;
                        control.Dock = DockStyle.Fill;
                        tabPageExtension.Controls.Add(control);
                        tabPageExtension.ResumeLayout(false);
                        tabControl.TabPages.Add(tabPageExtension);
                    }
                }
            }
        }
開發者ID:Ramazanov,項目名稱:FomsNet,代碼行數:25,代碼來源:Extensions.cs

示例8: MakeTabPagesMenuGrey

 private void MakeTabPagesMenuGrey(TabControl tbc)
 {
     foreach (TabPage page in tbc.TabPages)
     {
         page.BackColor = SystemColors.Menu;
     }
 }
開發者ID:hbheiner,項目名稱:cuda-profit-calc,代碼行數:7,代碼來源:ProfitCalc.cs

示例9: MainController

 private MainController(ActivitiesController activitiesController, RichTextBox txtPrompting,
                        TabControl tabControl) {
     _activitiesController = activitiesController;
     _txtPrompting = txtPrompting;
     _tabControl = tabControl;
     InitActivitiesList(_activitiesController.ServiceProvider);
 }
開發者ID:satr,項目名稱:rvslite,代碼行數:7,代碼來源:MainController.cs

示例10: MainForm

        public MainForm()
        {
            InitializeComponent();
            _treeViewHandler = new TreeViewHandler(treeView1, treeMenu);

            TabControl = tabControl1;
            ListAnalysis = listAnalysis;
            ListAnalysis.Columns[0].Width = -1;
            LblAnalysis = lblAnalysis;

            DgBody = dgBody;
            DgVariables = dgVariables;
            RtbILSpy = rtbILSpy;

            TreeView = treeView1;
            ToolStrip = toolStrip1;

            InstructionMenuStrip = instructionMenu;
            VariableMenu = variableMenu;
            ExceptionHandlerMenu = exceptionHandlerMenu;

            TreeMenuStrip = treeMenu;
            txtMagicRegex.Text = Settings.Default.MagicRegex;

            InitializeBody();

            cbSearchType.SelectedIndex = 0;
        }
開發者ID:AssassinUKG,項目名稱:dnEditor,代碼行數:28,代碼來源:MainForm.cs

示例11: MultiClipboard

 public MultiClipboard(TabControl control)
 {
     _maxCountofBuffers = 4;
     _currentIndex = 0;
     _currentCountofBuffers = 0;
     _control = control;
 }
開發者ID:BachinskiyBogdan,項目名稱:lab_1_comp_architechture,代碼行數:7,代碼來源:MultiClipboard.cs

示例12: DashGlobal

        public DashGlobal(
            EventHandler<TextChangedEventArgs> textAreaTextChanged,
            EventHandler<TextChangedEventArgs> textAreaTextChangedDelayed,
            KeyEventHandler textAreaKeyUp,
            EventHandler textAreaSelectionChangedDelayed,
            DragEventHandler textAreaDragDrop,
            DragEventHandler textAreaDragEnter,
            TabControl mainTabControl,
            AutocompleteMenu armaSense,
            Main mainWindow)
        {
            EditorHelper = new EditorHelper(
                textAreaTextChanged,
                textAreaTextChangedDelayed,
                textAreaKeyUp,
                textAreaSelectionChangedDelayed,
                textAreaDragDrop,
                textAreaDragEnter,
                mainTabControl,
                armaSense,
                this);

            TabsHelper = new TabsHelper(
                textAreaTextChanged,
                textAreaSelectionChangedDelayed,
                mainTabControl,
                this);

            FilesHelper = new FilesHelper(this);
            SettingsHelper = new SettingsHelper();

            MainWindow = mainWindow;
        }
開發者ID:alandoherty,項目名稱:dash-core,代碼行數:33,代碼來源:DashGlobal.cs

示例13: Custom

 public Custom(frmMain Main, Graphics g, TabControl TabControlMain, TabControl TabControlProperties)
 {
     this.Main = Main;
     this.g = g;
     this.TabControlMain = TabControlMain;
     this.TabControlProperties = TabControlProperties;
 }
開發者ID:SnakeSolidNL,項目名稱:tools,代碼行數:7,代碼來源:Custom.cs

示例14: Main_frm

        public Main_frm()
        {
            InitializeComponent();

            LauncherHelper.CardManager = new CardDatabase.CardsManager();
            LauncherHelper.CardManager.Init();

            char[] version = Program.Version.ToCharArray();
            this.Text = Program.LanguageManager.Translation.MainFormTitle + " v" + version[0] + "." + version[1] + "." + version[2];

            TabPage FileManager = new TabPage(){ Name = "File Manager", Text = Program.LanguageManager.Translation.MainFileManagerTab};
            TabControl FileControl = new TabControl();
            FileControl.Dock = DockStyle.Fill;

            TabPage decktab = new TabPage() {Name = "Decks",Text =Program.LanguageManager.Translation.MainFileDeckTab};
            decktab.Controls.Add(new FileManager_frm("Decks", Program.Config.LauncherDir + "deck/", ".ydk"));

            TabPage replaytab = new TabPage() { Name = "Replays", Text = Program.LanguageManager.Translation.MainFileReplayTab };
            replaytab.Controls.Add(new FileManager_frm("Replays", Program.Config.LauncherDir + "replay/", ".yrp"));
            FileControl.TabPages.AddRange(new TabPage[] { decktab, replaytab });

            FileManager.Controls.Add(FileControl);

            TabPage ServerTab = new TabPage() { Text = Program.Config.ServerName, Name = Program.Config.ServerName };
            ServerTab.Controls.Add(new ServerInterface_frm(Program.Config.ServerName));

            TabPage CustomizeTab = new TabPage() { Text = "Customize", Name = Program.LanguageManager.Translation.MainCustomizeTab};
            CustomizeTab.Controls.Add(new Customize_frm());

            TabPage AboutTab = new TabPage() { Text = "About", Name = Program.LanguageManager.Translation.MainAboutTab};
            AboutTab.Controls.Add(new About_frm());

            TabPage ChatTab = new TabPage() { Text = "Chat (Beta)", Name = Program.LanguageManager.Translation.MainChatTab};
            ChatTab.Controls.Add(new Chat_frm());

            if (Program.UserInfo.Rank > 0)
            {
                ServerControl.TabPages.AddRange(new TabPage[] { ServerTab,
                ChatTab,
                CreateBrowserWindow("Tournament Room",Program.LanguageManager.Translation.MainTornyTab),

                CreateBrowserWindow("Youtube",Program.LanguageManager.Translation.MainYoutubeTab),
                FileManager, CustomizeTab, AboutTab });

            }
            else
            {
                ServerControl.TabPages.AddRange(new TabPage[] { ServerTab,
                    ChatTab,
                    CreateBrowserWindow("Tournament Room",Program.LanguageManager.Translation.MainTornyTab),
                CreateBrowserWindow("Youtube",Program.LanguageManager.Translation.MainYoutubeTab),
                FileManager, CustomizeTab, AboutTab });
            }

            Program.ServerConnection.ServerMessage += new NetClient.ServerResponse(ServerMessage);
            ConnectionCheck.Tick += new EventHandler(CheckConnection);
            ServerControl.SelectedIndexChanged += new EventHandler(NavigateOnClick);

            LauncherHelper.LoadBanlist();
        }
開發者ID:Elfoman,項目名稱:DevProLauncher,代碼行數:60,代碼來源:Main_frm.cs

示例15: EditorHelper

        private string[] snippets = { }; //{ "diag_log \"\";", "for \"_i\" from 1 to 10 do { debugLog _i; };", "call compile preprocessFileLine Numbers \"\";" };

        #endregion Fields

        #region Constructors

        public EditorHelper(
            EventHandler<TextChangedEventArgs> textAreaTextChanged,
            EventHandler<TextChangedEventArgs> textAreaTextChangedDelayed,
            KeyEventHandler textAreaKeyUp,
            EventHandler textAreaSelectionChangedDelayed,
            DragEventHandler textAreaDragDrop,
            DragEventHandler textAreaDragEnter,
            TabControl mainTabControl,
            AutocompleteMenu armaSense,
            DashGlobal dashGlobal)
        {
            TextAreaTextChanged = textAreaTextChanged;
            TextAreaTextChangedDelayed = textAreaTextChangedDelayed;
            TextAreaKeyUp = textAreaKeyUp;
            TextAreaSelectionChangedDelayed = textAreaSelectionChangedDelayed;
            TextAreaDragDrop = textAreaDragDrop;
            TextAreaDragEnter = textAreaDragEnter;
            MainTabControl = mainTabControl;
            ArmaSense = armaSense;

            DashGlobal = dashGlobal;

            ArmaListItemsCount = 0;
            ArmaSenseKeywords = new List<AutocompleteItem>();

            foreach (var item in keywordList)
            {
                ArmaSenseKeywords.Add(new AutocompleteItem(item) { ImageIndex = 0, ToolTipTitle = "Arma Script Command", ToolTipText = item });
            }
        }
開發者ID:alandoherty,項目名稱:dash-core,代碼行數:36,代碼來源:EditorHelper.cs


注:本文中的System.Windows.Forms.TabControl類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。