Структура иерархии классов "Экран курсового проектирования"

Разработка структуры класса "Экран курсового проектирования", которая будет основой для хранения информации о студентах, выполняющих курсовые работы. Реализация визуального приложения для тестирования иерархии классов на языке программирования С++.

Рубрика Программирование, компьютеры и кибернетика
Вид курсовая работа
Язык русский
Дата добавления 18.03.2011
Размер файла 3,3 M

Отправить свою хорошую работу в базу знаний просто. Используйте форму, расположенную ниже

Студенты, аспиранты, молодые ученые, использующие базу знаний в своей учебе и работе, будут вам очень благодарны.

//

// menuStrip1

//

this->menuStrip1->Items->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^ >(2) {this->fileToolStripMenuItem,

this->helpToolStripMenuItem});

this->menuStrip1->Location = System::Drawing::Point(0, 0);

this->menuStrip1->Name = L"menuStrip1";

this->menuStrip1->Size = System::Drawing::Size(944, 24);

this->menuStrip1->TabIndex = 8;

this->menuStrip1->Text = L"menuStrip1";

//

// fileToolStripMenuItem

//

this->fileToolStripMenuItem->DropDownItems->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^ >(1) {this->exitToolStripMenuItem});

this->fileToolStripMenuItem->Name = L"fileToolStripMenuItem";

this->fileToolStripMenuItem->Size = System::Drawing::Size(37, 20);

this->fileToolStripMenuItem->Text = L"File";

//

// exitToolStripMenuItem

//

this->exitToolStripMenuItem->Name = L"exitToolStripMenuItem";

this->exitToolStripMenuItem->Size = System::Drawing::Size(92, 22);

this->exitToolStripMenuItem->Text = L"Exit";

this->exitToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::button5_Click);

//

// helpToolStripMenuItem

//

this->helpToolStripMenuItem->DropDownItems->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^ >(2) {this->aboutToolStripMenuItem,

this->aboutToolStripMenuItem1});

this->helpToolStripMenuItem->Name = L"helpToolStripMenuItem";

this->helpToolStripMenuItem->Size = System::Drawing::Size(44, 20);

this->helpToolStripMenuItem->Text = L"Help";

//

// aboutToolStripMenuItem

//

this->aboutToolStripMenuItem->Name = L"aboutToolStripMenuItem";

this->aboutToolStripMenuItem->Size = System::Drawing::Size(152, 22);

this->aboutToolStripMenuItem->Text = L"Help file";

this->aboutToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::aboutToolStripMenuItem_Click);

//

// aboutToolStripMenuItem1

//

this->aboutToolStripMenuItem1->Name = L"aboutToolStripMenuItem1";

this->aboutToolStripMenuItem1->Size = System::Drawing::Size(152, 22);

this->aboutToolStripMenuItem1->Text = L"About";

this->aboutToolStripMenuItem1->Click += gcnew System::EventHandler(this, &Form1::aboutToolStripMenuItem1_Click);

//

// button4

//

this->button4->Anchor = static_cast<System::Windows::Forms::AnchorStyles>((System::Windows::Forms::AnchorStyles::Bottom | System::Windows::Forms::AnchorStyles::Left));

this->button4->Location = System::Drawing::Point(12, 727);

this->button4->Name = L"button4";

this->button4->Size = System::Drawing::Size(106, 23);

this->button4->TabIndex = 9;

this->button4->Text = L"Добавитьзапись";

this->button4->UseVisualStyleBackColor = true;

this->button4->Click += gcnew System::EventHandler(this, &Form1::button4_Click);

//

// button5

//

this->button5->Anchor = static_cast<System::Windows::Forms::AnchorStyles>((System::Windows::Forms::AnchorStyles::Bottom | System::Windows::Forms::AnchorStyles::Right));

this->button5->Location = System::Drawing::Point(860, 706);

this->button5->Name = L"button5";

this->button5->Size = System::Drawing::Size(72, 44);

this->button5->TabIndex = 10;

this->button5->Text = L"Выход";

this->button5->UseVisualStyleBackColor = true;

this->button5->Click += gcnew System::EventHandler(this, &Form1::button5_Click);

//

// button6

//

this->button6->Anchor = static_cast<System::Windows::Forms::AnchorStyles>((System::Windows::Forms::AnchorStyles::Bottom | System::Windows::Forms::AnchorStyles::Right));

this->button6->Enabled = false;

this->button6->Location = System::Drawing::Point(806, 664);

this->button6->Name = L"button6";

this->button6->Size = System::Drawing::Size(126, 23);

this->button6->TabIndex = 12;

this->button6->Text = L"Удалитьзапись";

this->button6->UseVisualStyleBackColor = true;

this->button6->Click += gcnew System::EventHandler(this, &Form1::button6_Click);

//

// button7

//

this->button7->Anchor = static_cast<System::Windows::Forms::AnchorStyles>((System::Windows::Forms::AnchorStyles::Bottom | System::Windows::Forms::AnchorStyles::Right));

this->button7->Location = System::Drawing::Point(806, 606);

this->button7->Name = L"button7";

this->button7->Size = System::Drawing::Size(126, 23);

this->button7->TabIndex = 13;

this->button7->Text = L"Изменитьназавние";

this->button7->UseVisualStyleBackColor = true;

this->button7->Click += gcnew System::EventHandler(this, &Form1::button7_Click);

//

// button1

//

this->button1->Anchor = static_cast<System::Windows::Forms::AnchorStyles>((System::Windows::Forms::AnchorStyles::Bottom | System::Windows::Forms::AnchorStyles::Left));

this->button1->Enabled = false;

this->button1->Location = System::Drawing::Point(137, 727);

this->button1->Name = L"button1";

this->button1->Size = System::Drawing::Size(75, 23);

this->button1->TabIndex = 19;

this->button1->Text = L"Поиск";

this->button1->UseVisualStyleBackColor = true;

this->button1->Click += gcnew System::EventHandler(this, &Form1::button1_Click);

//

// button2

//

this->button2->Anchor = static_cast<System::Windows::Forms::AnchorStyles>((System::Windows::Forms::AnchorStyles::Bottom | System::Windows::Forms::AnchorStyles::Right));

this->button2->Enabled = false;

this->button2->Location = System::Drawing::Point(806, 635);

this->button2->Name = L"button2";

this->button2->Size = System::Drawing::Size(126, 23);

this->button2->TabIndex = 20;

this->button2->Text = L"Редактировать";

this->button2->UseVisualStyleBackColor = true;

this->button2->Click += gcnew System::EventHandler(this, &Form1::button2_Click);

//

// listBox1

//

this->listBox1->Anchor = static_cast<System::Windows::Forms::AnchorStyles>(((System::Windows::Forms::AnchorStyles::Top | System::Windows::Forms::AnchorStyles::Left)

| System::Windows::Forms::AnchorStyles::Right));

this->listBox1->Font = (gcnew System::Drawing::Font(L"Times New Roman", 14.25F, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,

static_cast<System::Byte>(0)));

