private void TabAdd_Input(int nCpu, Win_ListView _ListView) { if (_ListView.Items.Count <= 0) { return; } TabPage _Page = new TabPage(); _Page.SuspendLayout(); _Page.Location = new System.Drawing.Point(4, 29); _Page.Padding = new System.Windows.Forms.Padding(3); _Page.TabIndex = nCpu; _Page.Text = string.Format("CPU#{0}", nCpu + 1); _Page.UseVisualStyleBackColor = false; _Page.Controls.Add(_ListView); _Page.ResumeLayout(false); Tab_Input.Controls.Owner.BackColor = Color.DimGray; Tab_Input.SuspendLayout(); Tab_Input.Controls.Add(_Page); Tab_Input.ResumeLayout(false); }
private void TabAdd_Input(int nAdapter, Win_ListView _ListView) { if (_ListView.Items.Count <= 0) { return; } TabPage _Page = new TabPage(); _Page.SuspendLayout(); _Page.Location = new System.Drawing.Point(4, 29); _Page.Padding = new System.Windows.Forms.Padding(3); _Page.TabIndex = nAdapter; if (strTabNames == null) { _Page.Text = string.Format("#{0}", nAdapter + 1); } else { if (strTabNames.Length > nAdapter) { _Page.Text = strTabNames[nAdapter]; } else { _Page.Text = string.Format("#{0}", nAdapter + 1); } } _Page.UseVisualStyleBackColor = false; //_Page.BackColor = Color.DimGray; //_Page.ForeColor = Color.White; _Page.Controls.Add(_ListView); _Page.ResumeLayout(false); Tab_Input.Controls.Owner.BackColor = Color.DarkGray; Tab_Input.SuspendLayout(); Tab_Input.Controls.Add(_Page); Tab_Input.ResumeLayout(false); }