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


C# Forms.FlowLayoutPanel类代码示例

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


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

示例1: InitializeComponent

 private void InitializeComponent()
 {
     this.additionalTexturesPanel = new System.Windows.Forms.FlowLayoutPanel();
     this.saveButton = new System.Windows.Forms.Button();
     this.SuspendLayout();
     //
     // additionalTexturesPanel
     //
     this.additionalTexturesPanel.Dock = System.Windows.Forms.DockStyle.Left;
     this.additionalTexturesPanel.Location = new System.Drawing.Point(0, 0);
     this.additionalTexturesPanel.Margin = new System.Windows.Forms.Padding(0);
     this.additionalTexturesPanel.Name = "additionalTexturesPanel";
     this.additionalTexturesPanel.Size = new System.Drawing.Size(72, 48);
     this.additionalTexturesPanel.TabIndex = 1;
     //
     // saveButton
     //
     this.saveButton.Dock = System.Windows.Forms.DockStyle.Fill;
     this.saveButton.Location = new System.Drawing.Point(72, 0);
     this.saveButton.Margin = new System.Windows.Forms.Padding(0);
     this.saveButton.Name = "saveButton";
     this.saveButton.Size = new System.Drawing.Size(56, 48);
     this.saveButton.TabIndex = 2;
     this.saveButton.Text = "Save info.pac";
     this.saveButton.UseVisualStyleBackColor = true;
     this.saveButton.Click += new System.EventHandler(this.saveButton_Click);
     //
     // InfoStockIconViewer
     //
     this.Controls.Add(this.saveButton);
     this.Controls.Add(this.additionalTexturesPanel);
     this.Name = "InfoStockIconViewer";
     this.Size = new System.Drawing.Size(128, 48);
     this.ResumeLayout(false);
 }
开发者ID:liddictm,项目名称:BrawlManagers,代码行数:35,代码来源:InfoStockIconViewer.cs

示例2: CheckForExistingTabPagesBar

        public void CheckForExistingTabPagesBar()
        {
            foreach (IProduct page in Model.ProductList)
            {
                if (!tabControl1.TabPages.ContainsKey(page.Category))
                {
                    tabControl1.TabPages.Add(page.Category, page.Category);

                    foreach (TabPage tp in tabControl1.TabPages)
                    {
                        FlowLayoutPanel flp = new FlowLayoutPanel();
                        flp.Dock = DockStyle.Fill;

                        foreach (IProduct product in Model.ProductList)
                        {
                            if (product.Category.Equals(page.Category))
                            {
                                string buttonText = (product.Name + "\n" + product.Volume);
                                Button b = new Button() { Text = buttonText };
                                b.Font = new Font("Times New Roman", (float)18.0, FontStyle.Bold, GraphicsUnit.Pixel);
                                b.Size = new Size(135, 135);
                                b.BackColor = Color.LemonChiffon;
                                b.UseCompatibleTextRendering = true;
                                b.Tag = product;
                                b.Click += new EventHandler(UpdateBarOrderListWithBarItems);
                                flp.Controls.Add(b);
                            }//end if
                        }
                        tp.Controls.Add(flp);
                    }
                }
            }
        }
开发者ID:joegodfrey86,项目名称:SoftwareEngineeringProject,代码行数:33,代码来源:RestaurantStaffMenu.cs

示例3: RebuildPage

        private void RebuildPage(XDocument result)
        {
            // do something
            webBrowser1.Hide();

            var allPanels = new FlowLayoutPanel();
            allPanels.Dock = DockStyle.Fill;
            allPanels.AutoScroll = true;

            foreach (var node in result.Descendants("LayoutNode"))
            {
                Debug.WriteLine(node);
                if (node.Descendants("LayoutNode").Count() == 0)
                {
                    var segment = new Panel();

                    segment.Width = Int32.Parse(node.Attribute("ObjectRectWidth").Value);
                    segment.Height = Int32.Parse(node.Attribute("ObjectRectHeight").Value);
                    segment.Controls.Add(new WebBrowser() {
                        DocumentText = System.Net.WebUtility.HtmlDecode(node.Attribute("SRC").Value),
                        Dock = DockStyle.Fill
                    });
                    allPanels.Controls.Add(segment);
                }
            }
            Debug.Write("allPanels has " + allPanels.Controls.Count + " children.");

            this.Controls.Add(allPanels);
        }