this->listBox1->FormattingEnabled = true;

this->listBox1->ItemHeight = 21;

this->listBox1->Location = System::Drawing::Point(12, 27);

this->listBox1->Name = L"listBox1";

this->listBox1->Size = System::Drawing::Size(920, 25);

this->listBox1->TabIndex = 21;

this->listBox1->Tag = L"";

//

// listBox2

//

this->listBox2->Anchor = static_cast<System::Windows::Forms::AnchorStyles>(((System::Windows::Forms::AnchorStyles::Bottom | System::Windows::Forms::AnchorStyles::Left)

| System::Windows::Forms::AnchorStyles::Right));

this->listBox2->Font = (gcnew System::Drawing::Font(L"Times New Roman", 14.25F, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,

static_cast<System::Byte>(204)));

this->listBox2->FormattingEnabled = true;

this->listBox2->HorizontalScrollbar = true;

this->listBox2->ItemHeight = 21;

this->listBox2->Location = System::Drawing::Point(12, 606);

this->listBox2->Name = L"listBox2";

this->listBox2->ScrollAlwaysVisible = true;

this->listBox2->Size = System::Drawing::Size(788, 109);

this->listBox2->TabIndex = 22;

//

// checkBox1

//

this->checkBox1->Anchor = static_cast<System::Windows::Forms::AnchorStyles>((System::Windows::Forms::AnchorStyles::Bottom | System::Windows::Forms::AnchorStyles::Left));

this->checkBox1->AutoSize = true;

this->checkBox1->Enabled = false;

this->checkBox1->Location = System::Drawing::Point(256, 727);

this->checkBox1->Name = L"checkBox1";

this->checkBox1->Size = System::Drawing::Size(214, 17);

this->checkBox1->TabIndex = 23;

this->checkBox1->Text = L"Разрешитьредактированиетаблицы";

this->checkBox1->UseVisualStyleBackColor = true;

this->checkBox1->CheckedChanged += gcnew System::EventHandler(this, &Form1::checkBox1_CheckedChanged);

//

// Form1

//

this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);

this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;

this->BackColor = System::Drawing::Color::White;

this->ClientSize = System::Drawing::Size(944, 762);

this->Controls->Add(this->checkBox1);

this->Controls->Add(this->listBox2);

this->Controls->Add(this->listBox1);

this->Controls->Add(this->button2);

this->Controls->Add(this->button1);

this->Controls->Add(this->button7);

this->Controls->Add(this->button6);

this->Controls->Add(this->button5);

this->Controls->Add(this->button4);

this->Controls->Add(this->dataGridView1);

this->Controls->Add(this->menuStrip1);

this->Location = System::Drawing::Point(388, 613);

this->MainMenuStrip = this->menuStrip1;

this->MinimumSize = System::Drawing::Size(960, 800);

this->Name = L"Form1";

this->Text = L"Form1";

this->Load += gcnew System::EventHandler(this, &Form1::Form1_Load);

this->Shown += gcnew System::EventHandler(this, &Form1::button7_Click);

(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->dataGridView1))->EndInit();

this->menuStrip1->ResumeLayout(false);

this->menuStrip1->PerformLayout();

this->ResumeLayout(false);

this->PerformLayout();

}

#pragma endregion

private: System::Void Form1_Load(System::Object^ sender, System::EventArgs^ e) {

}

private: System::Void button4_Click(System::Object^ sender, System::EventArgs^ e) {

System::Windows::Forms::DialogResult dialres;

Form2 ^newdlg=gcnew Form2();

dialres=newdlg->ShowDialog();

if(dialres==System::Windows::Forms::DialogResult::OK){

Student->SetName(newdlg->textBox1->Text);

Student->SetControl(System::Convert::ToInt16(newdlg->textBox4->Text),0);

Student->SetControl(System::Convert::ToInt16(newdlg->textBox7->Text),1);

Student->SetControl(System::Convert::ToInt16(newdlg->textBox10->Text),2);

Student->SetControlScore(System::Convert::ToInt16(newdlg->textBox17->Text));

Student->SetFact(System::Convert::ToInt16(newdlg->textBox3->Text),0);

Student->SetFact(System::Convert::ToInt16(newdlg->textBox6->Text),1);

Student->SetFact(System::Convert::ToInt16(newdlg->textBox9->Text),2);

Student->SetPlan(System::Convert::ToInt16(newdlg->textBox2->Text),0);

Student->SetPlan(System::Convert::ToInt16(newdlg->textBox5->Text),1);

Student->SetPlan(System::Convert::ToInt16(newdlg->textBox8->Text),2);

Student->SetTest(newdlg->textBox11->Text);

Student->SetTestF(newdlg->textBox12->Text);

Student->SetRevision(newdlg->textBox13->Text);

Student->SetRevisionF(newdlg->textBox14->Text);

Student->SetProtection(newdlg->textBox15->Text);

Student->SetProtectionF(newdlg->textBox16->Text);

dataGridView1->Rows->Add(Student->TName,Student->Plan[0],Student->Fact[0],Student->Control[0],

Student->Plan[1],Student->Fact[1],Student->Control[1],Student->Plan[2],Student->Fact[2],

Student->Control[2],Student->Test,Student->TestF,Student->Revision,Student->RevisionF,

Student->Protection,Student->ProtectionF,Student->ControlScore);

CountDataGrid++;

button1->Enabled=true;

checkBox1->Enabled=true;

MessageBox::Show("Записьдобавлена!","Information",MessageBoxButtons::OK,MessageBoxIcon::Information);

return;

}

}

private: System::Void button5_Click(System::Object^ sender, System::EventArgs^ e) {

this->Close();

}

private: System::Void button6_Click(System::Object^ sender, System::EventArgs^ e) {

System::Windows::Forms::DialogResult dialres;

dialres=MessageBox::Show("Выточнохотитеудалитьзапись?","Удалить?",MessageBoxButtons::OKCancel,MessageBoxIcon::Warning);

if(dialres==System::Windows::Forms::DialogResult::OK){

if(this->dataGridView1->SelectedRows->Count > 0 &&

this->dataGridView1->SelectedRows[0]->Index !=

this->dataGridView1->Rows->Count){

this->dataGridView1->Rows->RemoveAt(this->dataGridView1->SelectedRows[0]->Index);

CountDataGrid--;

if(CountDataGrid==0){

button1->Enabled=false;

button2->Enabled=false;

button6->Enabled=false;

checkBox1->Enabled=false;

}

MessageBox::Show("Записьудалена!","Information",MessageBoxButtons::OK,MessageBoxIcon::Information);

}

else{

MessageBox::Show("Невыделенаудаляемаястрока!","Ошибка",MessageBoxButtons::OK,MessageBoxIcon::Error);

}

}

}

