Пример #1
0
        /// <summary>
        /// Crée les textbox dynamiquement sur la form
        /// </summary>
        private void InitialiserTextBox()
        {
            variableSimplex = new TextBox[nombreValeur + 1, nombreEquation + 1];
            int x = 10;
            int y = 10;

            for (int j = variableSimplex.GetLowerBound(1); j <= variableSimplex.GetUpperBound(1); j++)
            {
                for (int i = variableSimplex.GetLowerBound(0); i <= variableSimplex.GetUpperBound(0); i++)
                {
                    variableSimplex[i, j] = new TextBox();
                    variableSimplex[i, j].Location = new Point(x, y);
                    variableSimplex[i, j].Size = new Size(46, 20);
                    this.Controls.Add(variableSimplex[i, j]);
                    x += 60;
                }
                x = 10;
                y += 30;
            }
            buttonCalculer.Location = new Point(x, y);

            if (this.Size.Height <= y || this.Size.Width <= x)
            {
                this.Size = new Size(1000,1000);
            }
        }