Ejemplo n.º 1
0
        private void InitializePanelRight()
        {
            this.tableLayoutPanel.ColumnStyles.Add(
                new ColumnStyle()
            {
                SizeType = SizeType.AutoSize
            });

            // tableLayoutPanelRight
            this.tableLayoutPanelRight = new TableLayoutPanel()
            {
                Location  = new Point(0, 0),
                Dock      = DockStyle.Fill,
                BackColor = Style.BackColorMain,
                //BorderStyle = BorderStyle.FixedSingle,
                Margin = new Padding(1)
            };
            this.tableLayoutPanel.Controls.Add(this.tableLayoutPanelRight, 2, 0);

            this.tableLayoutPanelRight.RowStyles.Add(
                new RowStyle
            {
                Height   = this.textBoxSearch.Height + 30,
                SizeType = SizeType.Absolute
            });

            // panelContactInfo
            this.panelContactInfo = new PanelContactInfo("")
            {
                Location = new Point(0, 0),
                Dock     = DockStyle.Fill,

                BackColor = Style.BackColorSecondary,
                Margin    = new Padding(0),
                //BorderStyle = BorderStyle.FixedSingle,
                Visible = false
            };
            this.tableLayoutPanelRight.Controls.Add(this.panelContactInfo, 0, 0);

            this.tableLayoutPanelRight.RowStyles.Add(
                new RowStyle
            {
                SizeType = SizeType.Percent,
                Height   = 50
            });

            this.panelChatBox = new PanelChatBox
            {
                Dock        = DockStyle.Fill,
                BorderStyle = BorderStyle.None,
                Margin      = new Padding(0),
                TabStop     = false,
                Visible     = false,
                AutoScroll  = true
            };

            this.tableLayoutPanelRight.Controls.Add(this.panelChatBox, 0, 1);

            this.tableLayoutPanelRight.RowStyles.Add(
                new RowStyle
            {
                Height   = 55,
                SizeType = SizeType.Absolute
            });

            this.tableLayoutPanelEnter = new TableLayoutPanel
            {
                Dock      = DockStyle.Fill,
                BackColor = Style.BackColorSecondary,
                Margin    = new Padding(0),
                Visible   = false
            };
            this.tableLayoutPanelRight.Controls.Add(this.tableLayoutPanelEnter, 0, 2);

            this.tableLayoutPanelEnter.ColumnStyles.Add(
                new ColumnStyle
            {
                SizeType = SizeType.Percent,
                Width    = 100
            });
            this.tableLayoutPanelEnter.ColumnStyles.Add(
                new ColumnStyle
            {
                Width    = 55,
                SizeType = SizeType.Absolute
            });

            // textBoxEnter
            this.textBoxEnter = new TextBox
            {
                Dock = DockStyle.Fill,

                BackColor   = Style.BackColorSecondary,
                Font        = new Font(Resources.FontName, 13.8F, FontStyle.Regular, GraphicsUnit.Point, 204),
                ForeColor   = Style.ForeColorResidual,
                Multiline   = true,
                BorderStyle = BorderStyle.None,
                Margin      = new Padding(0),
                TabStop     = false,
                ScrollBars  = ScrollBars.Vertical
            };
            this.textBoxEnter.KeyDown += this.TextBoxEnterKeyDownEvent;
            this.tableLayoutPanelEnter.Controls.Add(this.textBoxEnter, 0, 0);

            var panelTemp = new Panel
            {
                Location  = new Point(940, 430),
                Size      = new Size(55, 55),
                BackColor = Style.BackColorSecondary,
                TabStop   = false,
                Margin    = new Padding(0),
                //BorderStyle = BorderStyle.FixedSingle
            };

            this.tableLayoutPanelEnter.Controls.Add(panelTemp, 1, 0);

            this.pictureBoxSend = new PictureBox
            {
                Location = new Point(15, 15),
                Size     = new Size(23, 23),

                BackColor = Style.BackColorSecondary,
                TabStop   = false,
                Image     = Style.GetImage("send", false),
                SizeMode  = PictureBoxSizeMode.Zoom
            };
            this.pictureBoxSend.MouseEnter += PictureBoxesEnterEvent;
            this.pictureBoxSend.MouseLeave += PictureBoxesLeaveEvent;
            this.pictureBoxSend.Click      += this.PictureBoxSendClickEvent;
            panelTemp.Controls.Add(this.pictureBoxSend);
        }
