Exemplo n.º 1
0
        public void Initialize(FitEnsemble ensemble, object[] fitEleControls)
        {
            // remove all child controls first.
            this.Controls.Clear();

            // foreach element in the ensemble, create a new control, and
            // position the elements

            int currentYPosition = 0;

            for (int i = 0; i < fitEleControls.Length; i++)
            {
                Control fectrl = (Control)fitEleControls[i];
                fectrl.Location = new Point(0, currentYPosition);
                fectrl.Size     = new Size(this.ClientSize.Width, fectrl.Size.Height);
                fectrl.Anchor   = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
                this.Controls.Add(fectrl);

                currentYPosition += fectrl.Size.Height;
                currentYPosition += System.Windows.Forms.SystemInformation.MenuHeight;
            }

            this.AutoScroll        = true;
            this.AutoScrollMinSize = new Size(this.ClientSize.Width, currentYPosition);
        }
Exemplo n.º 2
0
 public FitEnsembleController(FitEnsemble doc)
 {
     _doc = doc;
     Initialize();
 }