public TabPage(TabControl.TabPageCollection owner, string text) { _IdPool++; _id = _IdPool; _owner = owner; Text = text; Width = _CalcWidth(); }
//初期化 private void frmMain_Load(object sender, EventArgs e) { this.Visible = false; dgvMain.ReadOnly = true; dgvMain.ContextMenuStrip = cmsTabsMenu; current_project = ""; search_flag = false; is_multiple = false; tabs = new TabControl.TabPageCollection(tabControl); log = new LogManager(true); log.Write("dmpn Start--- " + DateTime.Now.ToShortDateString()); log.Write("getEnvData " + DateTime.Now); env_data = new EnvData(new Documents("", ""), new Project("", false, "", false), new Master("", false, ""), this.Left, this.Top, this.Width, this.Height); GetEnvData(); if (env_data.WindowLocation.X == 0 && env_data.WindowLocation.Y == 0) InitLocationAndSize(); this.Location = env_data.WindowLocation; this.Size = env_data.WindowSize; //メニューバーは作成しない //log.Write("CreateUserMenuBar2"); log.Write("OpenIndex " + DateTime.Now); log.Close(); if (env_data.Documents.Path.Length == 0) { Documents doc = env_data.Documents; doc.Path = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\docmaker.net2\index.xml"; env_data.Documents = doc; Project pro = env_data.Project; pro.Folder=Path.GetDirectoryName(doc.Path)+@"\"; env_data.Project = pro; env_data.SaveEnvData(); if (!File.Exists(doc.Path)) { next_step = NextStep.SPLASH; MessageBox.Show("最初に環境設定をする必要があります。\n環境設定画面を表示します。\n You should set the environment first.", "警告", MessageBoxButtons.OK); frm_sub = new frmSubWindow(env_data, log, OpenWindowType.ENV_SETTINGS); frm_sub.FormClosed += new FormClosedEventHandler(frmSubWindow_Closed); frm_sub.Show(); this.Enabled = false; } else StartApplication(); } else { StartApplication(); } }
public TabControl() { Controls = new ControlCollection(this); TabPages = new TabPageCollection(this); BorderColor = Color.FromArgb(172, 172, 172); ItemSize = new Size(42, 30); Padding = new Padding(3); Size = new Size(200, 100); pagesButtonsPanel = new Control(); pagesButtonsPanel.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; pagesButtonsPanel.BackColor = Color.Transparent; pagesButtonsPanel.Name = "buttonsPanel"; pagesButtonsPanel.Size = new Size(Width, ItemSize.Height); (Controls as ControlCollection).AddInternal(pagesButtonsPanel); }
public void Indexer () { TabControl tab = new TabControl (); TabControl.TabPageCollection tabPages = new TabControl.TabPageCollection (tab); TabPage tabPageA = new TabPage (); TabPage tabPageB = new TabPage (); TabPage tabPageC = new TabPage (); TabPage tabPageD = new TabPage (); tabPages.Add (tabPageA); Assert.AreSame (tabPageA, tabPages [0], "#1"); tabPages [0] = tabPageB; Assert.AreSame (tabPageB, tabPages [0], "#2"); tabPages.Add (tabPageC); Assert.AreSame (tabPageB, tabPages [0], "#3"); Assert.AreSame (tabPageC, tabPages [1], "#4"); tabPages.Remove (tabPageB); Assert.AreSame (tabPageC, tabPages [0], "#5"); tabPages [0] = tabPageD; Assert.AreSame (tabPageD, tabPages [0], "#6"); Form form = new Form (); form.ShowInTaskbar = false; form.Controls.Add (tab); form.Show (); form.Dispose (); }
void init() { this.__ul = new IHTMLUnorderedList(); this.__ul.name = "tabs"; this.__ul.style.marginTop = "0"; this.__ul.style.marginRight = "0"; this.__ul.style.marginBottom = "-1px"; this.__ul.style.marginLeft = "0"; this.__ul.style.paddingTop = "0"; this.__ul.style.paddingRight = "0"; this.__ul.style.paddingBottom = "0.3em"; this.__ul.style.paddingLeft = "0"; this.__ul.style.width = "" + this.Size.Width; this.__ul.style.height = "" + __TAB_BAR_HEIGHT; this.__ul.style.Float = DOM.IStyle.FloatEnum.left; this.__ulContainer = new IHTMLDiv(); this.__ulContainer.name = "ulcontainer"; this.__ulContainer.style.width = "" + this.Size.Width; this.__ulContainer.style.height = "" + __TAB_BAR_HEIGHT; this.__ulContainer.style.position = DOM.IStyle.PositionEnum.relative; this.__ulContainer.style.top = "0"; this.__ulContainer.style.bottom = "0"; this.__ulContainer.appendChild(this.__ul); this.__tabFiller = new IHTMLDiv(); this.__tabFiller.name = "filler"; this.__tabFiller.style.height = "" + __TAB_BAR_HEIGHT; this.__tabFiller.style.borderBottom = "1px solid"; this.__tabFiller.style.borderTop = "none"; this.__tabFiller.style.borderRight = "none"; this.__tabFiller.style.borderLeft = "none"; this.__tabFiller.style.minWidth = "0"; this.__tabFiller.style.Float = DOM.IStyle.FloatEnum.left; this.InternalContainer = new IHTMLDiv(); this.InternalContainer.name = "tabcontrol"; this.__tabs = new Panel(); this.__tabs.Location = new Point(0, 0); this.__tabs.Size = new Size(this.Size.Width, __TAB_BAR_HEIGHT); setTabsSize(); base.Controls.Add(this.__tabs); this.__tabs.GetHTMLTarget().appendChild(this.__ulContainer); this.__tabs.GetHTMLTarget().style.SetLocation(0, 0, this.Size.Width, __TAB_BAR_HEIGHT); _tabPages = new TabControl.TabPageCollection((TabControl)this); FontChanged += OnFontChanged; }
public TabPageCollectionWin(TabControl.TabPageCollection tabPages) { _tabPages = tabPages; }