private: System::Void button7_Click(System::Object^ sender, System::EventArgs^ e) {

System::Windows::Forms::DialogResult dialres;

Start ^newdlg=gcnew Start();

dialres=newdlg->ShowDialog();

if(dialres==System::Windows::Forms::DialogResult::OK){

this->Text=newdlg->textBox1->Text;

Screen.SetName(newdlg->textBox1->Text);

Screen.SetComposition(newdlg->textBox2->Text);

Screen.SetDate(newdlg->textBox3->Text);

listBox1->Items->Add(Screen.TName);

listBox2->Items->Add("Состав приемной комиссии: ");

listBox2->Items->Add(Screen.Composition);

listBox2->Items->Add("Дата утверждения: ");

listBox2->Items->Add(Screen.Date);

}

}

private: System::Void aboutToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e) {

System::Diagnostics::Process::Start("Help.chm");

}

private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) {

System::Windows::Forms::DialogResult dialres;

Search ^newdlg=gcnew Search();

dialres=newdlg->ShowDialog();

if(dialres==System::Windows::Forms::DialogResult::OK){

System::String ^srh;

srh=newdlg->textBox1->Text;

if(CountDataGrid!=0){

for(int i=0; i<CountDataGrid; i++){

for(int j=0; j<dataGridView1->ColumnCount; j++){

if(System::Convert::ToString(dataGridView1->Rows[i]->Cells[j]->Value)==srh){

dataGridView1->CurrentCell=dataGridView1->Rows[i]->Cells[j];

System::Windows::Forms::DialogResult dl;

dl=MessageBox::Show("Искатьдалее?","Continue?",MessageBoxButtons::OKCancel,MessageBoxIcon::Question);

if(dl==System::Windows::Forms::DialogResult::Cancel){

break;

4 }

}

}

}

MessageBox::Show("Поискзавершен!","Information",MessageBoxButtons::OK,MessageBoxIcon::Information);

}

}

}

private: System::Void button2_Click(System::Object^ sender, System::EventArgs^ e) {

System::Windows::Forms::DialogResult dl;

dl=MessageBox::Show("Редактироватьзапись?","Изменить?",MessageBoxButtons::OKCancel,MessageBoxIcon::Question);

if(dl==System::Windows::Forms::DialogResult::OK){

if(this->dataGridView1->SelectedRows->Count > 0 &&

this->dataGridView1->SelectedRows[0]->Index !=

this->dataGridView1->Rows->Count){

System::Windows::Forms::DialogResult dialres;

Form2 ^newdlg=gcnew Form2();

newdlg->textBox1->Text=System::Convert::ToString(this->dataGridView1->SelectedRows[0]->Cells[0]->Value);

newdlg->textBox2->Text=System::Convert::ToString(this->dataGridView1->SelectedRows[0]->Cells[1]->Value);

newdlg->textBox3->Text=System::Convert::ToString(this->dataGridView1->SelectedRows[0]->Cells[2]->Value);

newdlg->textBox4->Text=System::Convert::ToString(this->dataGridView1->SelectedRows[0]->Cells[3]->Value);

newdlg->textBox5->Text=System::Convert::ToString(this->dataGridView1->SelectedRows[0]->Cells[4]->Value);

newdlg->textBox6->Text=System::Convert::ToString(this->dataGridView1->SelectedRows[0]->Cells[5]->Value);

newdlg->textBox7->Text=System::Convert::ToString(this->dataGridView1->SelectedRows[0]->Cells[6]->Value);

newdlg->textBox8->Text=System::Convert::ToString(this->dataGridView1->SelectedRows[0]->Cells[7]->Value);

newdlg->textBox9->Text=System::Convert::ToString(this->dataGridView1->SelectedRows[0]->Cells[8]->Value);

newdlg->textBox10->Text=System::Convert::ToString(this->dataGridView1->SelectedRows[0]->Cells[9]->Value);

newdlg->textBox11->Text=System::Convert::ToString(this->dataGridView1->SelectedRows[0]->Cells[10]->Value);

newdlg->textBox12->Text=System::Convert::ToString(this->dataGridView1->SelectedRows[0]->Cells[11]->Value);

newdlg->textBox13->Text=System::Convert::ToString(this->dataGridView1->SelectedRows[0]->Cells[12]->Value);

newdlg->textBox14->Text=System::Convert::ToString(this->dataGridView1->SelectedRows[0]->Cells[13]->Value);

newdlg->textBox15->Text=System::Convert::ToString(this->dataGridView1->SelectedRows[0]->Cells[14]->Value);

newdlg->textBox16->Text=System::Convert::ToString(this->dataGridView1->SelectedRows[0]->Cells[15]->Value);

newdlg->textBox17->Text=System::Convert::ToString(this->dataGridView1->SelectedRows[0]->Cells[16]->Value);

dialres=newdlg->ShowDialog();

if(dialres==System::Windows::Forms::DialogResult::OK){

this->dataGridView1->SelectedRows[0]->Cells[0]->Value=newdlg->textBox1->Text;

this->dataGridView1->SelectedRows[0]->Cells[1]->Value=newdlg->textBox2->Text;

this->dataGridView1->SelectedRows[0]->Cells[2]->Value=newdlg->textBox3->Text;

this->dataGridView1->SelectedRows[0]->Cells[3]->Value=newdlg->textBox4->Text;

this->dataGridView1->SelectedRows[0]->Cells[4]->Value=newdlg->textBox5->Text;

this->dataGridView1->SelectedRows[0]->Cells[5]->Value=newdlg->textBox6->Text;

this->dataGridView1->SelectedRows[0]->Cells[6]->Value=newdlg->textBox7->Text;

this->dataGridView1->SelectedRows[0]->Cells[7]->Value=newdlg->textBox8->Text;

this->dataGridView1->SelectedRows[0]->Cells[8]->Value=newdlg->textBox9->Text;

this->dataGridView1->SelectedRows[0]->Cells[9]->Value=newdlg->textBox10->Text;

this->dataGridView1->SelectedRows[0]->Cells[10]->Value=newdlg->textBox11->Text;

this->dataGridView1->SelectedRows[0]->Cells[11]->Value=newdlg->textBox12->Text;

this->dataGridView1->SelectedRows[0]->Cells[12]->Value=newdlg->textBox13->Text;

this->dataGridView1->SelectedRows[0]->Cells[13]->Value=newdlg->textBox14->Text;

this->dataGridView1->SelectedRows[0]->Cells[14]->Value=newdlg->textBox15->Text;

this->dataGridView1->SelectedRows[0]->Cells[15]->Value=newdlg->textBox16->Text;

this->dataGridView1->SelectedRows[0]->Cells[16]->Value=newdlg->textBox17->Text;

}

MessageBox::Show("Записьотредактирована!","Information",MessageBoxButtons::OK,MessageBoxIcon::Information);

}

else{

MessageBox::Show("Невыделенаредактируемаястрока!","Ошибка",MessageBoxButtons::OK,MessageBoxIcon::Error);

}

}

}

private: System::Void aboutToolStripMenuItem1_Click(System::Object^ sender, System::EventArgs^ e) {

MessageBox::Show("\"\Экранкурсовогопроектирования\"\ Версия 1.0","Опрограмме",MessageBoxButtons::OK,MessageBoxIcon::Information);

}

