Ejemplo n.º 1
0
 private void AddParameterGroup(ParameterGroup p, int i, float paramNameWidth, int totalWidth)
 {
     ParameterGroupPanel pgp = new ParameterGroupPanel();
     parameterGroupPanels[i] = pgp;
     pgp.Init(p, paramNameWidth, totalWidth);
     if (p.Name == null){
         tableLayoutPanel.Controls.Add(pgp, 0, i);
     } else{
         Size s = new Size(pgp.Size.Width, pgp.Size.Height + 25);
         Control gb = Collapsible
             ? new CollapsibleGroupBox{
                 Dock = DockStyle.Fill, Text = p.Name, Margin = new Padding(3), Padding = new Padding(3), Size = s, FullSize = s,
                 IsCollapsed = p.CollapsedDefault
             }
             : new GroupBox{Dock = DockStyle.Fill, Text = p.Name, Margin = new Padding(3), Padding = new Padding(3)};
         gb.Controls.Add(pgp);
         tableLayoutPanel.Controls.Add(gb, 0, i);
     }
 }