Ejemplo n.º 2
0
        public void InitializePanelRight()
        {
            this.tableLayoutPanel.ColumnStyles.Add(
                new ColumnStyle()
            {
                SizeType = SizeType.AutoSize
            });

            // tableLayoutPanelRight
            this.tableLayoutPanelRight = new TableLayoutPanel()
            {
                Location  = new Point(0, 0),
                Dock      = DockStyle.Fill,
                BackColor = this.colorPanelRight,

                Margin = new Padding(0)
            };
            this.tableLayoutPanel.Controls.Add(this.tableLayoutPanelRight, 2, 0);

            this.tableLayoutPanelRight.RowStyles.Add(
                new RowStyle
            {
                Height   = this.textBoxSearch.Height + 30,
                SizeType = SizeType.Absolute
            });

            // panelContactInfo
            this.panelContactInfo = new PanelContactInfo("")
            {
                Location = new Point(0, 0),
                Dock     = DockStyle.Fill,

                BackColor = this.colorPanelCenter,
                Margin    = new Padding(0),
                Visible   = false
            };
            this.tableLayoutPanelRight.Controls.Add(this.panelContactInfo, 0, 0);

            this.tableLayoutPanelRight.RowStyles.Add(
                new RowStyle
            {
                SizeType = SizeType.Percent,
                Height   = 50
            });

            Panel panelTextBoxChat = new Panel
            {
                Dock = DockStyle.Fill,
                //BackgroundImage = Properties.Resources.ImageChatBox_1,
                //BackgroundImageLayout = ImageLayout.Stretch
            };

            this.tableLayoutPanelRight.Controls.Add(panelTextBoxChat, 0, 1);

            // textBoxChat
            this.textBoxChat = new TextBox
            {
                Dock = DockStyle.Fill,

                BackColor     = this.colorPanelLeft,
                Font          = new Font(Resources.FontName, 12.8F, FontStyle.Regular, GraphicsUnit.Point, 204),
                ForeColor     = Color.White,
                Multiline     = true,
                BorderStyle   = BorderStyle.None,
                ReadOnly      = true,
                ScrollBars    = ScrollBars.Vertical,
                AcceptsReturn = true,
                Margin        = new Padding(0),
                TabStop       = false
            };
            panelTextBoxChat.Controls.Add(this.textBoxChat);

            this.tableLayoutPanelRight.RowStyles.Add(
                new RowStyle
            {
                Height   = 60,
                SizeType = SizeType.Absolute
            });

            this.tableLayoutPanelEnter = new TableLayoutPanel
            {
                Dock      = DockStyle.Fill,
                BackColor = this.colorPanelCenter,
                Margin    = new Padding(0),
                Visible   = false
            };
            this.tableLayoutPanelRight.Controls.Add(this.tableLayoutPanelEnter, 0, 2);


            this.tableLayoutPanelEnter.ColumnStyles.Add(
                new ColumnStyle
            {
                SizeType = SizeType.Percent,
                Width    = 100
            });
            this.tableLayoutPanelEnter.ColumnStyles.Add(
                new ColumnStyle
            {
                Width    = 60,
                SizeType = SizeType.Absolute
            });

            // textBoxEnter
            this.textBoxEnter = new TextBox
            {
                Dock = DockStyle.Fill,

                BackColor   = this.colorPanelCenter,
                Font        = new Font(Resources.FontName, 13.8F, FontStyle.Regular, GraphicsUnit.Point, 204),
                ForeColor   = Color.White,
                Multiline   = true,
                BorderStyle = BorderStyle.None,
                Margin      = new Padding(0),
                TabStop     = false
            };
            this.textBoxEnter.KeyDown += new KeyEventHandler(this.TextBoxEnterKeyDownEvent);
            this.tableLayoutPanelEnter.Controls.Add(this.textBoxEnter, 0, 0);

            // buttonSend
            this.buttonSend = new Button
            {
                Location = new Point(930, 420),
                Size     = new Size(55, 55),
                Anchor   = AnchorStyles.Right,

                BackColor = this.colorPanelCenter,
                Font      = new Font(Resources.FontName, 22.2F, FontStyle.Regular, GraphicsUnit.Point, 204),
                ForeColor = Color.White,
                FlatStyle = FlatStyle.Flat,
                TabStop   = false,
                Text      = ">",
                Margin    = new Padding(0),
                UseVisualStyleBackColor = false
            };
            this.buttonSend.FlatAppearance.BorderSize = 0;
            this.buttonSend.Click += new EventHandler(this.ButtonSendClickEvent);
            this.tableLayoutPanelEnter.Controls.Add(this.buttonSend, 1, 0);
        }