private: System::Void checkBox1_CheckedChanged(System::Object^ sender, System::EventArgs^ e) {

if(checkBox1->Checked==true&&CountDataGrid!=0){

button2->Enabled=true;

button6->Enabled=true;

dataGridView1->RowHeadersVisible=true;

}

if(checkBox1->Checked==false&&CountDataGrid!=0){

dataGridView1->RowHeadersVisible=false;

button2->Enabled=false;

button6->Enabled=false;

}

}

};

}

ФайлForm2.h. Окнодобавления/редактированиязаписей.

#pragma once

#include "TStudent.h"

namespace WindowsFormApplicationC {

using namespace System;

using namespace System::ComponentModel;

using namespace System::Collections;

using namespace System::Windows::Forms;

using namespace System::Data;

using namespace System::Drawing;

using namespace System::IO;

public ref class Form2 : public System::Windows::Forms::Form

{

public:

Form2(void)

{

InitializeComponent();

}

protected:

~Form2()

{

if (components)

{

delete components;

}

}

public: System::Windows::Forms::TextBox^ textBox1;

protected:

public: System::Windows::Forms::TextBox^ textBox2;

public: System::Windows::Forms::TextBox^ textBox3;

public: System::Windows::Forms::TextBox^ textBox4;

public: System::Windows::Forms::TextBox^ textBox5;

public: System::Windows::Forms::TextBox^ textBox6;

public: System::Windows::Forms::TextBox^ textBox7;

public: System::Windows::Forms::TextBox^ textBox8;

public: System::Windows::Forms::TextBox^ textBox9;

public: System::Windows::Forms::TextBox^ textBox10;

public: System::Windows::Forms::TextBox^ textBox11;

public: System::Windows::Forms::TextBox^ textBox12;

public: System::Windows::Forms::TextBox^ textBox13;

public: System::Windows::Forms::TextBox^ textBox14;

public: System::Windows::Forms::TextBox^ textBox15;

public: System::Windows::Forms::TextBox^ textBox16;

private: System::Windows::Forms::Button^ button1;

private: System::Windows::Forms::Button^ button2;

private: System::Windows::Forms::Button^ button3;

public: System::Windows::Forms::TextBox^ textBox17;

private: System::Windows::Forms::Label^ label1;

private: System::Windows::Forms::Label^ label2;

private: System::Windows::Forms::Label^ label3;

private: System::Windows::Forms::Label^ label4;

private: System::Windows::Forms::Label^ label5;

private: System::Windows::Forms::Label^ label6;

private: System::Windows::Forms::Label^ label7;

private: System::Windows::Forms::Label^ label8;

private: System::Windows::Forms::Label^ label9;

private: System::Windows::Forms::Label^ label10;

private: System::Windows::Forms::Label^ label11;

private: System::Windows::Forms::Label^ label12;

private: System::Windows::Forms::Label^ label13;

private: System::Windows::Forms::Label^ label14;

private: System::Windows::Forms::Label^ label15;

private: System::Windows::Forms::Label^ label16;

private: System::Windows::Forms::Label^ label17;

private: System::Windows::Forms::Label^ label18;

private: System::Windows::Forms::Label^ label19;

private: System::Windows::Forms::Label^ label20;

private: System::Windows::Forms::Button^ button4;

private:

System::ComponentModel::Container ^components;

#pragma region Windows Form Designer generated code

void InitializeComponent(void)

{

this->textBox1 = (gcnew System::Windows::Forms::TextBox());

this->textBox2 = (gcnew System::Windows::Forms::TextBox());

this->textBox3 = (gcnew System::Windows::Forms::TextBox());

this->textBox4 = (gcnew System::Windows::Forms::TextBox());

this->textBox5 = (gcnew System::Windows::Forms::TextBox());

this->textBox6 = (gcnew System::Windows::Forms::TextBox());

this->textBox7 = (gcnew System::Windows::Forms::TextBox());

this->textBox8 = (gcnew System::Windows::Forms::TextBox());

this->textBox9 = (gcnew System::Windows::Forms::TextBox());

this->textBox10 = (gcnew System::Windows::Forms::TextBox());

this->textBox11 = (gcnew System::Windows::Forms::TextBox());

this->textBox12 = (gcnew System::Windows::Forms::TextBox());

this->textBox13 = (gcnew System::Windows::Forms::TextBox());

this->textBox14 = (gcnew System::Windows::Forms::TextBox());

this->textBox15 = (gcnew System::Windows::Forms::TextBox());

this->textBox16 = (gcnew System::Windows::Forms::TextBox());

this->button1 = (gcnew System::Windows::Forms::Button());

this->button2 = (gcnew System::Windows::Forms::Button());

this->button3 = (gcnew System::Windows::Forms::Button());

this->textBox17 = (gcnew System::Windows::Forms::TextBox());

this->label1 = (gcnew System::Windows::Forms::Label());

this->label2 = (gcnew System::Windows::Forms::Label());

this->label3 = (gcnew System::Windows::Forms::Label());

this->label4 = (gcnew System::Windows::Forms::Label());

this->label5 = (gcnew System::Windows::Forms::Label());

this->label6 = (gcnew System::Windows::Forms::Label());

this->label7 = (gcnew System::Windows::Forms::Label());

this->label8 = (gcnew System::Windows::Forms::Label());

this->label9 = (gcnew System::Windows::Forms::Label());

this->label10 = (gcnew System::Windows::Forms::Label());

this->label11 = (gcnew System::Windows::Forms::Label());

this->label12 = (gcnew System::Windows::Forms::Label());

this->label13 = (gcnew System::Windows::Forms::Label());

this->label14 = (gcnew System::Windows::Forms::Label());

this->label15 = (gcnew System::Windows::Forms::Label());

this->label16 = (gcnew System::Windows::Forms::Label());

this->label17 = (gcnew System::Windows::Forms::Label());

this->label18 = (gcnew System::Windows::Forms::Label());

this->label19 = (gcnew System::Windows::Forms::Label());

this->label20 = (gcnew System::Windows::Forms::Label());

this->button4 = (gcnew System::Windows::Forms::Button());

this->SuspendLayout();

//

// textBox1

//

this->textBox1->AccessibleDescription = L"";

this->textBox1->Location = System::Drawing::Point(12, 38);

this->textBox1->Name = L"textBox1";

this->textBox1->Size = System::Drawing::Size(290, 20);

this->textBox1->TabIndex = 0;

//

// textBox2

//

this->textBox2->Location = System::Drawing::Point(12, 90);

this->textBox2->MaxLength = 3;

this->textBox2->Name = L"textBox2";

this->textBox2->Size = System::Drawing::Size(47, 20);

this->textBox2->TabIndex = 1;

//

// textBox3

//

this->textBox3->Location = System::Drawing::Point(12, 142);

this->textBox3->MaxLength = 3;

this->textBox3->Name = L"textBox3";

this->textBox3->Size = System::Drawing::Size(47, 20);

this->textBox3->TabIndex = 2;

//

// textBox4

//

this->textBox4->Location = System::Drawing::Point(12, 194);

this->textBox4->MaxLength = 3;

this->textBox4->Name = L"textBox4";

this->textBox4->Size = System::Drawing::Size(47, 20);

this->textBox4->TabIndex = 3;

//

// textBox5

//

this->textBox5->Location = System::Drawing::Point(142, 90);

this->textBox5->MaxLength = 3;

this->textBox5->Name = L"textBox5";

this->textBox5->Size = System::Drawing::Size(47, 20);

this->textBox5->TabIndex = 4;

//

// textBox6

//

this->textBox6->Location = System::Drawing::Point(142, 139);

this->textBox6->MaxLength = 3;

this->textBox6->Name = L"textBox6";

this->textBox6->Size = System::Drawing::Size(47, 20);

this->textBox6->TabIndex = 5;

//

// textBox7

//

this->textBox7->Location = System::Drawing::Point(142, 194);

this->textBox7->MaxLength = 3;

this->textBox7->Name = L"textBox7";

this->textBox7->Size = System::Drawing::Size(47, 20);

this->textBox7->TabIndex = 6;

//

// textBox8

//

this->textBox8->Location = System::Drawing::Point(271, 90);

this->textBox8->MaxLength = 3;

this->textBox8->Name = L"textBox8";

this->textBox8->Size = System::Drawing::Size(47, 20);

this->textBox8->TabIndex = 7;

//

// textBox9

//

this->textBox9->Location = System::Drawing::Point(271, 142);

this->textBox9->MaxLength = 3;

this->textBox9->Name = L"textBox9";

this->textBox9->Size = System::Drawing::Size(47, 20);

this->textBox9->TabIndex = 8;

//

// textBox10

//

this->textBox10->Location = System::Drawing::Point(271, 194);

this->textBox10->MaxLength = 3;

this->textBox10->Name = L"textBox10";

this->textBox10->Size = System::Drawing::Size(47, 20);

this->textBox10->TabIndex = 9;

//

// textBox11

//

this->textBox11->Location = System::Drawing::Point(418, 106);

this->textBox11->MaxLength = 10;

this->textBox11->Name = L"textBox11";

this->textBox11->Size = System::Drawing::Size(129, 20);

this->textBox11->TabIndex = 10;

//

// textBox12

//

this->textBox12->Location = System::Drawing::Point(587, 106);

this->textBox12->MaxLength = 10;

this->textBox12->Name = L"textBox12";

this->textBox12->Size = System::Drawing::Size(129, 20);

this->textBox12->TabIndex = 11;

//

// textBox13

//

this->textBox13->Location = System::Drawing::Point(418, 177);

this->textBox13->MaxLength = 10;

this->textBox13->Name = L"textBox13";

this->textBox13->Size = System::Drawing::Size(129, 20);

this->textBox13->TabIndex = 12;

//

// textBox14

//

this->textBox14->Location = System::Drawing::Point(587, 177);

this->textBox14->MaxLength = 10;

this->textBox14->Name = L"textBox14";

this->textBox14->Size = System::Drawing::Size(129, 20);

this->textBox14->TabIndex = 13;

//

// textBox15

//

this->textBox15->Location = System::Drawing::Point(12, 297);

this->textBox15->MaxLength = 10;

this->textBox15->Name = L"textBox15";

this->textBox15->Size = System::Drawing::Size(129, 20);

this->textBox15->TabIndex = 14;

//

// textBox16

//

this->textBox16->Location = System::Drawing::Point(173, 297);

this->textBox16->MaxLength = 10;

this->textBox16->Name = L"textBox16";

this->textBox16->Size = System::Drawing::Size(129, 20);

this->textBox16->TabIndex = 15;

//

// button1

//

this->button1->Location = System::Drawing::Point(744, 281);

this->button1->Name = L"button1";

this->button1->Size = System::Drawing::Size(126, 60);

this->button1->TabIndex = 16;

this->button1->Text = L"Добавить";

this->button1->UseVisualStyleBackColor = true;

this->button1->Visible = false;

this->button1->Click += gcnew System::EventHandler(this, &Form2::button1_Click);

//

// button2

//

this->button2->Location = System::Drawing::Point(795, 113);

this->button2->Name = L"button2";

this->button2->Size = System::Drawing::Size(75, 23);

this->button2->TabIndex = 17;

this->button2->Text = L"Отмена";

this->button2->UseVisualStyleBackColor = true;

this->button2->Click += gcnew System::EventHandler(this, &Form2::button2_Click);

//

// button3

//

this->button3->Location = System::Drawing::Point(795, 61);

this->button3->Name = L"button3";

this->button3->Size = System::Drawing::Size(75, 23);

this->button3->TabIndex = 18;

this->button3->Text = L"Очистить";

this->button3->UseVisualStyleBackColor = true;

this->button3->Click += gcnew System::EventHandler(this, &Form2::button3_Click);

//

// textBox17

//

this->textBox17->Location = System::Drawing::Point(547, 297);

this->textBox17->MaxLength = 3;

this->textBox17->Name = L"textBox17";

this->textBox17->Size = System::Drawing::Size(52, 20);

this->textBox17->TabIndex = 19;

//

// label1

//

this->label1->AutoSize = true;

this->label1->Location = System::Drawing::Point(13, 12);

this->label1->Name = L"label1";

this->label1->Size = System::Drawing::Size(82, 13);

this->label1->TabIndex = 20;

this->label1->Text = L"ФИОстудента";

//

// label2

//

this->label2->AutoSize = true;

this->label2->Location = System::Drawing::Point(13, 71);

this->label2->Name = L"label2";

this->label2->Size = System::Drawing::Size(107, 13);

this->label2->TabIndex = 21;

this->label2->Text = L"1 к.н. задан. % вып.";

//

// label3

//

this->label3->AutoSize = true;

this->label3->Location = System::Drawing::Point(13, 123);

this->label3->Name = L"label3";

this->label3->Size = System::Drawing::Size(102, 13);

this->label3->TabIndex = 22;

this->label3->Text = L"1 к.н. факт. % вып.";

//

// label4

//

this->label4->AutoSize = true;

this->label4->Location = System::Drawing::Point(13, 175);

this->label4->Name = L"label4";

this->label4->Size = System::Drawing::Size(111, 13);

this->label4->TabIndex = 23;

this->label4->Text = L"контрольнаяоценка";

//

// label5

//

this->label5->AutoSize = true;

this->label5->Location = System::Drawing::Point(139, 71);

this->label5->Name = L"label5";

this->label5->Size = System::Drawing::Size(107, 13);

this->label5->TabIndex = 24;

this->label5->Text = L"2 к.н. задан. % вып.";

//

// label6

//

this->label6->AutoSize = true;

this->label6->Location = System::Drawing::Point(139, 123);

this->label6->Name = L"label6";

this->label6->Size = System::Drawing::Size(102, 13);

this->label6->TabIndex = 25;

this->label6->Text = L"2 к.н. факт. % вып.";

//

// label7

//

this->label7->AutoSize = true;

this->label7->Location = System::Drawing::Point(139, 175);

this->label7->Name = L"label7";

this->label7->Size = System::Drawing::Size(111, 13);

this->label7->TabIndex = 26;

this->label7->Text = L"контрольнаяоценка";

//

// label8

//

this->label8->AutoSize = true;

this->label8->Location = System::Drawing::Point(268, 71);

this->label8->Name = L"label8";

this->label8->Size = System::Drawing::Size(107, 13);

this->label8->TabIndex = 27;

this->label8->Text = L"3 к.н. задан. % вып.";

//

// label9

//

this->label9->AutoSize = true;

this->label9->Location = System::Drawing::Point(268, 123);

this->label9->Name = L"label9";

this->label9->Size = System::Drawing::Size(102, 13);

this->label9->TabIndex = 28;

this->label9->Text = L"3 к.н. факт. % вып.";

//

// label10

//

this->label10->AutoSize = true;

this->label10->Location = System::Drawing::Point(268, 175);

this->label10->Name = L"label10";

this->label10->Size = System::Drawing::Size(111, 13);

this->label10->TabIndex = 29;

this->label10->Text = L"контрольнаяоценка";

//

// label11

//

this->label11->AutoSize = true;

this->label11->Location = System::Drawing::Point(415, 71);

this->label11->Name = L"label11";

this->label11->Size = System::Drawing::Size(264, 13);

this->label11->TabIndex = 30;

this->label11->Text = L"Дата сдачи заверш. проекта (работы) на проверку";

//

// label12

//

this->label12->AutoSize = true;

this->label12->Location = System::Drawing::Point(461, 90);

this->label12->Name = L"label12";

this->label12->Size = System::Drawing::Size(33, 13);

this->label12->TabIndex = 31;

this->label12->Text = L"План";

//

// label13

//

this->label13->AutoSize = true;

this->label13->Location = System::Drawing::Point(632, 90);

this->label13->Name = L"label13";

this->label13->Size = System::Drawing::Size(38, 13);

this->label13->TabIndex = 32;

this->label13->Text = L"Факт.";

//

// label14

//

this->label14->AutoSize = true;

this->label14->Location = System::Drawing::Point(415, 139);

this->label14->Name = L"label14";

this->label14->Size = System::Drawing::Size(275, 13);

this->label14->TabIndex = 33;

this->label14->Text = L"Дата выдачи проекта (работы) препод. на доработку";

//

// label15

//

this->label15->AutoSize = true;

this->label15->Location = System::Drawing::Point(461, 161);

this->label15->Name = L"label15";

this->label15->Size = System::Drawing::Size(33, 13);

this->label15->TabIndex = 34;

this->label15->Text = L"План";

//

// label16

//

this->label16->AutoSize = true;

this->label16->Location = System::Drawing::Point(632, 161);

this->label16->Name = L"label16";

this->label16->Size = System::Drawing::Size(38, 13);

this->label16->TabIndex = 35;

this->label16->Text = L"Факт.";

//

// label17

//

this->label17->AutoSize = true;

this->label17->Location = System::Drawing::Point(114, 261);

this->label17->Name = L"label17";

this->label17->Size = System::Drawing::Size(76, 13);

this->label17->TabIndex = 36;

this->label17->Text = L"Датазащиты";

//

// label18

//

this->label18->AutoSize = true;

this->label18->Location = System::Drawing::Point(50, 281);

this->label18->Name = L"label18";

this->label18->Size = System::Drawing::Size(33, 13);

this->label18->TabIndex = 37;

this->label18->Text = L"План";

//

// label19

//

this->label19->AutoSize = true;

this->label19->Location = System::Drawing::Point(212, 281);

this->label19->Name = L"label19";

this->label19->Size = System::Drawing::Size(38, 13);

this->label19->TabIndex = 38;

this->label19->Text = L"Факт.";

//

// label20

//

this->label20->AutoSize = true;

this->label20->BackColor = System::Drawing::SystemColors::Control;

this->label20->CausesValidation = false;

this->label20->Location = System::Drawing::Point(527, 261);

this->label20->Name = L"label20";

this->label20->Size = System::Drawing::Size(97, 13);

this->label20->TabIndex = 39;

this->label20->Text = L"Оценказаработу";

//

// button4

//

this->button4->Location = System::Drawing::Point(744, 194);

this->button4->Name = L"button4";

this->button4->Size = System::Drawing::Size(126, 60);

this->button4->TabIndex = 40;

this->button4->Text = L"Проверка";

this->button4->UseVisualStyleBackColor = true;

this->button4->Click += gcnew System::EventHandler(this, &Form2::button4_Click);

//

// Form2

//

this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);

this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;

this->ClientSize = System::Drawing::Size(882, 353);

this->Controls->Add(this->button4);

this->Controls->Add(this->label20);

this->Controls->Add(this->label19);

this->Controls->Add(this->label18);

this->Controls->Add(this->label17);

this->Controls->Add(this->label16);

this->Controls->Add(this->label15);

this->Controls->Add(this->label14);

this->Controls->Add(this->label13);

this->Controls->Add(this->label12);

this->Controls->Add(this->label11);

this->Controls->Add(this->label10);

this->Controls->Add(this->label9);

this->Controls->Add(this->label8);

this->Controls->Add(this->label7);

this->Controls->Add(this->label6);

this->Controls->Add(this->label5);

this->Controls->Add(this->label4);

this->Controls->Add(this->label3);

this->Controls->Add(this->label2);

this->Controls->Add(this->label1);

this->Controls->Add(this->textBox17);

this->Controls->Add(this->button3);

this->Controls->Add(this->button2);

this->Controls->Add(this->button1);

this->Controls->Add(this->textBox16);

this->Controls->Add(this->textBox15);

this->Controls->Add(this->textBox14);

this->Controls->Add(this->textBox13);

this->Controls->Add(this->textBox12);

this->Controls->Add(this->textBox11);

this->Controls->Add(this->textBox10);

this->Controls->Add(this->textBox9);

this->Controls->Add(this->textBox8);

this->Controls->Add(this->textBox7);

this->Controls->Add(this->textBox6);

this->Controls->Add(this->textBox5);

this->Controls->Add(this->textBox4);

this->Controls->Add(this->textBox3);

this->Controls->Add(this->textBox2);

this->Controls->Add(this->textBox1);

this->HelpButton = true;

this->MaximizeBox = false;

this->MinimizeBox = false;

this->Name = L"Form2";

this->Text = L"Добавление студента";

this->ResumeLayout(false);

this->PerformLayout();

}

#pragma endregion

private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) {

this->DialogResult=System::Windows::Forms::DialogResult::OK;

this->Close();

}