开发者ID:jonnybest,项目名称:VIPS,代码行数:29,代码来源:Form1.cs

示例4: Registro

      // TextBox TextBox1 = new TextBox();

        public Registro(string fecha)
        {
            //InitializeComponent();
            //this.fecha = fecha;
            //this.AutoSize = true;
            //FlowLayoutPanel panel = new FlowLayoutPanel();
            //panel.AutoSize = true;
            //panel.FlowDirection = FlowDirection.TopDown;
            //panel.Controls.Add(TextBox1);
            //this.Controls.Add(panel);
            //this.KeyPreview = true;
            //this.KeyPress +=
            //new KeyPressEventHandler(Registro_KeyPress);
            //TextBox1.KeyPress +=
            //new KeyPressEventHandler(TextBox1_KeyPress);
            InitializeComponent();
            this.fecha = fecha;
            this.AutoSize = true;
            FlowLayoutPanel panel = new FlowLayoutPanel();
            panel.AutoSize = true;
            panel.FlowDirection = FlowDirection.TopDown;
            this.Controls.Add(panel);
            this.KeyPreview = true;
            this.KeyPress +=
            new KeyPressEventHandler(Registro_KeyPress);

        }
开发者ID:jennifervpacheco,项目名称:apppacheco,代码行数:29,代码来源:Registro.cs

示例5: CreateQuestionView

        public CreateQuestionView(BaseController baseController, int questionlist)
        {
            bc = baseController;
            questionFlowPanel = new FlowLayoutPanel();
            questionCounter = 0;
            panelCounter = 0;
            this.questionlist = questionlist;
            // Panel settings
            questionFlowPanel.BackColor = Color.Transparent;
            questionFlowPanel.Height = Screen.PrimaryScreen.Bounds.Height;
            questionFlowPanel.Width = Screen.PrimaryScreen.Bounds.Width - 225;
            questionFlowPanel.Name = "MakeQuestion_Panel";
            questionFlowPanel.Location = new Point(225, 0);
            questionFlowPanel.AutoScroll = true;
            questionFlowPanel.Controls.Clear();
            questionFlowPanel.WrapContents = false;
            questionFlowPanel.FlowDirection = FlowDirection.TopDown;

            makeEmptyPanel(100);
            makeAddQuestionAndSave();
            foreach (Control c in questionFlowPanel.Controls)
            {
                if (c.Name == "")
                {
                    c.Controls.Clear();
                       questionFlowPanel.Controls.Remove(c);
                }
            }
        }
开发者ID:kevinassen1992,项目名称:KBS2,代码行数:29,代码来源:CreateQuestionView.cs

示例6: ZivotyMgr

        public ZivotyMgr(Postava pos, Label mzL, NumericUpDown zrN, FlowLayoutPanel bars, Panel labels, LinkLabel postihZLink, Label postihZL)
        {
            postava = pos;
            zivotyPanel = bars;
            mezZraneniL = mzL;
            zivotyLabels = labels;
            zraneniN = zrN;
            postihLink = postihZLink;
            postihL = postihZL;

            int mez = postava.getVlastnostO("Mez zranění");
            boxes = new List<CheckBox>();
            for (int i = 0; i < mez * 3; i++)
            {
                CheckBox box = new CheckBox();
                //box.ThreeState = true;
                box.Checked = false;
                box.Margin = new Padding(0);
                box.Parent = zivotyPanel;
                box.Width = box.Height = 15;
                box.Click += new EventHandler(changeCheck);
                box.Tag = i+1;
                boxes.Add(box);
            }
        }
开发者ID:redhead,项目名称:CGenPlus,代码行数:25,代码来源:ZivotyMgr.cs

示例7: driveBrowser

 public driveBrowser(Form2 frm)
 {
     InitializeComponent();
     panel = (FlowLayoutPanel)frm.Controls.Find("panel1", true)[0];
     foreach (Control ctrl in panel.Controls)
     {
         panel1.Controls.Add(ctrl); 
        
     }
     if (DriveInformation.sdrv != "")
     {
         usbDevice device = (usbDevice)panel1.Controls.Find(DriveInformation.sdrv+":\\", true)[0];
         device.BorderStyle = BorderStyle.FixedSingle;
         label2.Text = DriveInformation.sdrv;
         checkDirectory(DriveInformation.sdrv + DriveInformation.sdrv_folder.Substring(1, DriveInformation.sdrv_folder.Length - 1));
     }
     textBox1.Text = DriveInformation.sdrv_folder.Substring(3,DriveInformation.sdrv_folder.Length-3);
     this.FormClosing += (s, a) => {
         foreach (Control ctrl in panel1.Controls)
         {
             panel.Controls.Add(ctrl);
         }
     };
     
 }
