Esempio n. 1
0
        private void TabAdd_Output(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 = true;

            _Page.Controls.Add(_ListView);
            _Page.ResumeLayout(false);

            Tab_Output.Controls.Owner.BackColor = Color.DimGray;
            Tab_Output.SuspendLayout();
            Tab_Output.Controls.Add(_Page);
            Tab_Output.ResumeLayout(false);
        }
Esempio n. 2
0
        private void TabAdd_Output(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 = true;
            _Page.Controls.Add(_ListView);
            _Page.ResumeLayout(false);

            Tab_Output.SuspendLayout();
            Tab_Output.Controls.Add(_Page);
            Tab_Output.ResumeLayout(false);
        }