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

Курсовой проект - Компьютеры, программирование

Другие курсовые по предмету Компьютеры, программирование

>//

this->listBox1->Anchor = static_cast(((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(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::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(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::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_castEndInit();

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;

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

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

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

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

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

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

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

Items->Add(Screen.Date);">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&