开发者ID:iogbonna,项目名称:smartsync,代码行数:25,代码来源:driveBrowser.cs

示例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(MessageForm));
     this.image_box = new System.Windows.Forms.PictureBox();
     this.message = new System.Windows.Forms.RichTextBox();
     this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
     ((System.ComponentModel.ISupportInitialize)(this.image_box)).BeginInit();
     this.SuspendLayout();
     //
     // image_box
     //
     this.image_box.InitialImage = ((System.Drawing.Image)(resources.GetObject("image_box.InitialImage")));
     this.image_box.Location = new System.Drawing.Point(12, 6);
     this.image_box.Name = "image_box";
     this.image_box.Size = new System.Drawing.Size(27, 25);
     this.image_box.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
     this.image_box.TabIndex = 4;
     this.image_box.TabStop = false;
     //
     // message
     //
     this.message.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     | System.Windows.Forms.AnchorStyles.Left)
     | System.Windows.Forms.AnchorStyles.Right)));
     this.message.BorderStyle = System.Windows.Forms.BorderStyle.None;
     this.message.Location = new System.Drawing.Point(54, 12);
     this.message.Name = "message";
     this.message.ReadOnly = true;
     this.message.Size = new System.Drawing.Size(325, 64);
     this.message.TabIndex = 6;
     this.message.Text = "message";
     this.message.ContentsResized += new System.Windows.Forms.ContentsResizedEventHandler(this.Message_ContentsResized);
     //
     // flowLayoutPanel1
     //
     this.flowLayoutPanel1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
     this.flowLayoutPanel1.AutoSize = true;
     this.flowLayoutPanel1.FlowDirection = System.Windows.Forms.FlowDirection.RightToLeft;
     this.flowLayoutPanel1.Location = new System.Drawing.Point(299, 82);
     this.flowLayoutPanel1.Name = "flowLayoutPanel1";
     this.flowLayoutPanel1.Size = new System.Drawing.Size(80, 30);
     this.flowLayoutPanel1.TabIndex = 7;
     //
     // MessageForm
     //
     this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
     this.ClientSize = new System.Drawing.Size(391, 120);
     this.Controls.Add(this.flowLayoutPanel1);
     this.Controls.Add(this.message);
     this.Controls.Add(this.image_box);
     this.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.MaximizeBox = false;
     this.MinimizeBox = false;
     this.Name = "MessageForm";
     this.ShowInTaskbar = false;
     this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
     ((System.ComponentModel.ISupportInitialize)(this.image_box)).EndInit();
     this.ResumeLayout(false);
     this.PerformLayout();
 }
开发者ID:sergeystoyan,项目名称:FhrCliverHost,代码行数:64,代码来源:MessageForm.designer.cs

示例9: PanelGraphView

        public PanelGraphView()
            : base()
        {
            createCharts();

            flowlayout = new FlowLayoutPanel();

            flowlayout.Dock = DockStyle.Fill;
            flowlayout.BackColor = System.Drawing.Color.DarkGray;
            flowlayout.Location = new System.Drawing.Point(0, 0);
            flowlayout.Name = "flowlayout";
            flowlayout.Padding = new Padding(15);
            flowlayout.AutoScroll = true;
            foreach (ChartPanel chart in charts)
            {
                flowlayout.Controls.Add(chart);
            }

            List<Meting> metingen = new List<Meting>();
            metingen.Add(new Meting(0, 0, 0, 0, 0, 0, 0, 0, 0));

            updateAllCharts(metingen);
            //
            // panelGraphView
            //
            this.Dock = System.Windows.Forms.DockStyle.Fill;
            this.Controls.Add(flowlayout);

            this.Location = new System.Drawing.Point(0, 0);
            this.Name = "panelGraphView";
            this.Size = new System.Drawing.Size(400, 600);
            this.TabIndex = 1;
        }
开发者ID:kennyboy55,项目名称:ErgometerIPR,代码行数:33,代码来源:PanelGraphView.cs

