本文整理匯總了C#中System.Windows.Forms.ProgressBar.BringToFront方法的典型用法代碼示例。如果您正苦於以下問題:C# ProgressBar.BringToFront方法的具體用法?C# ProgressBar.BringToFront怎麽用?C# ProgressBar.BringToFront使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類System.Windows.Forms.ProgressBar
的用法示例。
在下文中一共展示了ProgressBar.BringToFront方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: DisassemblerControl
public DisassemblerControl()
{
Width = 100;
Height = 100;
Label alphaLabel = new Label()
{
Text = "Disassembler is in pre-pre-alpha stage. Don't expect perfect results.",
Location = new Point(3,5),
Height = 20,
Width = 400,
};
Label offsetLabel = new Label()
{
Location = new Point(3, 30),
Width = 50,
Text = "Offset:",
};
offsetBox = new TextBox()
{
Width = 100,
Location = new Point(offsetLabel.Left + offsetLabel.Width + 5, offsetLabel.Top - 3),
};
Label sizeLabel = new Label()
{
Location = new Point(offsetBox.Right + 10, 30),
Width = 50,
Text = "Size:",
};
sizeBox = new TextBox()
{
Width = 100,
Location = new Point(sizeLabel.Right + 5, sizeLabel.Top - 3),
};
disassembleButton = new Button()
{
Text = "Disassemble",
Location = new Point(sizeBox.Right + 10, sizeBox.Top - 1),
};
analyseButton = new Button()
{
Text = "Analyse",
Location = new Point(disassembleButton.Right + 5, disassembleButton.Top),
};
progressBar = new ProgressBar()
{
Width = 10,
Height = 15,
Anchor = AnchorStyles.Left | AnchorStyles.Right,
Visible = false,
};
progressBar.Location = new Point(this.Width / 2 - progressBar.Width / 2, this.Height / 2 - progressBar.Height / 2);
disassemblyView = new ListView()
{
Location = new Point(0, sizeBox.Bottom + 7),
Width = this.Width,
Height = this.Height - (sizeBox.Bottom + 7),
View = View.Details,
Anchor = AnchorStyles.Top | AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Bottom,
FullRowSelect = true,
UseCompatibleStateImageBehavior = false,
};
disassemblyView.Columns.AddRange(new ColumnHeader[] {
new ColumnHeader() { Text = "Offset", Width = 75,},
new ColumnHeader() { Text = "Bytes" , Width = 100,},
new ColumnHeader() { Text = "Disassembly", Width = 200,},
new ColumnHeader() { Text = "Comment", Width = 100},
});
disassembleButton.Click += disassembleButton_Click;
analyseButton.Click += analyseButton_Click;
this.Controls.AddRange(new Control[] {
alphaLabel,
offsetLabel,
offsetBox,
sizeLabel,
sizeBox,
disassembleButton,
analyseButton,
disassemblyView,
progressBar,
});
progressBar.BringToFront();
}
示例2: btnStart_Click
private void btnStart_Click(object sender, EventArgs e)
{
string path = txtPath.Text;
if (Directory.Exists(path))
{
WinRegistry.SetValue(WinRegistry.Keys.DefaultPath, path);
WinRegistry.SetValue(WinRegistry.Keys.GroupByAlbum, chkGroup.Checked);
WinRegistry.SetValue(WinRegistry.Keys.RecurseTraversing, chkRecurse.Checked);
WinRegistry.SetValue(WinRegistry.Keys.SkipExisting, chkSkipExistingArt.Checked);
var bw = new BackgroundWorker();
var jcon = new JobController(path, chkGroup.Checked, chkRecurse.Checked, chkSkipExistingArt.Checked);
jcon.WorkerInstance = bw;
var panel = new Panel();
panel.Size = this.Size;
panel.Location = new Point(0, 0);
this.Controls.Add(panel);
panel.BringToFront();
var message = new Label();
message.TextAlign = ContentAlignment.MiddleCenter;
message.Location = new Point(0, 0);
message.Size = this.Size;
this.Controls.Add(message);
message.BringToFront();
bw.DoWork += jcon.FillFilesStack;
bw.WorkerReportsProgress = true;
bw.ProgressChanged += (o, args) => message.Text = Verbal.FallThrough + Environment.NewLine + args;
bw.RunWorkerAsync();
while (bw.IsBusy)
{
Application.DoEvents();
}
message.Location = new Point(0, -30);
var pg = new ProgressBar();
pg.Maximum = 100;
pg.Size = new Size(this.Width - 30, 15);
pg.Location = new Point(15, this.Height / 2 - 8);
this.Controls.Add(pg);
pg.BringToFront();
bw = new BackgroundWorker();
jcon.WorkerInstance = bw;
bw.WorkerReportsProgress = true;
bw.DoWork += jcon.GatherJobs;
bw.ProgressChanged += (o, args) => { pg.Value = args.ProgressPercentage; message.Text = (string)args.UserState; };
bw.RunWorkerAsync();
while (bw.IsBusy)
{
Application.DoEvents();
}
this.Controls.Remove(pg);
this.Controls.Remove(message);
this.Controls.Remove(panel);
if (jcon.JobsCount > 0)
{
(new Thread(() => (new DoWork(jcon)).ShowDialog())).Start();
this.Close();
}
else
{
MessageBox.Show(Verbal.AllFilesFiltered);
}
}
else MessageBox.Show(Verbal.DirNotExists);
}
示例3: ShowBar
private void ShowBar(object countObj)
{
int count = (int)countObj;
bar = new ProgressBar();
bar.Top = labelDepthPatern.Top;
bar.Left = labelDepthPatern.Left;
bar.Width = this.ClientRectangle.Width - bar.Left - bar.Left;
bar.Height = labelDepthPatern.Height;
bar.Step = 1;
bar.Maximum = count;
bar.Minimum = 0;
labelDepthPatern.Parent.Controls.Add(bar);
bar.BringToFront();
}
示例4: createTab
private void createTab(int connection)
{
TabPage page = new TabPage(Properties.Settings.Default["username" + connection].ToString());
ListView listview = new ListView();
listview.SetBounds(6, 40, 360, 430);
listview.Name = "lv_mails" + connection;
listview.View = View.List;
listview.SelectedIndexChanged += new EventHandler(mailSelectionChanged);
page.Controls.Add(listview);
ProgressBar progBar = new ProgressBar();
progBar.SetBounds(6, 239, 360, 23);
progBar.Name = "pb_progress" + connection;
progBar.Style = ProgressBarStyle.Blocks;
page.Controls.Add(progBar);
progBar.BringToFront();
Button button_compose = new Button();
button_compose.Name = "btn_compose" + connection;
button_compose.SetBounds(6, 10, 75, 23);
button_compose.Text = "New mail...";
button_compose.Click += new EventHandler(sendMailButton_Click);
page.Controls.Add(button_compose);
Button button_delete = new Button();
button_delete.Name = "btn_delete" + connection;
button_delete.SetBounds(87 ,10, 75, 23);
button_delete.Text = "Delete mail";
button_delete.Click += new EventHandler(deleteMail);
page.Controls.Add(button_delete);
GroupBox groupbox = new GroupBox();
groupbox.Text = "Mail";
groupbox.SetBounds(372, 34, 432, 436);
page.Controls.Add(groupbox);
Label label_from = new Label();
label_from.Text = "From:";
label_from.SetBounds(6, 22, 33, 13);
groupbox.Controls.Add(label_from);
Label label_to = new Label();
label_to.Text = "To:";
label_to.SetBounds(6, 48, 23, 13);
groupbox.Controls.Add(label_to);
Label label_cc = new Label();
label_cc.Text = "CC:";
label_cc.SetBounds(6, 74, 24, 13);
groupbox.Controls.Add(label_cc);
Label label_bcc = new Label();
label_bcc.Text = "BCC:";
label_bcc.SetBounds(218, 74, 31, 13);
groupbox.Controls.Add(label_bcc);
TextBox tb_from = new TextBox();
tb_from.Name = "tb_from" + connection;
tb_from.SetBounds(42, 19, 384, 20);
groupbox.Controls.Add(tb_from);
TextBox tb_to = new TextBox();
tb_to.Name = "tb_to" + connection;
tb_to.SetBounds(42, 45, 384, 20);
groupbox.Controls.Add(tb_to);
TextBox tb_cc = new TextBox();
tb_cc.Name = "tb_cc" + connection;
tb_cc.SetBounds(42, 71, 170, 20);
groupbox.Controls.Add(tb_cc);
TextBox tb_bcc = new TextBox();
tb_bcc.Name = "tb_bcc" + connection;
tb_bcc.SetBounds(256, 71, 170, 20);
groupbox.Controls.Add(tb_bcc);
TextBox tb_msg = new TextBox();
tb_msg.Name = "tb_msg" + connection;
tb_msg.Multiline = true;
tb_msg.SetBounds(9, 97, 417, 333);
groupbox.Controls.Add(tb_msg);
tabControl1.TabPages.Add(page);
}