private: System::Void button3_Click(System::Object^ sender, System::EventArgs^ e) {

textBox1->Clear();

textBox2->Clear();

textBox3->Clear();

textBox4->Clear();

textBox5->Clear();

textBox6->Clear();

textBox7->Clear();

textBox8->Clear();

textBox9->Clear();

textBox10->Clear();

textBox11->Clear();

textBox12->Clear();

textBox13->Clear();

textBox14->Clear();

textBox15->Clear();

textBox16->Clear();

textBox17->Clear();

}

private: System::Void button2_Click(System::Object^ sender, System::EventArgs^ e) {

this->Close();

}

private: System::Void button4_Click(System::Object^ sender, System::EventArgs^ e) {

if(textBox1->Text!=""&&textBox2->Text!=""&&textBox3->Text!=""&&textBox4->Text!=""&&textBox5->Text!=""

&&textBox6->Text!=""&&textBox7->Text!=""&&textBox8->Text!=""

&&textBox9->Text!=""&&textBox10->Text!=""&&textBox11->Text!=""

&&textBox12->Text!=""&&textBox13->Text!=""&&textBox14->Text!=""

&&textBox15->Text!=""&&textBox16->Text!=""&&textBox17->Text!=""){

if(System::Char::IsDigit(textBox2->Text,0)&&System::Char::IsDigit(textBox3->Text,0)&&

System::Char::IsDigit(textBox4->Text,0)&&System::Char::IsDigit(textBox5->Text,0)&&

System::Char::IsDigit(textBox6->Text,0)&&System::Char::IsDigit(textBox7->Text,0)&&

System::Char::IsDigit(textBox8->Text,0)&&System::Char::IsDigit(textBox9->Text,0)&&

System::Char::IsDigit(textBox10->Text,0)&&System::Char::IsDigit(textBox17->Text,0)){

button1->Visible=true;

}

else{

MessageBox::Show("Некоторыеполяимеютневерныйформат!","Ошибка",MessageBoxButtons::OK,MessageBoxIcon::Error);

}

}

else{

MessageBox::Show("Незаполненынекоторыеполя!","Ошибка",MessageBoxButtons::OK,MessageBoxIcon::Error);

}

}

};

}