示例10: UnavaMgr

        public UnavaMgr(Postava pos, Label muL, NumericUpDown unN, FlowLayoutPanel bars, Panel labels, LinkLabel postihULink, Label postihUL)
        {
            postava = pos;
            unavaPanel = bars;
            mezUnavyL = muL;
            unavaLabels = labels;
            unavaN = unN;
            postihLink = postihULink;
            postihL = postihUL;

            int mez = postava.getVlastnostO("Mez únavy");
            boxes = new List<CheckBox>();
            for (int i = 0; i < mez * 3; i++)
            {
                CheckBox box = new CheckBox();
                //box.ThreeState = true;
                box.Checked = false;
                box.Margin = new Padding(0);
                box.Parent = unavaPanel;
                box.Width = box.Height = 15;
                box.Click += new EventHandler(changeCheck);
                box.Tag = i+1;
                boxes.Add(box);
            }
        }
开发者ID:redhead,项目名称:CGenPlus,代码行数:25,代码来源:UnavaMgr.cs

示例11: JetBoxOptionsPage

        public JetBoxOptionsPage(Lifetime lifetime, IUIApplication environment, ClientFactory clientFactory, JetBoxSettingsStorage jetBoxSettings, JetPopupMenus jetPopupMenus)
            : base(lifetime, environment, PID)
        {
            mySettingsStore = jetBoxSettings.SettingsStore.BindToContextLive(lifetime, ContextRange.ApplicationWide);
              myLifetimes = new SequentialLifetimes(lifetime);

              myClient = clientFactory.CreateClient();
              myClient.UserLogin = mySettingsStore.GetValue(JetBoxSettingsAccessor.Login);

              // init UI
              myLoggedPanel = new FlowLayoutPanel { Visible = false, AutoSize = true };
              myLoggedPanel.Controls.Add(myLoginLabel = new RichTextLabel(environment));
              myLoggedPanel.Controls.Add(new LinkLabel("Logout", Logout, jetPopupMenus));

              myNonLoggedPanel = new FlowLayoutPanel { Visible = false, AutoSize = true, FlowDirection = FlowDirection.TopDown };
              myNonLoggedPanel.Controls.Add(new LinkLabel("Login", Login, jetPopupMenus)
              {
            Image = Environment.Theming.Icons[UnnamedThemedIcons.Dropbox.Id].CurrentGdipBitmapScreenDpi,
            ImageAlign = ContentAlignment.MiddleLeft,
            Padding = new Padding(20, 0, 0, 0)
              });

              Controls.Add(myLoggedPanel);
              Controls.Add(myNonLoggedPanel);

              InitLoginState();
        }
开发者ID:derigel23,项目名称:JetBox,代码行数:27,代码来源:JetBoxOptionsPage.cs

示例12: buttonBindSessionTokenToFacebookToken_Click

        private void buttonBindSessionTokenToFacebookToken_Click(object sender, EventArgs e)
        {
            Form f = new Form();
            FlowLayoutPanel flp = new FlowLayoutPanel();
            f.Controls.Add(flp);

            Label lblSessionToken = new Label();
            lblSessionToken.Text = "Session Token:";
            flp.Controls.Add(lblSessionToken);

            TextBox txtBoxSessionToken = new TextBox();
            flp.Controls.Add(txtBoxSessionToken);

            Label lblFacebookToken = new Label();
            lblFacebookToken.Text = "Facebook Token:";
            flp.Controls.Add(lblFacebookToken);

            TextBox txtBoxFacebookSessionToken = new TextBox();
            flp.Controls.Add(txtBoxFacebookSessionToken);

            Button btnBind = new Button();
            btnBind.Text = "Bind";
            btnBind.Click += new EventHandler((x,y)=>{
                    ITokensEngine tokensEngine = TokenEngineAccessor.Get();
                    String sessionToken = txtBoxSessionToken.Text;
                    String facebookSessionToken = txtBoxFacebookSessionToken.Text;
                    tokensEngine.BindSessionTokenToFacebookToken(sessionToken, facebookSessionToken);
                    MessageBox.Show(String.Format("Tokens were binded. {0} was binded to {1}", sessionToken, facebookSessionToken));
                });
            flp.Controls.Add(btnBind);

            f.Show();
        }
开发者ID:taztnc,项目名称:TellAStory,代码行数:33,代码来源:TokensEngineTest.cs

