本文整理汇总了C#中System.Windows.Forms.Label.BringToFront方法的典型用法代码示例。如果您正苦于以下问题:C# Label.BringToFront方法的具体用法?C# Label.BringToFront怎么用?C# Label.BringToFront使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.Forms.Label
的用法示例。
在下文中一共展示了Label.BringToFront方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: bindData
public void bindData(ArrayList al)
{
Label tb = new Label();
tb.Text = al[0].ToString();
tb.BringToFront();
this.Controls.Add(tb);
}
示例2: FileBrowserItem
public FileBrowserItem(ItemType tp, string path, Bitmap img, FileBrowser parent)
{
Type = tp;
FullPath = path;
Owner = parent;
Margin = new Padding(0);
FullImage = img; // FullImage - contains image in natural size.
BackgroundImageLayout = ImageLayout.None;
Click += ClickEvent;
MouseEnter += OnMouseEnter;
MouseLeave += OnMouseLeave;
Text = new Label
{
Parent = this,
AutoSize = false,
AutoEllipsis = true
};
SetVariables(img, parent);
Text.BackColor = Color.Transparent;
if (Type == ItemType.Folder || Type == ItemType.File)
Text.Text = Path.GetFileName(path);
if (Type == ItemType.Drive)
Text.Text = FullPath;
Text.BringToFront();
Text.Click += ClickEvent;
Text.MouseEnter += OnMouseEnter;
Text.MouseLeave += OnMouseLeave;
}
示例3: _addTopDescription
private void _addTopDescription() {
Label codeWord = new Label();
Controls.Add(codeWord);
codeWord.BringToFront();
codeWord.Left = 8 + 22;
codeWord.Top = 5;
codeWord.Text = "Codeword";
codeWord.Font = new Font(FontFamily.GenericMonospace.ToString(), 8);
Label runSize = new Label();
Controls.Add(runSize);
runSize.Left = 8 + 22 + 116;
runSize.Top = 5;
runSize.Text = "Runsize";
runSize.Font = new Font(FontFamily.GenericMonospace.ToString(), 8);
Label line = new Label();
Controls.Add(line);
line.Left = 7 + 22;
line.Top = 22;
line.Size = new Size(195, 2);
line.BorderStyle = BorderStyle.Fixed3D;
line.BringToFront();
line.ForeColor = SystemColors.ControlDarkDark;
}
示例4: createDrawInterface
public void createDrawInterface(Hero hero)
{
Color back = new Color();
back = Color.White;
health_lbl = new Label();
health_lbl.Name = "health_lbl";
health_lbl.Text = "Здоровье "+hero.Health.ToString();
health_lbl.ForeColor = Color.Red;
health_lbl.BackColor = back;
health_lbl.Location = new Point(90, 400);
health_lbl.BringToFront();
Controls.Add(health_lbl);
mana_lbl = new Label();
mana_lbl.Name = "mana_lbl";
mana_lbl.Text = "Мана " + hero.Mana.ToString();
mana_lbl.ForeColor = Color.Blue;
mana_lbl.BackColor = back;
mana_lbl.Location = new Point(450, 400);
Controls.Add(mana_lbl);
weight_lbl = new Label();
weight_lbl.Name = "weight_lbl";
weight_lbl.Text = "Вес " + hero.Weight.ToString()+"/"+hero.Capacity.ToString();
weight_lbl.ForeColor = Color.Black;
weight_lbl.BackColor = back;
weight_lbl.Location = new Point(90, 425);
Controls.Add(weight_lbl);
money_lbl = new Label();
money_lbl.Name = "money_lbl";
money_lbl.Text = "Золото " + hero.Money.ToString();
money_lbl.ForeColor = Color.Goldenrod;
money_lbl.BackColor = back;
money_lbl.Location = new Point(450, 425);
Controls.Add(money_lbl);
inventory_btn = new Button();
inventory_btn.Name = "inventory_btn";
inventory_btn.Text = "Рюкзак";
inventory_btn.BackColor = back;
inventory_btn.Location = new Point(550, 400);
inventory_btn.Click += new EventHandler (inventory_btn_Click);
Controls.Add(inventory_btn);
interface_panel = new Panel();
interface_panel.Location = new Point(0, 370);
interface_panel.Width = 635;
interface_panel.Height = 100;
interface_panel.BackColor = back;
Controls.Add(interface_panel);
Graphics g = interface_panel.CreateGraphics();
g.FillRectangle(Brushes.Black, 0, 0, interface_panel.Width, 3);
}
示例5: CreateLabel
public static void CreateLabel(Form form)
{
last = DateTime.Now;
label = new System.Windows.Forms.Label();
label.Text = "0";
label.Name = "fps";
label.AutoSize = true;
label.Dock = System.Windows.Forms.DockStyle.Right;
label.BackColor = System.Drawing.Color.Transparent;
label.Font = new System.Drawing.Font("Arial Black", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
label.ForeColor = System.Drawing.Color.Yellow;
label.Parent = form;
label.BringToFront();
}
示例6: TextBox
public TextBox()
{
_textBox = new System.Windows.Forms.TextBox();
_textBox.Dock = DockStyle.Fill;
_textBox.GotFocus += _textBox_GotFocus;
_textBox.LostFocus += _textBox_LostFocus;
Controls.Add(_textBox);
_label = new Label();
_label.ForeColor = SystemColors.GrayText;
_label.Cursor = Cursors.IBeam;
_label.MouseDown += new MouseEventHandler(_label_MouseDown);
Controls.Add(_label);
_label.BringToFront();
}
示例7: KroRForm
public KroRForm(IWorld world)
{
this.world=world;
ClientSize = new System.Drawing.Size(800, 600);
var font=new Font("Arial", 18);
clocks=new Label();
clocks.Size=new Size(100,50);
clocks.Location=new Point(ClientSize.Width-clocks.Width,0);
clocks.Font=font;
clocks.BackColor=Color.White;
Controls.Add(clocks);
scores = new Label();
scores.BackColor = Color.White;
scores.Font = font;
scores.Size = new Size(ClientSize.Width-clocks.Width, clocks.Height);
scores.BringToFront();
Controls.Add(scores);
var engine = world.Engine as KroREngine;
var control = new DrawerControl(new DirectXFormDrawer(engine.DrawerFactory.GetDirectXScene(), new DrawerSettings
{
ViewMode = ViewModes.FirstPerson,
BodyCameraLocation = world.Configuration.Settings.ObserverCameraLocation,
Robot = engine.Root
}));
control.Size = new Size(ClientSize.Width,ClientSize.Height-scores.Height);
control.Location = new Point(0, scores.Height);
Controls.Add(control);
world.Scores.ScoresChanged += () => { Invoke(new Action(UpdateScores)); };
world.Clocks.Ticked += () => { Invoke(new Action(UpdateClocks)); };
world.Exit += () => worldExited = true;
UpdateScores();
thread= new Thread(()=>world.RunActively(1)) { IsBackground = true };
thread.Start();
}
示例8: build
public void build(string str)
{
int count = 0;
int startX = 50;
int startY = 36;
string[] strCollection = Regex.Split(str, @"\{(.*?)\}");
for (int i = 0; i < strCollection.Length; i++)
{
int temp = strCollection[i].IndexOf("/");
count++;
Point point = createPosition(i, startX, startY);
if (strCollection[i].ToString() != "")
{
if (temp == 0)
{
Label txtBox = new Label();
txtBox.Name = "txtBoxDynamic" + i.ToString();
txtBox.Text = strCollection[i].ToString();
txtBox.AutoSize = true;
txtBox.Location = point;
txtBox.Size = new System.Drawing.Size(50, 25);
txtBox.BringToFront();
gbREST.Controls.Add(txtBox);
}
else
{
//Parameter box
TextBox txtBox = new TextBox();
txtBox.Name = "txtBoxDynamic" + i.ToString();
txtBox.Text = "{" + strCollection[i].ToString() + "}";
txtBox.Font = new Font("Times New Roman", 9, FontStyle.Italic);
txtBox.Location = point;
txtBox.Size = new System.Drawing.Size(200, 25);
txtBox.BringToFront();
gbREST.Controls.Add(txtBox);
}
}
}
}
示例9: PulseGeneratorForm
public PulseGeneratorForm(PIC.PIC pic)
{
InitializeComponent();
portAAdapter = (PIC.Ports.IOAdapter) pic.getRegisterFileMap().getAdapter(PIC.Register.RegisterConstants.PORTA_ADDRESS);
portBAdapter = (PIC.Ports.IOAdapter) pic.getRegisterFileMap().getAdapter(PIC.Register.RegisterConstants.PORTB_ADDRESS);
intervalABox.Text = DEFAULT_INTERVAL.ToString();
intervalBBox.Text = DEFAULT_INTERVAL.ToString();
portATimer.Elapsed += portATimer_Elapsed;
portBTimer.Elapsed += portBTimer_Elapsed;
int i = 0;
Label label;
// PORT-Checkboxes dynamisch erstellen
for (i = 0; i < 8; i++)
{
portACheckBoxes[7-i] = new CheckBox();
portACheckBoxes[7-i].SetBounds(CHECKBOX_X_OFFSET + i * (CHECKBOX_WIDTH + CHECKBOX_SPACING), CHECKBOX_PORTA_Y_OFFSET, CHECKBOX_WIDTH, CHECKBOX_WIDTH);
portACheckBoxes[7-i].Parent = this;
portACheckBoxes[7-i].MouseClick += new MouseEventHandler(portACheckboxChanged);
label = new Label();
label.Text = (7 - i).ToString();
label.SetBounds(CHECKBOX_X_OFFSET + i * (CHECKBOX_WIDTH + CHECKBOX_SPACING), LABEL_PORTA_Y_OFFSET, CHECKBOX_WIDTH, CHECKBOX_WIDTH);
label.Parent = this;
label.Show();
label.BringToFront();
portBCheckBoxes[7-i] = new CheckBox();
portBCheckBoxes[7-i].SetBounds(CHECKBOX_X_OFFSET + i * (CHECKBOX_WIDTH + CHECKBOX_SPACING), CHECKBOX_PORTB_Y_OFFSET, CHECKBOX_WIDTH, CHECKBOX_WIDTH);
portBCheckBoxes[7-i].Parent = this;
portBCheckBoxes[7-i].MouseClick += new MouseEventHandler(portBCheckboxChanged);
label = new Label();
label.Text = (7 - i).ToString();
label.SetBounds(CHECKBOX_X_OFFSET + i * (CHECKBOX_WIDTH + CHECKBOX_SPACING), LABEL_PORTB_Y_OFFSET, CHECKBOX_WIDTH, CHECKBOX_WIDTH);
label.Parent = this;
label.Show();
label.BringToFront();
}
}
示例10: Calendar
public Calendar()
{
InitializeComponent();
for (int s = 1; s <= 6; s++) {
for (int d = 1; d <= 7; d++) {
System.Windows.Forms.Label EtiquetaDia = new System.Windows.Forms.Label();
EtiquetaDia.BackColor = this.DisplayStyle.DataAreaColor;
EtiquetaDia.Text = "";
EtiquetaDia.Size = new Size(28, 20);
EtiquetaDia.TextAlign = ContentAlignment.MiddleCenter;
EtiquetaDia.ForeColor = this.DisplayStyle.TextColor;
EtiquetaDia.BringToFront();
this.Controls.Add(EtiquetaDia);
Dias.Add(EtiquetaDia);
EtiquetaDia.MouseDown += new System.Windows.Forms.MouseEventHandler(EtiquetaDia_Click);
EtiquetaDia.DoubleClick += new System.EventHandler(EtiquetaDia_DoubleClick);
}
}
EtiquetaMes.BackColor = this.DisplayStyle.BackgroundColor;
ReubicarDias();
MostrarCalendario();
}
示例11: actionPerformed
public virtual void actionPerformed(System.Object event_sender, System.EventArgs event_Renamed)
{
if (event_sender.Equals(openMenu))
{
chooser.ShowDialog(this);
if (new System.IO.FileInfo(chooser.FileName) == null)
return ;
try
{
sourceImage = ImageIO.read(new System.IO.FileInfo(chooser.FileName));
}
catch (System.Exception e)
{
SupportClass.WriteStackTrace(e, Console.Error);
}
}
else if (SupportClass.CommandManager.GetCommand(event_sender).Equals("Open from URL"))
{
try
{
//UPGRADE_TODO: Class 'java.net.URL' was converted to a 'System.Uri' which does not throw an exception if a URL specifies an unknown protocol. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1132'"
sourceImage = ImageIO.read(new System.Uri(url.Text));
}
catch (System.Exception e)
{
SupportClass.WriteStackTrace(e, Console.Error);
}
}
else
return ;
if (sourceImageLabel != null)
{
//UPGRADE_TODO: Method 'javax.swing.JFrame.getContentPane' was converted to 'System.Windows.Forms.Form' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javaxswingJFramegetContentPane'"
((System.Windows.Forms.ContainerControl) this).Controls.Remove(sourceImageLabel);
}
System.Windows.Forms.Label temp_label;
temp_label = new System.Windows.Forms.Label();
temp_label.Image = (System.Drawing.Image) sourceImage.Clone();
sourceImageLabel = temp_label;
//UPGRADE_TODO: Method 'javax.swing.JFrame.getContentPane' was converted to 'System.Windows.Forms.Form' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javaxswingJFramegetContentPane'"
//UPGRADE_TODO: Method 'java.awt.Container.add' was converted to 'System.Windows.Forms.ContainerControl.Controls.Add' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javaawtContaineradd_javaawtComponent_javalangObject'"
((System.Windows.Forms.ContainerControl) this).Controls.Add(sourceImageLabel);
sourceImageLabel.Dock = System.Windows.Forms.DockStyle.Left;
sourceImageLabel.BringToFront();
QRCodeDecoder decoder = new QRCodeDecoder();
if (canvas != null)
{
//UPGRADE_TODO: Method 'javax.swing.JFrame.getContentPane' was converted to 'System.Windows.Forms.Form' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javaxswingJFramegetContentPane'"
((System.Windows.Forms.ContainerControl) this).Controls.Remove(canvas);
//canvas.setImage(null);
}
canvas = new J2SEDebugCanvas();
QRCodeDecoder.setCanvas(canvas);
//UPGRADE_TODO: Method 'javax.swing.JFrame.getContentPane' was converted to 'System.Windows.Forms.Form' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javaxswingJFramegetContentPane'"
//UPGRADE_TODO: Method 'java.awt.Container.add' was converted to 'System.Windows.Forms.ContainerControl.Controls.Add' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javaawtContaineradd_javaawtComponent_javalangObject'"
((System.Windows.Forms.ContainerControl) this).Controls.Add(canvas);
canvas.Dock = System.Windows.Forms.DockStyle.Right;
canvas.BringToFront();
System.String decodedString = null;
try
{
decodedString = new String(decoder.decode(new J2SEImage(this, sourceImage)));
}
catch (DecodingFailedException e)
{
canvas.println(e.getMessage());
canvas.println("--------");
return ;
}
decodedString = ContentConverter.convert(decodedString);
canvas.println("\nDecode result:");
canvas.println(decodedString);
canvas.println("--------");
if (decodedText != null)
{
//UPGRADE_TODO: Method 'javax.swing.JFrame.getContentPane' was converted to 'System.Windows.Forms.Form' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javaxswingJFramegetContentPane'"
((System.Windows.Forms.ContainerControl) this).Controls.Remove(decodedText);
}
System.Windows.Forms.TextBox temp_TextBox;
temp_TextBox = new System.Windows.Forms.TextBox();
temp_TextBox.Multiline = true;
temp_TextBox.WordWrap = false;
temp_TextBox.ScrollBars = System.Windows.Forms.ScrollBars.Both;
temp_TextBox.Text = decodedString;
decodedText = temp_TextBox;
decodedText.WordWrap = true;
//UPGRADE_ISSUE: Method 'javax.swing.JTextArea.setRows' was not converted. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1000_javaxswingJTextAreasetRows_int'"
decodedText.setRows(decodedString.Length / 20 + 1);
if (decodedString.Length < 20)
{
//UPGRADE_ISSUE: Method 'javax.swing.JTextArea.setColumns' was not converted. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1000_javaxswingJTextAreasetColumns_int'"
decodedText.setColumns(decodedString.Length);
}
else
{
//UPGRADE_ISSUE: Method 'javax.swing.JTextArea.setColumns' was not converted. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1000_javaxswingJTextAreasetColumns_int'"
//.........这里部分代码省略.........
示例12: selectCharacter
//nach character selektierung die oberfläche ändern
private void selectCharacter()
{
selectedCharacterName.Text = selectedCharacter.Name;
if (selectedCharacter.Equipment != null)
{
//leere benutzeroberfläche von früheren character die labels
foreach (Label lb in this.Controls.OfType<Label>().ToArray())
{
if (lb.Name.Contains("EquipmentLabel"))
{
lb.Dispose();
this.Controls.Remove(lb);
}
}
//leere benutzeroberfläche von früheren character die picture boxen
foreach (PictureBox pb in this.Controls.OfType<PictureBox>().ToArray())
{
if (pb.Name.Contains("ItemPicture"))
{
pb.Dispose();
this.Controls.Remove(pb);
}
}
int count = 0;
int row = 0;
foreach (Equipment equipment in selectedCharacter.Equipment)
{
Label label = new Label();
label.Location = new Point(350 + row, 100 + count);
label.Size = new Size(100, 20);
label.Text = equipment.Slot;
label.Name = "EquipmentLabel" + equipment.Id;
label.BackColor = Color.Transparent;
label.Parent = background;
this.Controls.Add(label);
label.BringToFront();
PictureBox picture = new PictureBox();
picture.Location = new Point(450 + row, 100 + count);
picture.Size = new Size(64, 64);
picture.Text = equipment.Slot;
picture.BackColor = Color.Transparent;
picture.Name = "ItemPicture" + equipment.Id;
picture.Parent = background;
this.Controls.Add(picture);
picture.BringToFront();
row += 210;
if (row > 630)
{
count += 70;
row = 0;
}
}
}
}
示例13: WebBox
//.........这里部分代码省略.........
this.StartPosition = FormStartPosition.CenterParent;
this.Padding = new System.Windows.Forms.Padding(1);
_plHeader.BackColor = Color.FromArgb(30, 30, 30);
_plHeader.Dock = DockStyle.Top;
_plHeader.Height = ((int)(g.MeasureString("Sample", titleFont).Height + 3) * 2);
_plHeader.Padding = new Padding(((int)(g.MeasureString("Sample", titleFont).Height / 2 + 1)));
_lblTitle = new Label();
_lblTitle.ForeColor = Color.White;
_lblTitle.Font = titleFont;
//this.Margin = new System.Windows.Forms.Padding(2);
_lblTitle.Dock = DockStyle.Left;
//SizeF sizeTitle = g.MeasureString("Sample", titleFont);
//_lblTitle.Height = ((int)(g.MeasureString("Sample", titleFont).Height + 1));
_lblTitle.AutoSize = true;
_plHeader.Controls.Add(_lblTitle);
//SizeF sizeTitle = g.MeasureString("Sample", titleFont);
// _lblTitle.Height = 20;// ((int)(g.MeasureString("Sample", titleFont).Height + 1) * 2);
//_lblMessage = new Label();
//_lblMessage.ForeColor = Color.White;
//_lblMessage.Font = messageFont;
//_lblMessage.Dock = DockStyle.Fill;
_flpButtons.FlowDirection = FlowDirection.RightToLeft;
_flpButtons.Dock = DockStyle.Fill;
//_plTranslator.BackColor = Color.FromArgb(30, 30, 30);
//_plTranslator.Dock = DockStyle.Top;
//_plTranslator.Height = 500;
_plFooter.Dock = DockStyle.Bottom;
_plFooter.Padding = new Padding(10);
_plFooter.BackColor = Color.FromArgb(30, 40, 30);
_plFooter.Height = 50;
_plFooter.Controls.Add(_flpButtons);
//webBrowserTranslator.AllowWebBrowserDrop = false;
_webBrowserTranslator.IsWebBrowserContextMenuEnabled = false;
_webBrowserTranslator.WebBrowserShortcutsEnabled = true;
_webBrowserTranslator.Name = "webBrowserTranslator";
_webBrowserTranslator.ScriptErrorsSuppressed = true;
Controls.Add(_webBrowserTranslator);
_webBrowserTranslator.Dock = DockStyle.Fill;
//_webBrowserTranslator.Url = new Uri(_TranslateBox._translatorUrl);
// this.webBrowser2.DocumentText = Parameters.newShowImageWebPage;
// webBrowser2.Refresh();
//_lnkLblTranslate = new LinkLabel();
////_lnkLblTranslate.ForeColor = Color.Blue;
//_lnkLblTranslate.Font = translateLnkFont;
//_lnkLblTranslate.Dock = DockStyle.Top;
//_lnkLblTranslate.Text = "[En ─› Ҩἒὧℓ₯]";
//// _lnkLblTranslate.Image = global::MyTvShowsOrganizer.Properties.Resources.binggreensmall;
////_lnkLblTranslate.ImageAlign = ContentAlignment.MiddleLeft ;
//_lnkLblTranslate.Click += _lnkLblTranslate_Click;
//_plTranslate.Dock = DockStyle.Bottom;
//_plTranslate.Padding = new Padding(20, 0, 0, 0);
//_plTranslate.Height = ((int)(g.MeasureString(_lnkLblTranslate.Text, translateLnkFont).Height + 2));
//_plTranslate.Controls.Add(_lnkLblTranslate);
//_picIcon.Width = 32;
//_picIcon.Height = 32;
//_picIcon.Location = new Point(30, 50);
//_plIcon.Dock = DockStyle.Left;
//// _plIcon.Padding = new Padding(20);
//_plIcon.Width = 65;
//_plIcon.Controls.Add(_picIcon);
List<Control> controlCollection = new List<Control>();
//controlCollection.Add(this);
controlCollection.Add(_plHeader);
controlCollection.Add(_lblTitle);
controlCollection.Add(_flpButtons);
//controlCollection.Add(_plHeader);
//controlCollection.Add(_plTranslate);
//controlCollection.Add(_plFooter);
//controlCollection.Add(_plIcon);
//controlCollection.Add(_picIcon);
//controlCollection.Add(webBrowserTranslator);
foreach (Control control in controlCollection)
{
control.MouseDown += TranslateBox_MouseDown;
control.MouseMove += TranslateBox_MouseMove;
}
this.Controls.Add(_plHeader);
_plHeader.BringToFront();
_lblTitle.BringToFront();
//this.Controls.Add(_plIcon);
//this.Controls.Add(_plTranslate);
this.Controls.Add(_plFooter);
_plFooter.BringToFront();
}
示例14: Expand
/// <summary>
/// Expand the displayed path into <paramref name="into"/>
/// </summary>
/// <param name="into">The location to append to the end of the path</param>
public virtual void Expand(string into)
{
//label for the seperator
Label sepLabel = new Label();
sepLabel.Text = Seperator;
FormatLabel(sepLabel);
this.Controls.Add(sepLabel);
sepLabel.BringToFront();
//label for the location (given by the "into" parameter)
Label locLabel = new Label();
locLabel.Text = into;
FormatClickableLabel(locLabel);
this.Controls.Add(locLabel);
locLabel.BringToFront();
}
示例15: Menu_Click
void Menu_Click(object sender, EventArgs e)
{
Program.TimerReset();
var MenuButton = sender as Button;
menu = new BuildingMenu();
menu.Tag = MenuButton.Tag;
menu.Parent = this;
menu.Location = new Point(MenuButton.Location.X - 100, MenuButton.Location.Y + MenuButton.Height);
mask = new Label();
mask.BackColor = this.BackColor;
mask.Size = this.Size;
//mask.Location = this.Location;
mask.Parent = this;
mask.BringToFront();
var nam = this.Controls[this.Controls.IndexOfKey("name" + menu.Tag.ToString())] as Button;
var org = this.Controls[this.Controls.IndexOfKey("org" + menu.Tag.ToString())] as Label;
nam.BringToFront();
org.BringToFront();
mask.Show();
var c = list[(int)menu.Tag];
nam.Enabled = false;
menu.EditRecord += EditRecord_Click;
menu.AddFamily += AddToFamily_Click;
menu.CancelMenu += CancelMenu_Click;
menu.Show();
menu.BringToFront();
}