Beispiel #1
0
        private void CreateInterface()
        {
            int y_top = 20, delta = 40;

            Generator = new InterfaceGenerator(Table);
            Control[] dataElements = Generator.CreateInterface(y_top, delta, 170, new Size(180, 22));
            Controls.AddRange(dataElements);

            // Подстраиваем положение кнопки и размер формы
            int y = y_top + Generator.GetColumnNames().Count *delta;

            Size = new Size(400, y + delta * 2);
            buttonOK.Location = new Point(153, y + delta * 2 - 80);
        }
        private void CreateInterface()
        {
            if (Owner == null)
            {
                return;
            }

            Table = ((ViewForm)Owner).GetSampleFromTable(UserType, Id.ToString(), "id", true);
            int y_top = 50, y_bottom = 140;
            int delta = (Size.Height - (y_top + y_bottom)) / (Table.Columns.Count - 1);

            Generator = new InterfaceGenerator(Table);
            Control[] dataElements = Generator.CreateInterface(y_top, delta, 140, new Size(230, 22), true);
            personalDataPage.Controls.AddRange(dataElements);
        }