当前位置: 首页>>代码示例>>C#>>正文


C# Panel.BringToFront方法代码示例

本文整理汇总了C#中System.Windows.Forms.Panel.BringToFront方法的典型用法代码示例。如果您正苦于以下问题:C# Panel.BringToFront方法的具体用法?C# Panel.BringToFront怎么用?C# Panel.BringToFront使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Windows.Forms.Panel的用法示例。


在下文中一共展示了Panel.BringToFront方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: AddCardDiscardPile

        private void AddCardDiscardPile(MouseEventArgs e, Panel sourcePanel, DiscardPile discardPile, ref Point lastLocation, MouseEventHandler methodToHandle)
        {
            if (e.Button == MouseButtons.Left)
            {
            if (wPile.getCount() > 0)
            {
                Card card = wPile.getLastCardInPile();
                discardPile.AddToPile(card);
                if (discardPile.getCount() == 1)
                    sourcePanel.BackgroundImage = card.getCardImage();
                else
                {
                    Panel p = new Panel();
                    p.BackgroundImage = card.getCardImage();
                    p.Height = sourcePanel.Height;
                    p.Width = sourcePanel.Width;
                    lastLocation.Offset(0, 20);
                    p.Location = lastLocation;
                    lastLocation = p.Location;
                    p.MouseDown += new System.Windows.Forms.MouseEventHandler(methodToHandle);
                    this.Controls.Add(p);
                    p.BringToFront();
                }

                //Remove card from the waste pile
                wPile.removeCard(card);
                wastePilePicture.BackgroundImage = null;
            }
            }
        }
开发者ID:jmutabaz,项目名称:OOP-Solitaire-Part-I,代码行数:30,代码来源:CalculationGame.cs

示例2: GiveawaysWindow

        public GiveawaysWindow(IExtension sender)
        {
            InitializeComponent();

            ini = new Settings(sender, "Settings.ini", "[Default]");

            UI.CenterSpacer(GiveawayTypeLabel, GiveawayTypeSpacer);
            UI.CenterSpacer(GiveawaySettingsLabel, GiveawaySettingsSpacer, false, true);
            UI.CenterSpacer(GiveawayBansLabel, GiveawayBansSpacer);
            UI.CenterSpacer(GiveawayUsersLabel, GiveawayUsersSpacer);

            Panel panel = new Panel();
            panel.Size = new Size(1, 1);
            panel.Location = new Point(GiveawayTypeSpacer.Location.X + GiveawayTypeSpacer.Size.Width - 1, GiveawayTypeSpacer.Location.Y + 9);
            Controls.Add(panel);
            panel.BringToFront();
            panel = new Panel();
            panel.Size = new Size(1, 1);
            panel.Location = new Point(GiveawayBansSpacer.Location.X + GiveawayBansSpacer.Size.Width - 1, GiveawayBansSpacer.Location.Y + 9);
            Controls.Add(panel);
            panel.BringToFront();
            /*panel.BackColor = Color.Black;
            panel.Size = new Size(Giveaway_AddPresent.Size.Width + Giveaway_RemovePresent.Size.Width, 1);
            panel.Location = new Point(Giveaway_AddPresent.Location.X, Giveaway_AddPresent.Location.Y + 1);
            Controls.Add(panel);
            panel.BringToFront();*/
        }
开发者ID:carriercomm,项目名称:ModBot,代码行数:27,代码来源:GiveawaysWindow.cs

