本文整理汇总了C#中System.Windows.Forms.ProgressBar类的典型用法代码示例。如果您正苦于以下问题:C# System.Windows.Forms.ProgressBar类的具体用法?C# System.Windows.Forms.ProgressBar怎么用?C# System.Windows.Forms.ProgressBar使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
System.Windows.Forms.ProgressBar类属于命名空间,在下文中一共展示了System.Windows.Forms.ProgressBar类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: InitializeComponent
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmProgress));
this.calcProgressBar = new System.Windows.Forms.ProgressBar();
this.SuspendLayout();
//
// calcProgressBar
//
this.calcProgressBar.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.calcProgressBar.Location = new System.Drawing.Point(-3, 0);
this.calcProgressBar.Name = "calcProgressBar";
this.calcProgressBar.Size = new System.Drawing.Size(295, 30);
this.calcProgressBar.TabIndex = 0;
//
// frmProgress
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(292, 27);
this.Controls.Add(this.calcProgressBar);
this.Cursor = System.Windows.Forms.Cursors.WaitCursor;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "frmProgress";
this.ShowIcon = false;
this.Text = "Shapefile to grid - Starting calculation";
this.ResumeLayout(false);
}
示例2: InitializeComponent
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.progressBar1 = new System.Windows.Forms.ProgressBar();
this.SuspendLayout();
//
// progressBar1
//
this.progressBar1.Location = new System.Drawing.Point(9, 6);
this.progressBar1.Name = "progressBar1";
this.progressBar1.Size = new System.Drawing.Size(275, 18);
this.progressBar1.Style = System.Windows.Forms.ProgressBarStyle.Marquee;
this.progressBar1.TabIndex = 0;
//
// LoadingForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(294, 30);
this.Controls.Add(this.progressBar1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Name = "LoadingForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
this.Text = "Loading... Please Wait";
this.ResumeLayout(false);
}
示例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.progressBar1 = new System.Windows.Forms.ProgressBar();
this.SuspendLayout();
//
// progressBar1
//
this.progressBar1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.progressBar1.Location = new System.Drawing.Point(-1, 354);
this.progressBar1.Name = "progressBar1";
this.progressBar1.Size = new System.Drawing.Size(368, 5);
this.progressBar1.TabIndex = 0;
//
// TaoLoginForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(366, 359);
this.Controls.Add(this.progressBar1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.HelpButton = true;
this.MaximizeBox = false;
this.Name = "TaoLoginForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "登录";
this.ResumeLayout(false);
}
示例4: GetUniqueRoutesForActivity
public static IList<IActivity> GetUniqueRoutesForActivity(IActivity activity, System.Windows.Forms.ProgressBar progressBar)
{
IList<IActivity> results = null;
try
{
if (progressBar == null)
progressBar = new System.Windows.Forms.ProgressBar();
if (GetUniqueRoutes != null)
{
MethodInfo methodInfo = GetUniqueRoutes.GetMethod(findSimilarRoutes);
object resultFromURPlugIn = methodInfo.Invoke(activity, new object[] { activity, progressBar });
results = (IList<IActivity>)resultFromURPlugIn;
}
}
catch (Exception e)
{
// Log error?
throw new Exception(string.Format(IntegrationUtility.OtherPluginExceptionText,
UniquePlugin + ".dll", UniqueRoutesPluginName) + Environment.NewLine, e);
}
if (GetUniqueRoutes == null)
{
throw new Exception(string.Format(IntegrationUtility.OtherPluginExceptionText,
UniquePlugin + ".dll", UniqueRoutesPluginName) + Environment.NewLine);
}
return results;
}
示例5: InitializeComponent
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.label1 = new System.Windows.Forms.Label();
this.progressBar1 = new System.Windows.Forms.ProgressBar();
this.label2 = new System.Windows.Forms.Label();
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.SuspendLayout();
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(25, 21);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(35, 13);
this.label1.TabIndex = 0;
this.label1.Text = "label1";
//
// progressBar1
//
this.progressBar1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.progressBar1.Location = new System.Drawing.Point(28, 46);
this.progressBar1.Name = "progressBar1";
this.progressBar1.Size = new System.Drawing.Size(230, 23);
this.progressBar1.Step = 1;
this.progressBar1.TabIndex = 1;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(34, 76);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(35, 13);
this.label2.TabIndex = 2;
this.label2.Text = "label2";
//
// timer1
//
this.timer1.Enabled = true;
this.timer1.Interval = 500;
this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
//
// frmProgress
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(284, 98);
this.Controls.Add(this.label2);
this.Controls.Add(this.progressBar1);
this.Controls.Add(this.label1);
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "frmProgress";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Progress";
this.Load += new System.EventHandler(this.frmProgress_Load);
this.ResumeLayout(false);
this.PerformLayout();
}
示例6: InitializeComponent
private void InitializeComponent() {
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FileScanDialog));
this.prbScanProgress = new System.Windows.Forms.ProgressBar();
this.lblScanProgress = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// prbScanProgress
//
resources.ApplyResources(this.prbScanProgress, "prbScanProgress");
this.prbScanProgress.Maximum = 1000;
this.prbScanProgress.Name = "prbScanProgress";
//
// lblScanProgress
//
resources.ApplyResources(this.lblScanProgress, "lblScanProgress");
this.lblScanProgress.FlatStyle = System.Windows.Forms.FlatStyle.System;
this.lblScanProgress.Name = "lblScanProgress";
//
// FileScanDialog
//
resources.ApplyResources(this, "$this");
this.Controls.Add(this.prbScanProgress);
this.Controls.Add(this.lblScanProgress);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
this.Name = "FileScanDialog";
this.ShowInTaskbar = false;
this.ResumeLayout(false);
}
示例7: InitializeComponent
/// <summary>
/// 设计器支持所需的方法 - 不要
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.prb = new System.Windows.Forms.ProgressBar();
this.SuspendLayout();
//
// prb
//
this.prb.Dock = System.Windows.Forms.DockStyle.Fill;
this.prb.Location = new System.Drawing.Point(0, 0);
this.prb.Name = "prb";
this.prb.Size = new System.Drawing.Size(375, 23);
this.prb.TabIndex = 0;
//
// frmProcessBar
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(375, 23);
this.Controls.Add(this.prb);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "frmProcessBar";
this.ShowIcon = false;
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "frmProcessBar";
this.TopMost = true;
this.ResumeLayout(false);
}
示例8: InitializeComponent
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(UpdatingLib));
this.label1 = new System.Windows.Forms.Label();
this.progressBar1 = new System.Windows.Forms.ProgressBar();
this.label2 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// label1
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("Times New Roman", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.label1.Location = new System.Drawing.Point(19, 35);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(0, 15);
this.label1.TabIndex = 0;
this.label1.TextAlign = System.Drawing.ContentAlignment.TopCenter;
//
// progressBar1
//
this.progressBar1.Location = new System.Drawing.Point(12, 85);
this.progressBar1.Minimum = 1;
this.progressBar1.Name = "progressBar1";
this.progressBar1.Size = new System.Drawing.Size(492, 17);
this.progressBar1.TabIndex = 1;
this.progressBar1.Value = 1;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(23, 12);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(0, 13);
this.label2.TabIndex = 2;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(23, 52);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(0, 13);
this.label3.TabIndex = 3;
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(528, 114);
this.Controls.Add(this.label3);
this.Controls.Add(this.label2);
this.Controls.Add(this.progressBar1);
this.Controls.Add(this.label1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "Form1";
this.Text = "Mr.Doors";
this.TopMost = true;
this.ResumeLayout(false);
this.PerformLayout();
}
示例9: ServerAccessClass
public ServerAccessClass(string address,int port, System.Windows.Forms.Label resultLabel, System.Windows.Forms.ProgressBar progressBar,FormMain parent)
{
_label = resultLabel;
_progressbar = progressBar;
_parent = parent;
_address = address;
_port = port;
}
示例10: InitializeComponent
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.Windows.Forms.ProgressBar progressBar;
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ConnectingForm));
this.connectStatus = new System.Windows.Forms.Label();
this.abortButton = new System.Windows.Forms.Button();
this.pingTimer = new System.Windows.Forms.Timer(this.components);
this.timeoutTimer = new System.Windows.Forms.Timer(this.components);
progressBar = new System.Windows.Forms.ProgressBar();
this.SuspendLayout();
//
// progressBar
//
progressBar.Location = new System.Drawing.Point(13, 30);
progressBar.Name = "progressBar";
progressBar.Size = new System.Drawing.Size(251, 23);
progressBar.Style = System.Windows.Forms.ProgressBarStyle.Marquee;
progressBar.TabIndex = 1;
//
// connectStatus
//
this.connectStatus.AutoSize = true;
this.connectStatus.Location = new System.Drawing.Point(10, 9);
this.connectStatus.Name = "connectStatus";
this.connectStatus.Size = new System.Drawing.Size(109, 13);
this.connectStatus.TabIndex = 0;
this.connectStatus.Text = "Connecting to \"{0}\"...";
//
// abortButton
//
this.abortButton.Location = new System.Drawing.Point(189, 59);
this.abortButton.Name = "abortButton";
this.abortButton.Size = new System.Drawing.Size(75, 23);
this.abortButton.TabIndex = 2;
this.abortButton.Text = "Abort";
this.abortButton.UseVisualStyleBackColor = true;
this.abortButton.Click += new System.EventHandler(this.abortButton_Click);
//
// ConnectingForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(276, 90);
this.Controls.Add(this.abortButton);
this.Controls.Add(progressBar);
this.Controls.Add(this.connectStatus);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "ConnectingForm";
this.Text = "Connecting...";
this.ResumeLayout(false);
this.PerformLayout();
}
示例11: InitializeComponent
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CopyFolderForm));
this._lb1 = new System.Windows.Forms.Label();
this._pb1 = new System.Windows.Forms.ProgressBar();
this._bt1 = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// _lb1
//
this._lb1.AutoSize = true;
this._lb1.Font = new System.Drawing.Font("Gulim", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
this._lb1.Location = new System.Drawing.Point(12, 9);
this._lb1.Name = "_lb1";
this._lb1.Size = new System.Drawing.Size(157, 16);
this._lb1.TabIndex = 0;
this._lb1.Text = "카피가 진행중입니다";
//
// _pb1
//
this._pb1.Location = new System.Drawing.Point(15, 65);
this._pb1.Name = "_pb1";
this._pb1.Size = new System.Drawing.Size(115, 23);
this._pb1.TabIndex = 1;
//
// _bt1
//
this._bt1.Location = new System.Drawing.Point(136, 65);
this._bt1.Name = "_bt1";
this._bt1.Padding = new System.Windows.Forms.Padding(0, 2, 0, 0);
this._bt1.Size = new System.Drawing.Size(52, 23);
this._bt1.TabIndex = 2;
this._bt1.Text = "취소";
this._bt1.UseVisualStyleBackColor = true;
this._bt1.Click += new System.EventHandler(this.p_bt1_Click);
//
// CopyFolderForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.ClientSize = new System.Drawing.Size(200, 100);
this.ControlBox = false;
this.Controls.Add(this._bt1);
this.Controls.Add(this._pb1);
this.Controls.Add(this._lb1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "CopyFolderForm";
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "확인창";
this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.p_This_FormClosed);
this.Load += new System.EventHandler(this.p_This_Load);
this.ResumeLayout(false);
this.PerformLayout();
}
示例12: BWHandler
public BWHandler(System.Windows.Forms.ProgressBar pb, System.Windows.Forms.Label sl)
{
dataGridViewProgressBar = pb;
StatusLabel = sl;
tb.RunWorkerCompleted += new RunWorkerCompletedEventHandler(BuildWorkerCompleted);
tb.ProgressChanged += new ProgressChangedEventHandler(ProgressChanged);
dh.ProgressChanged += new ProgressChangedEventHandler(ProgressChanged);
dh.RunWorkerCompleted += new RunWorkerCompletedEventHandler(DirectoryWorkerCompleted);
}
示例13: InitializeComponent
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.buildButton = new System.Windows.Forms.Button();
this.progressBar = new System.Windows.Forms.ProgressBar();
this.progressLabel = new System.Windows.Forms.Label();
this.saveFileDialog = new System.Windows.Forms.SaveFileDialog();
this.SuspendLayout();
//
// buildButton
//
this.buildButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.buildButton.FlatStyle = System.Windows.Forms.FlatStyle.System;
this.buildButton.Location = new System.Drawing.Point(3, 3);
this.buildButton.Name = "buildButton";
this.buildButton.Size = new System.Drawing.Size(86, 24);
this.buildButton.TabIndex = 18;
this.buildButton.Text = "&Build...";
this.buildButton.Click += new System.EventHandler(this.BuildButton_Click);
//
// progressBar
//
this.progressBar.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.progressBar.Location = new System.Drawing.Point(3, 53);
this.progressBar.Name = "progressBar";
this.progressBar.Size = new System.Drawing.Size(294, 23);
this.progressBar.TabIndex = 19;
this.progressBar.Visible = false;
//
// progressLabel
//
this.progressLabel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.progressLabel.AutoEllipsis = true;
this.progressLabel.Location = new System.Drawing.Point(3, 37);
this.progressLabel.Name = "progressLabel";
this.progressLabel.Size = new System.Drawing.Size(294, 13);
this.progressLabel.TabIndex = 20;
this.progressLabel.Text = "Progress message...";
//
// BuildStep
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.Transparent;
this.Controls.Add(this.progressLabel);
this.Controls.Add(this.progressBar);
this.Controls.Add(this.buildButton);
this.Name = "BuildStep";
this.Size = new System.Drawing.Size(300, 85);
this.Tag = "Build the application syndication feed. All other steps must be completed before" +
" the Build button will be activated.";
this.ResumeLayout(false);
}
示例14: InitializeComponent
private void InitializeComponent() {
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(WaveWriter));
this.prbBytesWritten = new System.Windows.Forms.ProgressBar();
this.lblSource = new System.Windows.Forms.Label();
this.lblTarget = new System.Windows.Forms.Label();
this.txtSource = new System.Windows.Forms.TextBox();
this.txtTarget = new System.Windows.Forms.TextBox();
this.SuspendLayout();
//
// prbBytesWritten
//
resources.ApplyResources(this.prbBytesWritten, "prbBytesWritten");
this.prbBytesWritten.Name = "prbBytesWritten";
//
// lblSource
//
this.lblSource.FlatStyle = System.Windows.Forms.FlatStyle.System;
resources.ApplyResources(this.lblSource, "lblSource");
this.lblSource.Name = "lblSource";
//
// lblTarget
//
this.lblTarget.FlatStyle = System.Windows.Forms.FlatStyle.System;
resources.ApplyResources(this.lblTarget, "lblTarget");
this.lblTarget.Name = "lblTarget";
//
// txtSource
//
resources.ApplyResources(this.txtSource, "txtSource");
this.txtSource.Name = "txtSource";
this.txtSource.ReadOnly = true;
//
// txtTarget
//
resources.ApplyResources(this.txtTarget, "txtTarget");
this.txtTarget.Name = "txtTarget";
this.txtTarget.ReadOnly = true;
//
// WaveWriter
//
resources.ApplyResources(this, "$this");
this.ControlBox = false;
this.Controls.Add(this.txtTarget);
this.Controls.Add(this.txtSource);
this.Controls.Add(this.lblTarget);
this.Controls.Add(this.lblSource);
this.Controls.Add(this.prbBytesWritten);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Name = "WaveWriter";
this.ShowInTaskbar = false;
this.Activated += new System.EventHandler(this.WaveWriter_Activated);
this.ResumeLayout(false);
this.PerformLayout();
}
示例15: InitializeControl
void InitializeControl()
{
SuspendLayout();
Width = 400;
Height = 130;
_label = new WinFormsLabel
{
Text = string.Empty
,
AutoSize = false
,
Width = 350
};
_bar = new WinFormsProgressBar
{
Minimum = MIN
,
Maximum = MAX
,
Width = 350
,
Value = MIN
,
Step = 1
,
Style = WinFormsProgressBarStyle.Continuous
};
_btn = new WinFormsButton
{
Text = "Cancel"
,
Width = 120
};
var panel = new WinFormsFlowLayoutPanel
{
FlowDirection = WinFormsFlowDirection.TopDown
,
Dock = WinFormsDockStyle.Fill
};
panel.Controls.Add(_label);
panel.Controls.Add(_bar);
panel.Controls.Add(_btn);
Controls.Add(panel);
ResumeLayout();
}