Файл Strart.h. Окно ввода информации об экране курсового проектирования.

#pragma once

namespace WindowsFormApplicationC {

using namespace System;

using namespace System::ComponentModel;

using namespace System::Collections;

using namespace System::Windows::Forms;

using namespace System::Data;

using namespace System::Drawing;

/// <summary>

/// Summary for Start

/// </summary>

public ref class Start : public System::Windows::Forms::Form

{

public:

Start(void)

{

InitializeComponent();

}

protected:

~Start()

{

if (components)

{

delete components;

}

}

public: System::Windows::Forms::TextBox^ textBox1;

protected:

private: System::Windows::Forms::Button^ button1;

public: System::Windows::Forms::TextBox^ textBox2;

private:

public: System::Windows::Forms::TextBox^ textBox3;

private: System::Windows::Forms::Label^ label1;

public:

private: System::Windows::Forms::Label^ label2;

private: System::Windows::Forms::Label^ label3;

private:

/// <summary>

/// Required designer variable.

/// </summary>

System::ComponentModel::Container ^components;

#pragma region Windows Form Designer generated code

void InitializeComponent(void)

{

this->textBox1 = (gcnew System::Windows::Forms::TextBox());

this->button1 = (gcnew System::Windows::Forms::Button());

this->textBox2 = (gcnew System::Windows::Forms::TextBox());

this->textBox3 = (gcnew System::Windows::Forms::TextBox());

this->label1 = (gcnew System::Windows::Forms::Label());

this->label2 = (gcnew System::Windows::Forms::Label());

this->label3 = (gcnew System::Windows::Forms::Label());

this->SuspendLayout();

//

// textBox1

//

this->textBox1->Location = System::Drawing::Point(12, 34);

this->textBox1->Name = L"textBox1";

this->textBox1->Size = System::Drawing::Size(508, 20);

this->textBox1->TabIndex = 0;

//

// button1

//

this->button1->AutoEllipsis = true;

this->button1->Location = System::Drawing::Point(445, 172);

this->button1->Name = L"button1";

this->button1->Size = System::Drawing::Size(75, 23);

this->button1->TabIndex = 1;

this->button1->Text = L"OK";

this->button1->UseVisualStyleBackColor = true;

this->button1->Click += gcnew System::EventHandler(this, &Start::button1_Click);

//

// textBox2

//

this->textBox2->Location = System::Drawing::Point(12, 82);

this->textBox2->Name = L"textBox2";

this->textBox2->Size = System::Drawing::Size(508, 20);

this->textBox2->TabIndex = 2;

//

// textBox3

//

this->textBox3->Location = System::Drawing::Point(12, 130);

this->textBox3->Name = L"textBox3";

this->textBox3->Size = System::Drawing::Size(173, 20);

this->textBox3->TabIndex = 3;

//

// label1

//

this->label1->AutoSize = true;

this->label1->Font = (gcnew System::Drawing::Font(L"Times New Roman", 14.25F, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,

static_cast<System::Byte>(204)));

this->label1->Location = System::Drawing::Point(8, 105);

this->label1->Name = L"label1";

this->label1->Size = System::Drawing::Size(156, 21);

this->label1->TabIndex = 4;

this->label1->Text = L"Датаутверждения";

//

// label2

//

this->label2->AutoSize = true;

this->label2->Font = (gcnew System::Drawing::Font(L"Times New Roman", 14.25F, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,

static_cast<System::Byte>(204)));

this->label2->Location = System::Drawing::Point(8, 57);

this->label2->Name = L"label2";

this->label2->Size = System::Drawing::Size(235, 21);

this->label2->TabIndex = 5;

this->label2->Text = L"Составприемнойкомиссии";

//

// label3

//

this->label3->AutoSize = true;

this->label3->Font = (gcnew System::Drawing::Font(L"Times New Roman", 14.25F, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,

static_cast<System::Byte>(204)));

this->label3->Location = System::Drawing::Point(8, 9);

this->label3->Name = L"label3";

this->label3->Size = System::Drawing::Size(222, 21);

this->label3->TabIndex = 6;

this->label3->Text = L"Названиекурсовоголиста";

//

// Start

//

this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);

this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;

this->ClientSize = System::Drawing::Size(532, 207);

this->ControlBox = false;

this->Controls->Add(this->label3);

this->Controls->Add(this->label2);

this->Controls->Add(this->label1);

this->Controls->Add(this->textBox3);

this->Controls->Add(this->textBox2);

this->Controls->Add(this->button1);

this->Controls->Add(this->textBox1);

this->MaximizeBox = false;

this->MaximumSize = System::Drawing::Size(548, 245);

this->MinimizeBox = false;

this->MinimumSize = System::Drawing::Size(548, 245);

this->Name = L"Start";

this->Text = L"Введите название курсового листа";

this->Load += gcnew System::EventHandler(this, &Start::Start_Load);

this->ResumeLayout(false);

this->PerformLayout();

}

#pragma endregion

private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) {

Int32 flag=0;

if(textBox1->Text!=""){

flag++;

}

else{

MessageBox::Show("Введитеназваниекурсовоголиста!","Ошибка!",MessageBoxButtons::OK,MessageBoxIcon::Error);

}

if(textBox2->Text!=""){

flag++;

}

else{

MessageBox::Show("Введитесоставприемнойкомиссии!","Ошибка!",MessageBoxButtons::OK,MessageBoxIcon::Error);

}

if(textBox3->Text!=""){

flag++;

}

else{

MessageBox::Show("Введитедатуутверждениякурсовоголиста!","Ошибка!",MessageBoxButtons::OK,MessageBoxIcon::Error);

}

if(flag==3){

this->DialogResult=System::Windows::Forms::DialogResult::OK;

this->Close();

}

}

