This commit is contained in:
ElEgEv 2023-10-23 18:05:29 +04:00
parent 9c2288c766
commit f143475b3a
2 changed files with 0 additions and 155 deletions

View File

@ -35,18 +35,7 @@
buttonAddList = new Button();
buttonClear = new Button();
groupBox = new GroupBox();
groupBox1 = new GroupBox();
myTextBox = new VisualComponentsLib.MyTextBox();
labelCheckTwo = new Label();
buttonCheckTwo = new Button();
myDataGridView = new VisualComponentsLib.MyDataGridView();
buttonCreateColumns = new Button();
buttonClearTable = new Button();
groupBox2 = new GroupBox();
buttonAddObject = new Button();
groupBox.SuspendLayout();
groupBox1.SuspendLayout();
groupBox2.SuspendLayout();
SuspendLayout();
//
// labelCheck
@ -120,112 +109,16 @@
groupBox.TabStop = false;
groupBox.Text = "Первый компонент";
//
// groupBox1
//
groupBox1.Controls.Add(myTextBox);
groupBox1.Controls.Add(labelCheckTwo);
groupBox1.Controls.Add(buttonCheckTwo);
groupBox1.Location = new Point(12, 296);
groupBox1.Name = "groupBox1";
groupBox1.Size = new Size(368, 106);
groupBox1.TabIndex = 8;
groupBox1.TabStop = false;
groupBox1.Text = "Второй компонент";
//
// myTextBox
//
myTextBox.Location = new Point(6, 20);
myTextBox.Name = "myTextBox";
myTextBox.Size = new Size(210, 80);
myTextBox.TabIndex = 5;
myTextBox.TextBoxValue = null;
//
// labelCheckTwo
//
labelCheckTwo.AutoSize = true;
labelCheckTwo.BorderStyle = BorderStyle.FixedSingle;
labelCheckTwo.Location = new Point(279, 30);
labelCheckTwo.Name = "labelCheckTwo";
labelCheckTwo.Size = new Size(62, 17);
labelCheckTwo.TabIndex = 3;
labelCheckTwo.Text = "Значение";
//
// buttonCheckTwo
//
buttonCheckTwo.Location = new Point(266, 66);
buttonCheckTwo.Name = "buttonCheckTwo";
buttonCheckTwo.Size = new Size(75, 23);
buttonCheckTwo.TabIndex = 4;
buttonCheckTwo.Text = "Проверка";
buttonCheckTwo.UseVisualStyleBackColor = true;
buttonCheckTwo.Click += ButtonCheckTwo_Click;
//
// myDataGridView
//
myDataGridView.IndexRow = -1;
myDataGridView.Location = new Point(6, 22);
myDataGridView.Name = "myDataGridView";
myDataGridView.Size = new Size(649, 234);
myDataGridView.TabIndex = 0;
//
// buttonCreateColumns
//
buttonCreateColumns.Location = new Point(76, 278);
buttonCreateColumns.Name = "buttonCreateColumns";
buttonCreateColumns.Size = new Size(75, 23);
buttonCreateColumns.TabIndex = 3;
buttonCreateColumns.Text = "Создать";
buttonCreateColumns.UseVisualStyleBackColor = true;
buttonCreateColumns.Click += ButtonCreateColumns_Click;
//
// buttonClearTable
//
buttonClearTable.Location = new Point(557, 278);
buttonClearTable.Name = "buttonClearTable";
buttonClearTable.Size = new Size(75, 23);
buttonClearTable.TabIndex = 4;
buttonClearTable.Text = "Очистить";
buttonClearTable.UseVisualStyleBackColor = true;
buttonClearTable.Click += ButtonClearTable_Click;
//
// groupBox2
//
groupBox2.Controls.Add(buttonAddObject);
groupBox2.Controls.Add(buttonClearTable);
groupBox2.Controls.Add(buttonCreateColumns);
groupBox2.Controls.Add(myDataGridView);
groupBox2.Location = new Point(386, 18);
groupBox2.Name = "groupBox2";
groupBox2.Size = new Size(661, 313);
groupBox2.TabIndex = 9;
groupBox2.TabStop = false;
groupBox2.Text = "Третий компонент";
//
// buttonAddObject
//
buttonAddObject.Location = new Point(172, 278);
buttonAddObject.Name = "buttonAddObject";
buttonAddObject.Size = new Size(127, 23);
buttonAddObject.TabIndex = 5;
buttonAddObject.Text = "Добавить объект";
buttonAddObject.UseVisualStyleBackColor = true;
buttonAddObject.Click += ButtonAddObject_Click;
//
// FormMain
//
AutoScaleDimensions = new SizeF(7F, 15F);
AutoScaleMode = AutoScaleMode.Font;
ClientSize = new Size(1059, 412);
Controls.Add(groupBox2);
Controls.Add(groupBox1);
Controls.Add(groupBox);
Name = "FormMain";
Text = "Тестовое окно";
groupBox.ResumeLayout(false);
groupBox.PerformLayout();
groupBox1.ResumeLayout(false);
groupBox1.PerformLayout();
groupBox2.ResumeLayout(false);
ResumeLayout(false);
}
@ -237,14 +130,5 @@
private Button buttonAddList;
private Button buttonClear;
private GroupBox groupBox;
private GroupBox groupBox1;
private Label labelCheckTwo;
private Button buttonCheckTwo;
private VisualComponentsLib.MyTextBox myTextBox;
private VisualComponentsLib.MyDataGridView myDataGridView;
private Button buttonCreateColumns;
private Button buttonClearTable;
private GroupBox groupBox2;
private Button buttonAddObject;
}
}

View File

@ -50,44 +50,5 @@ namespace VisualComponentsForm
{
myListBox.ClearAll();
}
//òåñò âòîðîãî êîìïîíåíòà
private void ButtonCheckTwo_Click(object sender, EventArgs e)
{
try
{
labelCheckTwo.Text = myTextBox.TextBoxValue.ToString();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
//òåñò òðåòüåãî êîìïîíåíòà
private void ButtonCreateColumns_Click(object sender, EventArgs e)
{
myDataGridView.AddHeader(info);
}
private void ButtonClearTable_Click(object sender, EventArgs e)
{
myDataGridView.ClearTable();
}
private void ButtonAddObject_Click(object sender, EventArgs e)
{
myDataGridView.AddObject(peoples[numberObject]);
numberObject++;
if (numberObject == 4)
{
numberObject = 0;
}
}
}
}