示例13: CreatePingForm

        private static Form CreatePingForm()
        {
            var form = new Form() {AutoSize = true, AutoSizeMode = AutoSizeMode.GrowAndShrink, Padding = new Padding(10), Text = "Ping Command"};

            FlowLayoutPanel stack;
            form.Controls.Add(stack = new FlowLayoutPanel() {Dock = DockStyle.Fill, AutoSize = true, AutoSizeMode = AutoSizeMode.GrowAndShrink, FlowDirection = FlowDirection.TopDown});

            stack.Controls.Add(new Label() {AutoSize = true, Dock = DockStyle.Top, Text = "Running the ping command.", Padding = new Padding(5)});
            Label labelWaitOrResult;
            stack.Controls.Add(labelWaitOrResult = new Label() {AutoSize = true, Dock = DockStyle.Top, Text = "Please wait…", BackColor = Color.Yellow, Padding = new Padding(5)});

            ConEmuControl conemu;
            var sbText = new StringBuilder();
            stack.Controls.Add(conemu = new ConEmuControl() {AutoStartInfo = null, MinimumSize = new Size(800, 600), Dock = DockStyle.Top});
            ConEmuSession session = conemu.Start(new ConEmuStartInfo() {AnsiStreamChunkReceivedEventSink = (sender, args) => sbText.Append(args.GetMbcsText()), ConsoleProcessCommandLine = "ping 8.8.8.8"});
            session.ConsoleProcessExited += delegate
            {
                Match match = Regex.Match(sbText.ToString(), @"\(.*\b(?<pc>\d+)%.*?\)", RegexOptions.Multiline);
                if(!match.Success)
                {
                    labelWaitOrResult.Text = "Ping execution completed, failed to parse the result.";
                    labelWaitOrResult.BackColor = Color.PaleVioletRed;
                }
                else
                {
                    labelWaitOrResult.Text = $"Ping execution completed, lost {match.Groups["pc"].Value} per cent of packets.";
                    labelWaitOrResult.BackColor = Color.Lime;
                }
            };
            session.ConsoleEmulatorClosed += delegate { form.Close(); };

            return form;
        }
开发者ID:Maximus5,项目名称:conemu-inside,代码行数:33,代码来源:Program.cs

示例14: MultiPosShapeView

        public MultiPosShapeView()
        {
            if (IsDesigner)
                this.CellBackColor = System.Drawing.SystemColors.Control;
            else
                this.CellBackColor = DWGUtility.ModelBackgroundColor();
            mSelectedShape = string.Empty;
            mCellSize = new Size(475, 150);
            mSelectionColor = SystemColors.Highlight;

            this.Name = "MultiPosShapeView";
            this.Size = new System.Drawing.Size(900, 450);
            this.SuspendLayout();

            this.layoutPanel = new FlowLayoutPanel();
            this.layoutPanel.Dock = DockStyle.Fill;
            this.layoutPanel.FlowDirection = FlowDirection.LeftToRight;
            this.layoutPanel.AutoScroll = true;
            this.Controls.Add(layoutPanel);

            this.ResumeLayout(false);

            mSelectedShape = string.Empty;

            pieceLengths = new Dictionary<int, List<string>>();

            init = false;
            disposed = false;
        }
开发者ID:oozcitak,项目名称:RebarPos,代码行数:29,代码来源:MultiPosShapeView.cs

示例15: Preview

        public void Preview()
        {
            FlowLayoutPanel mainPanel = new FlowLayoutPanel() { Dock = DockStyle.Fill, FlowDirection = FlowDirection.LeftToRight };
            mainPanel.AutoScroll = true;
            mainPanel.DoubleClick += mainPanel_DoubleClick;
            mainPanel.Click += mainPanel_Click;

            int i = 0;

            foreach (string group in Table.GetUIGroups())
            {
                GroupBox gb = new GroupBox() { Text = group, AutoSize = true};
                mainPanel.Controls.Add(gb);

                FlowLayoutPanel groupPanel = new FlowLayoutPanel() { AutoSize = true, FlowDirection = FlowDirection.TopDown, Left = 16, Top = 22};
                gb.Controls.Add(groupPanel);

                foreach (string column in Table.GetUIGroupColumns(group))
                {
                    Table.Columns[column].GenerateUIMetadata().DisplayOrder = i++;
                    var c = getControl(Table.Columns[column]);
                    if (c != null)
                        groupPanel.Controls.Add(c);
                }
            }

            this.Controls.Clear();
            this.Controls.Add(mainPanel);
        }
开发者ID:fizikci,项目名称:Cinar,代码行数:29,代码来源:TableFormPreview.cs


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