示例#1
0
        public Panel CreateMainPanel(Form formpanel, int PanelLeft, int PanelTop, int PanelWidth, int PanelHeight, BorderStyle borderstyle, Color colors)
        {
            GradientPanel Panel = new GradientPanel();

            Panel.Size        = new Size(PanelWidth, PanelHeight);
            Panel.Location    = new Point(PanelLeft, PanelTop);
            Panel.BorderStyle = borderstyle;
            Panel.BackColor   = colors;
            formpanel.Controls.Add(Panel);
            return(Panel);
        }
示例#2
0
        public Panel CreateSubPanel(Panel parentPanel, int PanelLeft, int PanelTop, int PanelWidth, int PanelHeight, BorderStyle borderstyle, Color color, Color colorTop = default(Color), Color colorBottom = default(Color))
        {
            GradientPanel Panel = new GradientPanel();

            Panel.Size        = new Size(PanelWidth, PanelHeight);
            Panel.Location    = new Point(PanelLeft, PanelTop);
            Panel.BorderStyle = borderstyle;
            Panel.BackColor   = color;

            Panel.ColorTop    = colorTop;
            Panel.ColorBottom = colorBottom;
            parentPanel.Controls.Add(Panel);
            return(Panel);
        }