private: System::Void Start_Load(System::Object^ sender, System::EventArgs^ e) {

}

};

}

Файл Search.h. Окнопоиска.

#pragma once

namespace WindowsFormApplicationC {

using namespace System;

using namespace System::ComponentModel;

using namespace System::Collections;

using namespace System::Windows::Forms;

using namespace System::Data;

using namespace System::Drawing;

public ref class Search : public System::Windows::Forms::Form

{

public:

Search(void)

{

InitializeComponent();

}

protected:

~Search()

{

if (components)

{

delete components;

}

}

private: System::Windows::Forms::Button^ button1;

protected:

private: System::Windows::Forms::Button^ button2;

public: System::Windows::Forms::TextBox^ textBox1;

public:

private:

System::ComponentModel::Container ^components;

#pragma region Windows Form Designer generated code

void InitializeComponent(void)

{

this->button1 = (gcnew System::Windows::Forms::Button());

this->button2 = (gcnew System::Windows::Forms::Button());

this->textBox1 = (gcnew System::Windows::Forms::TextBox());

this->SuspendLayout();

//

// button1

//

this->button1->Location = System::Drawing::Point(12, 147);

this->button1->Name = L"button1";

this->button1->Size = System::Drawing::Size(75, 23);

this->button1->TabIndex = 0;

this->button1->Text = L"Поиск";

this->button1->UseVisualStyleBackColor = true;

this->button1->Click += gcnew System::EventHandler(this, &Search::button1_Click);

//

// button2

//

this->button2->Location = System::Drawing::Point(297, 147);

this->button2->Name = L"button2";

this->button2->Size = System::Drawing::Size(75, 23);

this->button2->TabIndex = 1;

this->button2->Text = L"Отмена";

this->button2->UseVisualStyleBackColor = true;

this->button2->Click += gcnew System::EventHandler(this, &Search::button2_Click);

//

// textBox1

//

this->textBox1->Location = System::Drawing::Point(12, 61);

this->textBox1->Name = L"textBox1";

this->textBox1->Size = System::Drawing::Size(360, 20);

this->textBox1->TabIndex = 2;

//

// Search

//

this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);

this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;

this->ClientSize = System::Drawing::Size(384, 182);

this->ControlBox = false;

this->Controls->Add(this->textBox1);

this->Controls->Add(this->button2);

this->Controls->Add(this->button1);

this->MaximumSize = System::Drawing::Size(400, 220);

this->MinimumSize = System::Drawing::Size(400, 220);

this->Name = L"Search";

this->Text = L"Поиск";

this->ResumeLayout(false);

this->PerformLayout();

}

#pragma endregion

private: System::Void button2_Click(System::Object^ sender, System::EventArgs^ e) {

this->Close();

}

private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) {

if(textBox1->Text!=""){

this->DialogResult=System::Windows::Forms::DialogResult::OK;

this->Close();

}

else{

MessageBox::Show("Введитеинформациюдляпоиска!","Ошибка!",MessageBoxButtons::OK,MessageBoxIcon::Error);

}

}

};

}

