Пример #1
0
        public AddDataForm(string[] fieldsNames)
        {
            InitializeComponent();
            addButton.Indent = AppButton.ControlIndent.Middle;
            addButton.Click += new EventHandler(addButton_Click);
            fields = new List<DisTextBox>();
            for (int i = 0; i < fieldsNames.Length; i++) {
                fields.Add(new DisTextBox()
                {
                    DisText = fieldsNames[i],
                    Font = new System.Drawing.Font("Times New Roman", 12F),
                    Dock = DockStyle.Fill
                });

            }
            all = new FunctionPanel() {
                ColumnCount = 1,
                Dock = DockStyle.Fill
            };

            for (int i = 0; i < fields.Count; i++) {
                all.Controls.Add(fields[i], 0, i);
            }

            this.all.Controls.Add(addButton, 0, all.RowCount - 1);
            this.Controls.Add(all);
            ChangeWindowSizeByTextBox();
            ControlCount = fields.Count;
            this.Show();
        }
Пример #2
0
        /// <summary>
        /// Инициализирует два основных поля интерфейса
        /// </summary>
        private void InitializeMainFunctionPanels()
        {
            fullFunctionPanel = new FunctionPanel() {
            Dock = DockStyle.Fill,
            RowCount = 1,       // badcode
            ColumnCount = 2,     // badcode
              };
              fullFunctionPanel.ColumnStyles.Insert(0, new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, ConstForms.COLUMN_WIDTH));
              fullFunctionPanel.ColumnStyles.Insert(1, new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.AutoSize));
              this.Controls.Add(fullFunctionPanel);

              leftFunctionPanel = new FunctionPanel() {
            Dock = DockStyle.Fill
              };
              leftFunctionPanel.ReverseGradient = true;
              this.fullFunctionPanel.Controls.Add(leftFunctionPanel, 0, 0);   // badcode

              rightFunctionPanel = new FunctionPanel() {
            Dock = DockStyle.Fill,
            AutoScroll = true
              };
              this.fullFunctionPanel.Controls.Add(rightFunctionPanel, 1, 0);  // badcode
        }
Пример #3
0
        /// <summary>
        /// Инициализирует поля для групп функций внутри левого основного поля интерфейса
        /// </summary>
        private void InitializeFunctionPanelsForFunctions()
        {
            functionsGroup = new FunctionPanel[ConstFunctions.FUNCTION_GROUPS_COUNT];
              for (int i = 0; i < functionsGroup.Length; i++) {
            functionsGroup[i] = new FunctionPanel() {
              Dock = DockStyle.Top,
              ReverseGradient = true
            };
              }

              functionsGroup[ConstFunctions.REQUEST_INDEX].ColumnCount = 1;
              functionsGroup[ConstFunctions.REQUEST_INDEX].RowCount = ConstFunctions.REQUEST_FUNCTIONS_COUNT;
              functionsGroup[ConstFunctions.REQUEST_INDEX].Size = new System.Drawing.Size(functionsGroup[ConstFunctions.REQUEST_INDEX].Width, ConstForms.ROW_HEIGHT * ConstFunctions.REQUEST_FUNCTIONS_COUNT);

              leftFunctionPanel.Controls.AddRange(functionsGroup);
        }