示例3: add_total

        public void add_total(int total)
        {
            for (int i = 0; i < total; i++)
            {
                Panel Temp_Panel = new Panel();
                Temp_Panel.BackColor = System.Drawing.Color.Aqua;
                Temp_Panel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
                Temp_Panel.BringToFront();
                Temp_Panel.Location = new System.Drawing.Point(X_Location, Y_Location);
                Temp_Panel.Name = "Panel" + i;
                Temp_Panel.Size = new System.Drawing.Size(10, 16);
                panels.Add(Temp_Panel);
                Temp_Panel = null;
                if (Temp_Panel != null)
                    Temp_Panel.Dispose();
                write_controls(panels.Count - 1);
                //Controls.Add(panels[panels.Count - 1]);

                if ((X_Location + 16) > 575)
                {
                    write_textbox("\r\n");
                    Y_Location += 18;
                    X_Location = 4;

                }
                else
                    X_Location += 16;
                //panels[panels.Count - 1].Show();
            }
            write_progress(0, panels.Count);
            if (panels.Count >= 200)
                MessageBox.Show("Achievement Unlocked: Over 200!", "Achievement Unlocked", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
        }
开发者ID:daberkow,项目名称:6to4-Card-Cleaner,代码行数:33,代码来源:Visual_Form.cs

示例4: addHind

 //adding obstacles
 public void addHind(int lanePosition)
 {
     Panel hind = new Panel();
     hind.Location = new System.Drawing.Point(this.Width-1, lanePosition);
     hind.Name = "hind";
     hind.Size = new System.Drawing.Size(35, 30);
     hind.TabIndex = 1;
     obstacles.Add(hind);
     this.Controls.Add(hind);
     hind.BringToFront();
     car1.BringToFront();
 }
开发者ID:Jonnaboyah,项目名称:Hoppespill,代码行数:13,代码来源:Form1.cs

示例5: ServerForm

        public ServerForm()
        {
            this._iconList = new List<PictureBox>();
            this._labelList = new List<Label>();
            for (int i = 0; i < 8; i++)
            {
                PictureBox newbox = new PictureBox();
                Point point = new Point((81 + 72*i), 254);
                newbox.Location = point;
                newbox.ImageLocation = Environment.CurrentDirectory + "/../../Resources/buddy_bleu_normal.png";
                newbox.SizeMode = PictureBoxSizeMode.AutoSize;
                newbox.Visible = false;
                this.Controls.Add(newbox);
                _iconList.Add(newbox);

                Label newlabel = new Label();
                newlabel.Font = new Font("Impact", 15);
                newlabel.Visible = false;
                //newlabel.TextAlign = ContentAlignment.MiddleCenter;
                newlabel.Text = "-1";
                newlabel.BackColor = Color.Transparent;
                //newlabel.Location = point;
                newlabel.Parent = _iconList[i];
                _labelList.Add(newlabel);
            }

            Panel panel = new Panel();
            panel.BorderStyle = BorderStyle.FixedSingle;
            panel.Visible = true;
            panel.BackColor = Color.White;
            panel.Location = new Point(66, 311);
            panel.Size = new Size(600, 128);
            this.Controls.Add(panel);
            panel.BringToFront();

            //this._dataObj = new DataPack();

            InitializeComponent();

            DataTable table = new DataTable();
            string schemePath = Environment.CurrentDirectory + "/../../TableScheme.xsd";
            table.ReadXmlSchema(schemePath);

            DataPack._cli_table = table;

            setData();

            this._server = new ServerListener(9000);
            _srv_thread = new Thread(this._server.RegisterClients);
            _srv_thread.Start();
        }
开发者ID:walzero,项目名称:TrabalhoFilosofos,代码行数:51,代码来源:ServerForm.cs

示例6: OpenReport

 public void OpenReport()
 {
     _Parent.SuspendLayout();
             _ctlBoard = new Panel();
             _ctlBoard.Name = "CR_Board";
             _ctlBoard.Top = 0;
             _ctlBoard.Left = 0;
             _ctlBoard.Location = new System.Drawing.Point(0, 0);
             _ctlBoard.Size = new System.Drawing.Size(800, 600);
             //_ctlBoard.Anchor = (AnchorStyles)(AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Bottom | AnchorStyles.Right);
             _ctlBoard.BringToFront();
             _ctlBoard.Text = "Initializing report controls...";
             _Parent.Controls.Add(_ctlBoard);
             _Parent.ResumeLayout(false);
             _Parent.PerformLayout();
 }
开发者ID:ahalassy,项目名称:reportsmart,代码行数:16,代码来源:ReportControl.cs

示例7: modifyTenantToolStripMenuItem_Click

 private void modifyTenantToolStripMenuItem_Click(object sender, EventArgs e)
 {
     Panel display = new Panel();
     Presentation.UpdateTenant tenant = new Presentation.UpdateTenant();
     tenant.BringToFront();
     tenant.TopLevel = false;
     tenant.Visible = true;
     tenant.FormBorderStyle = FormBorderStyle.None;
     tenant.Dock = DockStyle.Fill;
     display.Controls.Add(tenant);
     display.Size = panel1.Size;
     panel1.Controls.Add(display);
     display.Show();
     display.BringToFront();
     tenant.Show();
 }
开发者ID:Star-Lowd,项目名称:PMS--Property-Management-System-,代码行数:16,代码来源:Tenants.cs

示例8: ShowParametrForm

	private void ShowParametrForm(DataGridView Table)
	{
		if (Table != null) {
			int CurrentElementPosition = 0;
			SelectedColumns = new bool[Table.ColumnCount - 1];
			SelectedColumns[0] = true;
			Panel Surface = new Panel();
			Surface.AutoScroll = true;
			Surface.Dock = DockStyle.Fill;
			Surface.Parent = this;
			Surface.BringToFront();
			Surface.HorizontalScroll.Visible = false;
			this.Padding = new Padding(0, 0, 0, 10);
			for (int i = 2; i < Table.ColumnCount; i++) {
				CheckBox CurrentCheckBox = new CheckBox();
				CurrentCheckBox.Location = new Point(15, CurrentElementPosition + 10);
				CurrentCheckBox.Text = Table.Columns[i].HeaderText;
				CurrentCheckBox.Parent = Surface;
				CurrentCheckBox.AutoSize = true;
				CurrentCheckBox.Tag = i - 1;
				CurrentCheckBox.CheckedChanged += (_s, _e) =>
				{
					SelectedColumns[(int)((CheckBox)_s).Tag] = CurrentCheckBox.Checked;
				};
				CurrentCheckBox.Checked = true;
				CurrentElementPosition = CurrentCheckBox.Bottom;
			}
			Button BackButton = new Button();
			BackButton.Text = "Назад";
			BackButton.AutoSize = true;
			BackButton.Click += (_s, _e) =>
			{
				this.Close();
			};
			Button OkButton = new Button();
			OkButton.Text = "Корреляция";
			OkButton.AutoSize = true;
			BackButton.Location = new Point(15, CurrentElementPosition + 10);
			OkButton.Location = new Point(this.Width - OkButton.Width - 10, CurrentElementPosition + 10);
			OkButton.Anchor = AnchorStyles.Right;
			BackButton.Parent = Surface;
			OkButton.Parent = Surface;
			OkButton.Click += StartCorelationDelegate;
		}
	}
开发者ID:JDevelopBox,项目名称:Banklab,代码行数:45,代码来源:ParamForm.cs

示例9: CreateSideBarTitle

	/// <summary>
	/// Создать заголовок боковой панели
	/// </summary>
	/// <param name="Caption"></param>
	private Label CreateSideBarTitle(string Caption)
	{
		if (SideBarPanel != null) {
			Label sidebar_text = new Label();
			sidebar_text.Text = Caption;
			sidebar_text.Dock = DockStyle.Top;
			sidebar_text.TextAlign = ContentAlignment.MiddleCenter;
			sidebar_text.Parent = SideBarPanel;
			sidebar_text.BackColor = System.Drawing.Color.SteelBlue;
			sidebar_text.ForeColor = Color.White;
			Surface = new Panel();
			Surface.Parent = SideBarPanel;
			Surface.Dock = DockStyle.Top;
			Surface.AutoSize = true;
			Surface.BringToFront();
			return sidebar_text;
		}
		return null;
	}
开发者ID:JDevelopBox,项目名称:Banklab,代码行数:23,代码来源:SideBar.cs

示例10: administrate

        public administrate(string _given_name, NetworkStream _ns, string _IP)
        {
            InitializeComponent();

            // Importing the external variables
            given_name = _given_name;
            ns = _ns;
            this.Text = this.Text.Replace("%CLIENTNAME%", given_name);
            ip = _IP;

            // Trying to keep the looks good
            Panel coverage = new Panel();
            coverage.Location = new Point(200, -6);
            coverage.Size = new Size(398, 20);
            coverage.Anchor = AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top;

            Controls.Add(coverage);
            coverage.BringToFront();
        }
开发者ID:canselcik,项目名称:Epicenter-Remote-Administration-Tool,代码行数:19,代码来源:administrate.cs

示例11: AfficheUnBateau

        private void AfficheUnBateau(Bateau unBateau)
        {
            char lettre;
            int chiffre;
            Panel unPanel;
            for (int i = 0; i < unBateau.Tab.Length; i++)
            {
                lettre = unBateau.Tab[i].letter;
                chiffre = unBateau.Tab[i].number;

                unPanel = new Panel();
                unPanel.BackgroundImage = new Bitmap(Battleship.Properties.Resources.Bateau);
                unPanel.Parent = PN_Joueur;
                unPanel.Location = new Point(chiffre * 35, GetPosition(lettre) * 35);
                unPanel.Height = 35;
                unPanel.Width = 35;
                unPanel.BorderStyle = BorderStyle.FixedSingle;
                unPanel.BackgroundImageLayout = ImageLayout.Stretch;
                unPanel.BringToFront();
            }
        }
开发者ID:MelBeee,项目名称:BattleShip_ClientServeur_A15,代码行数:21,代码来源:PlancheJeu.cs

示例12: LightMarker

        public LightMarker(Control parent, uint time, Point pos, Color clr)
        {
            BasePosition = pos;
            Fixed = false;
            mMarker = new Panel();
            mMarker.BackColor = clr;
            mMarker.Size = new Size(6, 10);
            mMarker.BorderStyle = BorderStyle.FixedSingle;
            mMarker.BringToFront();

            mMarker.Location = new Point(pos.X - 3, pos.Y - 7);
            mMarker.MouseClick += new MouseEventHandler(MouseClicked);
            mMarker.MouseDoubleClick += new MouseEventHandler(MouseDoubleClick);
            mMarker.MouseDown += new MouseEventHandler(MarkerMouseDown);
            mMarker.MouseUp += new MouseEventHandler(MarkerMouseUp);

            mMarker.MouseMove += new MouseEventHandler(MarkerMouseMove);
            parent.Controls.Add(mMarker);
            Time = time;
            Color = clr;
        }
开发者ID:remixod,项目名称:sharpwow,代码行数:21,代码来源:LightMarker.cs

示例13: MainForm

        public MainForm()
        {
            InitializeComponent();
            this.spListView1 = new SPListView();
            // Add content panel
            contentPanel = new Panel();
            sideBar = new Panel();
            this.panel3.TabStop = true;

            this.panel3.Controls.Add(contentPanel);
            this.panel3.Controls.Add(sideBar);
            this.panel3.Controls.Add(spListView1);

            sideBar.Dock = DockStyle.Right;
            sideBar.Width = 320;

            contentPanel.TabStop = true;
            contentPanel.Dock = DockStyle.Fill;
            contentPanel.BringToFront();
            spListView1.Dock = DockStyle.Left;

            spListView1.Width =234;
            spListView1.ItemSelected += new SPListView.SPListItemMouseEventHandler(spListView1_ItemSelected);
            BuildMenu();
            this.Windows = new Dictionary<String, Control>();
            // Add sidebar

            browser = new SPWebBrowser("http://webchat.quakenet.org/");

            sideBar.Controls.Add(browser);

            browser.Dock = DockStyle.Fill;

            // Add SPTabView
            tabView = new SPTabView();
            this.contentPanel.Controls.Add(tabView);
            tabView.Dock = DockStyle.Fill;
            tabView.TabChanged += new EventHandler(tabView_TabChanged);
            navigate(new Uri("mako://static.cobresia.webfactional.com/spotdev/index.html"));
        }
开发者ID:krikelin,项目名称:SpotDev,代码行数:40,代码来源:MainForm.cs

示例14: CollectionTabPage

        public CollectionTabPage(int width, int height)
        {
            // View
            this.Width = width;
            this.Height = height;

            int topToBound = (height - numberOfRows * (borderWidth - 1) - 1) / 2;
            int leftToBound = (width - numberOfColunms * (borderWidth - 1) - 1) / 2;
            for (int i = 0; i < numberOfRows; i++)
                for (int j = 0; j < numberOfColunms; j++) {
                    Panel panel = new Panel();
                    panel.Top = topToBound + i * (borderWidth - 1) + 1;
                    panel.Left = leftToBound + j * (borderWidth - 1) + 1;
                    panel.Width = borderWidth;
                    panel.Height = borderWidth;
                    panel.BackColor = ConstUtility.GlobalBorderColor;
                    this.Controls.Add(panel);

                    Panel panel1 = new Panel();
                    panel1.Top = topToBound + i * (borderWidth - 1) + 2;
                    panel1.Left = leftToBound + j * (borderWidth - 1) + 2;
                    panel1.Width = borderWidth - 2;
                    panel1.Height = borderWidth - 2;
                    panel1.BackColor = ConstUtility.GlobalBackColor();
                    this.Controls.Add(panel1);
                    panel1.BringToFront();

                }

            // Data
            worker = new BackgroundWorker();
            worker.DoWork += Worker_DoWork;
            worker.RunWorkerCompleted += Worker_RunWorkerCompleted;
            worker.RunWorkerAsync();

            // Event
            EnvUtility.CollectedExprsChanged += EnvUtility_CollectedExprsChanged;
        }
开发者ID:SourceDark,项目名称:ThatExpr,代码行数:38,代码来源:CollectionTabPage.cs

示例15: NewDispenserPanel

        private void NewDispenserPanel(int Index, AES.MHE.Dispenser Dispenser)
        {
            //
            // DispenserPanel
            //
            System.Windows.Forms.Panel dispenserPanel = new Panel();
            dispenserPanel.Location = new System.Drawing.Point(3, dispenserPanelHeight * Index);
            dispenserPanel.Name = "DispenserPanel_" + Index.ToString();
            dispenserPanel.Size = new System.Drawing.Size(640, dispenserPanelHeight);
            dispenserPanel.TabIndex = 0;
            this.DispenserPanel.Controls.Add(dispenserPanel);
            //
            // DispenserTypeTextBox
            //
            System.Windows.Forms.TextBox dispenserTypeTextBox = new TextBox();
            dispenserTypeTextBox.Location = new System.Drawing.Point(8, 8);
            dispenserTypeTextBox.Name = "DispenserTypeTextBox_" + Index.ToString();
            dispenserTypeTextBox.Size = new System.Drawing.Size(202, 22);
            dispenserTypeTextBox.TextAlign = HorizontalAlignment.Center;
            dispenserTypeTextBox.TabIndex = 0;
            dispenserTypeTextBox.Text = DispenserType(Dispenser);
            dispenserTypeTextBox.ReadOnly = true;
            dispenserPanel.Controls.Add(dispenserTypeTextBox);
            //
            // DispenserValueTextBox
            //
            System.Windows.Forms.TextBox dispenserValueTextBox = new TextBox();
            dispenserValueTextBox.Location = new System.Drawing.Point(220, 8);
            dispenserValueTextBox.Name = "DispenserValueTextBox_" + Index.ToString();
            dispenserValueTextBox.Size = new System.Drawing.Size(30, 22);
            dispenserValueTextBox.TextAlign = HorizontalAlignment.Center;
            dispenserValueTextBox.TabIndex = 1;
            dispenserValueTextBox.Text = Dispenser.Value.ToString();
            dispenserValueTextBox.ReadOnly = true;
            dispenserPanel.Controls.Add(dispenserValueTextBox);
            //
            // DispenserAddressTextBox
            //
            System.Windows.Forms.TextBox dispenserAddressTextBox = new TextBox();
            dispenserAddressTextBox.Location = new System.Drawing.Point(260, 8);
            dispenserAddressTextBox.Name = "DispenserAddressTextBox_" + Index.ToString();
            dispenserAddressTextBox.Size = new System.Drawing.Size(24, 22);
            dispenserAddressTextBox.TextAlign = HorizontalAlignment.Center;
            dispenserAddressTextBox.TabIndex = 2;
            dispenserAddressTextBox.Text = Dispenser.UnitAddress.ToString();
            dispenserAddressTextBox.ReadOnly = true;
            dispenserPanel.Controls.Add(dispenserAddressTextBox);
            //
            // DispenserCoinsTextBox
            //
            System.Windows.Forms.TextBox dispenserCoinsTextBox = new TextBox();
            dispenserCoinsTextBox.Location = new System.Drawing.Point(320, 8);
            dispenserCoinsTextBox.Name = "DispenserCoinsTextBox_" + Index.ToString();
            dispenserCoinsTextBox.Size = new System.Drawing.Size(44, 22);
            dispenserCoinsTextBox.TextAlign = HorizontalAlignment.Center;
            dispenserCoinsTextBox.TabIndex = 3;
            dispenserCoinsTextBox.Text = Dispenser.Count.ToString();
            dispenserCoinsTextBox.ReadOnly = true;
            dispenserPanel.Controls.Add(dispenserCoinsTextBox);
            //
            // DispenserContentsTextBox
            //
            System.Windows.Forms.TextBox dispenserContentsTextBox = new TextBox();
            dispenserContentsTextBox.Location = new System.Drawing.Point(380, 8);
            dispenserContentsTextBox.Name = "DispenserContentsTextBox_" + Index.ToString();
            dispenserContentsTextBox.Size = new System.Drawing.Size(68, 22);
            dispenserContentsTextBox.TextAlign = HorizontalAlignment.Center;
            dispenserContentsTextBox.TabIndex = 4;
            dispenserContentsTextBox.Text = Dispenser.Count.ToString();
            dispenserContentsTextBox.ReadOnly = true;
            dispenserPanel.Controls.Add(dispenserContentsTextBox);
            //
            // DispenserStatusTextBox
            //
            System.Windows.Forms.TextBox dispenserStatusTextBox = new TextBox();
            dispenserStatusTextBox.Location = new System.Drawing.Point(456, 8);
            dispenserStatusTextBox.Name = "DispenserStatusTextBox_" + Index.ToString();
            dispenserStatusTextBox.Size = new System.Drawing.Size(148, 22);
            dispenserStatusTextBox.TextAlign = HorizontalAlignment.Center;
            dispenserStatusTextBox.TabIndex = 5;
            dispenserStatusTextBox.Text = ((MHE.DispenserPayStatus)Dispenser.Status).ToString();
            dispenserStatusTextBox.ReadOnly = true;
            dispenserPanel.Controls.Add(dispenserStatusTextBox);
            //
            // DispenserInhibitCheckBox
            //
            System.Windows.Forms.CheckBox dispenserInhibitCheckBox = new CheckBox();
            dispenserInhibitCheckBox.Location = new System.Drawing.Point(628, 8);
            dispenserInhibitCheckBox.Name = "DispenserInhibitCheckBox_" + Index.ToString();
            dispenserInhibitCheckBox.Size = new System.Drawing.Size(16, 24);
            dispenserInhibitCheckBox.TabIndex = 6;
            dispenserInhibitCheckBox.Checked = (Dispenser.Inhibit != 0);
            dispenserPanel.Controls.Add(dispenserInhibitCheckBox);

            dispenserInhibitCheckBox.Click += new EventHandler(dispenserInhibitCheckBox_Click);
            dispenserInhibitCheckBox.Tag = Index;

            dispenserPanel.BringToFront();
        }
开发者ID:wahabahmed,项目名称:CCTalk-PAYLINK-Integration,代码行数:99,代码来源:MainForm.cs


注:本文中的System.Windows.Forms.Panel.BringToFront方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。