Beispiel #1
0
        private void btnSubForum_Clicked(object sender, EventArgs e)
        {
            PostPanel postPanel = new PostPanel(this._forumName, ((Button)sender).Text, this.Height, this.Width);

            postPanel.StartPosition = FormStartPosition.Manual;
            postPanel.Location      = new Point(this.Location.X + (this.Width - postPanel.Width) / 2, this.Location.Y + (this.Height - postPanel.Height) / 2);
            postPanel.TopLevel      = false;
            this.panel1.Controls.Clear();
            this.panel1.Controls.Add(postPanel);

            ToolStripItem addPost = new ToolStripLabel();

            addPost.BackColor   = System.Drawing.SystemColors.ActiveCaption;
            addPost.ForeColor   = System.Drawing.SystemColors.ActiveCaption;
            addPost.Name        = "btnAddPost";
            addPost.Size        = new System.Drawing.Size(65, 28);
            addPost.Text        = "Add Post";
            addPost.MouseEnter += new System.EventHandler(this.btn_MouseEnter);
            addPost.MouseLeave += new System.EventHandler(this.btn_MouseLeave);

            ToolStripItem Home_AddPost = new System.Windows.Forms.ToolStripSeparator();

            Home_AddPost.Name = "Home_AddPost";

            this.memberMenu.Items.Add(Home_AddPost);
            this.memberMenu.Items.Add(addPost);
            postPanel.Show();
        }
Beispiel #2
0
        private void btnSubForum_Clicked(object sender, EventArgs e)
        {
            PostPanel postPanel = new PostPanel(this._forumName, ((Button)sender).Text, this.Height, this.Width);

            postPanel.StartPosition = FormStartPosition.Manual;
            postPanel.Location      = new Point(this.Location.X + (this.Width - postPanel.Width) / 2, this.Location.Y + (this.Height - postPanel.Height) / 2);
            postPanel.TopLevel      = false;
            this.panel1.Controls.Clear();
            this.panel1.Controls.Add(postPanel);
            postPanel.Show();
        }