Файл WindowsFormApplicationC++.cpp

#include "stdafx.h"

#include "Form1.h"

using namespace WindowsFormApplicationC;

[STAThreadAttribute]


Подобные документы

  • Разработка интерфейса программы, обеспечивающего доступ ко всем возможностям среды структурно-визуального программирования. Реализация инструментальных средств, позволяющих связывать компоненты в единое приложение. Создание иерархии классов представления.

    дипломная работа [2,3 M], добавлен 11.04.2012

  • Разработка иерархии классов, содержащей не менее трех уровней. Определение базовых и производных классов. Анализ технического задания. Проектирование структуры программы и базовых алгоритмов. Программная реализация разработанной структуры и алгоритмов.

    курсовая работа [34,9 K], добавлен 11.01.2011

  • Реализация абстрактных методов демонстрации иерархии классов: постановка задачи, имитирующей жизнь двух племен муравьев, создание класса-родителя "муравей", определяющего методы и свойства, которые унаследуют потомки. Программное и аппаратное обеспечение.

    курсовая работа [630,0 K], добавлен 19.03.2012

  • Принципы написания консольных приложений на языке Java в среде Eclipse. Составление программы завтрака на основе списка продуктов, передаваемых в качестве параметров в командной строке. Создание пакета для классов, интерфейса, базового класса иерархии.

    лабораторная работа [1,2 M], добавлен 01.05.2014

  • Проектирование программного продукта для использования в организации учета медикаментов в аптеке. Построение функциональной модели автоматизированной системы; разработка и тестирование иерархии классов в соответствии с объектно-ориентированным подходом.

    курсовая работа [1,5 M], добавлен 21.02.2013

  • Основные понятия объектно-ориентированного программирования, особенности описания функций и классов. Разработка программы для работы с универсальной очередью установленного типа, добавления и удаления ее элементов и вывода содержимого очереди на экран.

    курсовая работа [187,2 K], добавлен 27.08.2012

  • Реализация выбора в языках высокого уровня, использование сложных типов. Формат оператора выбора в языке Pascal. Изображение оператора варианта на блок-схеме. Понятие массива и способы их вводов. Описание компонентов приложения и программного кода.

    курсовая работа [585,6 K], добавлен 17.08.2013

  • Ознакомление с программой проведения сборки компьютера из деталей, имеющихся в базе данных. Рассмотрение правил создания иерархии классов. Описание основных методов и пользовательского интерфейса. Изучение системных требований и текстов основных классов.

    курсовая работа [710,2 K], добавлен 26.07.2014

  • Классы и свойства объектно-ориентированного пространства. Методика создания новых классов в delphi: выбор родительского класса, изменение существующих компонентов, создание подклассов для элементов управления windows. Создание новой ветви классов.

    контрольная работа [13,0 K], добавлен 07.07.2012

  • Разработка при помощи средств визуального программирования Delphi приложения для Windows, представляющего собой программу, обучающую работе с клавиатурой, которая должна выдавать на экран текст, набираемый на клавиатуре и оценивать скорость набора.

    курсовая работа [241,3 K], добавлен 19.03.2010

Работы в архивах красиво оформлены согласно требованиям ВУЗов и содержат рисунки, диаграммы, формулы и т.д.
PPT, PPTX и PDF-файлы представлены только в архивах.
Рекомендуем скачать работу.