Добавлен: 02.04.2023
Просмотров: 461
Скачиваний: 1
СОДЕРЖАНИЕ
1 Теоретические основы организации работы с файлами в MS Visual C++
1.1 Организация работы с файлами средствами C++
1.2 Возможности компонента RichTextBox по работе с файлами
2 Разработка электронного учебника по курсу JavaScript
2.1 Логическая структура приложения
2.4 Разработка программного кода
this->radioButton4->Visible=false;
this->label1->Visible=false;
this->richTextBox1->LoadFile(L"Data/Lection7.rtf");
num=1;
}
private: System::Void button9_Click(System::Object^ sender, System::EventArgs^ e) {
this->groupBox1->Visible=false;
this->groupBox2->Visible=false;
this->groupBox3->Visible=false;
this->richTextBox1->Visible=true;
this->richTextBox2->Visible=false;
this->button1->Visible=false;
this->radioButton1->Visible=false;
this->radioButton2->Visible=false;
this->radioButton3->Visible=false;
this->radioButton4->Visible=false;
this->label1->Visible=false;
this->richTextBox1->LoadFile(L"Data/Lection8.rtf");
num=1;
}
private: System::Void button10_Click(System::Object^ sender, System::EventArgs^ e) {
this->groupBox1->Visible=false;
this->groupBox2->Visible=false;
this->groupBox3->Visible=false;
this->richTextBox1->Visible=true;
this->richTextBox2->Visible=false;
this->button1->Visible=false;
this->radioButton1->Visible=false;
this->radioButton2->Visible=false;
this->radioButton3->Visible=false;
this->radioButton4->Visible=false;
this->label1->Visible=false;
this->richTextBox1->LoadFile(L"Data/Lection9.rtf");
num=1;
}
private: System::Void button19_Click(System::Object^ sender, System::EventArgs^ e) {
MessageBox::Show("Для выполнения задания должны быть изучены лекции 1 - 2","Внимание!", MessageBoxButtons::OK,MessageBoxIcon::Question);
this->groupBox1->Visible=false;
this->groupBox2->Visible=false;
this->groupBox3->Visible=false;
num=10;
this->richTextBox1->Visible=true;
this->richTextBox2->Visible=false;
this->button1->Visible=false;
this->radioButton1->Visible=false;
this->radioButton2->Visible=false;
this->radioButton3->Visible=false;
this->radioButton4->Visible=false;
this->label1->Visible=false;
this->richTextBox1->LoadFile(L"Labs/Lr1.rtf");
}
private: System::Void button18_Click(System::Object^ sender, System::EventArgs^ e) {
MessageBox::Show("Для выполнения задания должны быть изучены лекции 1 - 2","Внимание!", MessageBoxButtons::OK,MessageBoxIcon::Question);
this->groupBox1->Visible=false;
this->groupBox2->Visible=false;
this->groupBox3->Visible=false;
num=10;
this->richTextBox1->Visible=true;
this->richTextBox2->Visible=false;
this->button1->Visible=false;
this->radioButton1->Visible=false;
this->radioButton2->Visible=false;
this->radioButton3->Visible=false;
this->radioButton4->Visible=false;
this->label1->Visible=false;
this->richTextBox1->LoadFile(L"Labs/Lr2.rtf");
}
private: System::Void button17_Click(System::Object^ sender, System::EventArgs^ e) {
MessageBox::Show("Для выполнения задания должны быть изучены лекции 2 - 3","Внимание!", MessageBoxButtons::OK,MessageBoxIcon::Question);
this->groupBox1->Visible=false;
this->groupBox2->Visible=false;
this->groupBox3->Visible=false;
num=10;
this->richTextBox1->Visible=true;
this->richTextBox2->Visible=false;
this->button1->Visible=false;
this->radioButton1->Visible=false;
this->radioButton2->Visible=false;
this->radioButton3->Visible=false;
this->radioButton4->Visible=false;
this->label1->Visible=false;
this->richTextBox1->LoadFile(L"Labs/Lr3.rtf");
}
private: System::Void button16_Click(System::Object^ sender, System::EventArgs^ e) {
MessageBox::Show("Для выполнения задания должны быть изучены лекции 2 - 3","Внимание!", MessageBoxButtons::OK,MessageBoxIcon::Question);
this->groupBox1->Visible=false;
this->groupBox2->Visible=false;
this->groupBox3->Visible=false;
num=10;
this->richTextBox1->Visible=true;
this->richTextBox2->Visible=false;
this->button1->Visible=false;
this->radioButton1->Visible=false;
this->radioButton2->Visible=false;
this->radioButton3->Visible=false;
this->radioButton4->Visible=false;
this->label1->Visible=false;
this->richTextBox1->LoadFile(L"Labs/Lr4.rtf");
}
private: System::Void button15_Click(System::Object^ sender, System::EventArgs^ e) {
MessageBox::Show("Для выполнения задания должны быть изучены лекции 3 - 4","Внимание!", MessageBoxButtons::OK,MessageBoxIcon::Question);
this->groupBox1->Visible=false;
this->groupBox2->Visible=false;
this->groupBox3->Visible=false;
num=10;
this->richTextBox1->Visible=true;
this->richTextBox2->Visible=false;
this->button1->Visible=false;
this->radioButton1->Visible=false;
this->radioButton2->Visible=false;
this->radioButton3->Visible=false;
this->radioButton4->Visible=false;
this->label1->Visible=false;
this->richTextBox1->LoadFile(L"Labs/Lr5.rtf");
}
private: System::Void button14_Click(System::Object^ sender, System::EventArgs^ e) {
MessageBox::Show("Для выполнения задания должны быть изучены лекции 3 - 4","Внимание!", MessageBoxButtons::OK,MessageBoxIcon::Question);
this->groupBox1->Visible=false;
this->groupBox2->Visible=false;
this->groupBox3->Visible=false;
num=10;
this->richTextBox1->Visible=true;
this->richTextBox2->Visible=false;
this->button1->Visible=false;
this->radioButton1->Visible=false;
this->radioButton2->Visible=false;
this->radioButton3->Visible=false;
this->radioButton4->Visible=false;
this->label1->Visible=false;
this->richTextBox1->LoadFile(L"Labs/Lr6.rtf"); }
private: System::Void button13_Click(System::Object^ sender, System::EventArgs^ e) {
MessageBox::Show("Для выполнения задания должны быть изучены лекции 4 - 5","Внимание!", MessageBoxButtons::OK,MessageBoxIcon::Question);
this->groupBox1->Visible=false;
this->groupBox2->Visible=false;
this->groupBox3->Visible=false;
num=10;
this->richTextBox1->Visible=true;
this->richTextBox2->Visible=false;
this->button1->Visible=false;
this->radioButton1->Visible=false;
this->radioButton2->Visible=false;
this->radioButton3->Visible=false;
this->radioButton4->Visible=false;
this->label1->Visible=false;
this->richTextBox1->LoadFile(L"Labs/Lr7.rtf");
}
private: System::Void button12_Click(System::Object^ sender, System::EventArgs^ e) {
MessageBox::Show("Для выполнения задания должны быть изучены лекции 4 - 5","Внимание!", MessageBoxButtons::OK,MessageBoxIcon::Question);
this->groupBox1->Visible=false;
this->groupBox2->Visible=false;
this->groupBox3->Visible=false;
num=10;
this->richTextBox1->Visible=true;
this->richTextBox2->Visible=false;
this->button1->Visible=false;
this->radioButton1->Visible=false;
this->radioButton2->Visible=false;
this->radioButton3->Visible=false;
this->radioButton4->Visible=false;
this->label1->Visible=false;
this->richTextBox1->LoadFile(L"Labs/Lr8.rtf");
}
private: System::Void button11_Click(System::Object^ sender, System::EventArgs^ e) {
MessageBox::Show("Для выполнения задания должны быть изучены лекции 5 - 6","Внимание!", MessageBoxButtons::OK,MessageBoxIcon::Question);
this->groupBox1->Visible=false;
this->groupBox2->Visible=false;
this->groupBox3->Visible=false;
num=10;
this->richTextBox1->Visible=true;
this->richTextBox2->Visible=false;
this->button1->Visible=false;
this->radioButton1->Visible=false;
this->radioButton2->Visible=false;
this->radioButton3->Visible=false;
this->radioButton4->Visible=false;
this->label1->Visible=false;
this->richTextBox1->LoadFile(L"Labs/Lr9.rtf");
}
private: System::Void button25_Click(System::Object^ sender, System::EventArgs^ e) {
MessageBox::Show("Для выполнения задания должны быть изучены лекции 5 - 6","Внимание!", MessageBoxButtons::OK,MessageBoxIcon::Question);
this->groupBox1->Visible=false;
this->groupBox2->Visible=false;
this->groupBox3->Visible=false;
num=10;
this->richTextBox1->Visible=true;
this->richTextBox2->Visible=false;
this->button1->Visible=false;
this->radioButton1->Visible=false;
this->radioButton2->Visible=false;
this->radioButton3->Visible=false;
this->radioButton4->Visible=false;
this->label1->Visible=false;
this->richTextBox1->LoadFile(L"Labs/Lr10.rtf");
}
private: System::Void button24_Click(System::Object^ sender, System::EventArgs^ e) {
MessageBox::Show("Для выполнения задания должны быть изучены лекции 6 - 7","Внимание!", MessageBoxButtons::OK,MessageBoxIcon::Question);
this->groupBox1->Visible=false;
this->groupBox2->Visible=false;
this->groupBox3->Visible=false;
num=10;
this->richTextBox1->Visible=true;
this->richTextBox2->Visible=false;
this->button1->Visible=false;
this->radioButton1->Visible=false;
this->radioButton2->Visible=false;
this->radioButton3->Visible=false;
this->radioButton4->Visible=false;
this->label1->Visible=false;
this->richTextBox1->LoadFile(L"Labs/Lr11.rtf");
}
private: System::Void button23_Click(System::Object^ sender, System::EventArgs^ e) {
MessageBox::Show("Для выполнения задания должны быть изучены лекции 6 - 7","Внимание!", MessageBoxButtons::OK,MessageBoxIcon::Question);
this->groupBox1->Visible=false;
this->groupBox2->Visible=false;
this->groupBox3->Visible=false;
num=10;
this->richTextBox1->Visible=true;
this->richTextBox2->Visible=false;
this->button1->Visible=false;
this->radioButton1->Visible=false;
this->radioButton2->Visible=false;
this->radioButton3->Visible=false;
this->radioButton4->Visible=false;
this->label1->Visible=false;
this->richTextBox1->LoadFile(L"Labs/Lr12.rtf");
}
private: System::Void button22_Click(System::Object^ sender, System::EventArgs^ e) {
MessageBox::Show("Для выполнения задания должны быть изучены лекции 7 - 8","Внимание!", MessageBoxButtons::OK,MessageBoxIcon::Question);
this->groupBox1->Visible=false;
this->groupBox2->Visible=false;
this->groupBox3->Visible=false;
num=10;
this->richTextBox1->Visible=true;
this->richTextBox2->Visible=false;
this->button1->Visible=false;
this->radioButton1->Visible=false;
this->radioButton2->Visible=false;
this->radioButton3->Visible=false;
this->radioButton4->Visible=false;
this->label1->Visible=false;
this->richTextBox1->LoadFile(L"Labs/Lr13.rtf");
}
private: System::Void button21_Click(System::Object^ sender, System::EventArgs^ e) {
MessageBox::Show("Для выполнения задания должны быть изучены лекции 7 - 8","Внимание!", MessageBoxButtons::OK,MessageBoxIcon::Question);
this->groupBox1->Visible=false;
this->groupBox2->Visible=false;
this->groupBox3->Visible=false;
num=10;
this->richTextBox1->Visible=true;
this->richTextBox2->Visible=false;
this->button1->Visible=false;
this->radioButton1->Visible=false;
this->radioButton2->Visible=false;
this->radioButton3->Visible=false;
this->radioButton4->Visible=false;
this->label1->Visible=false;
this->richTextBox1->LoadFile(L"Labs/Lr14.rtf");
}
private: System::Void button20_Click(System::Object^ sender, System::EventArgs^ e) {
MessageBox::Show("Для выполнения задания должны быть изучены лекции 8 - 9","Внимание!", MessageBoxButtons::OK,MessageBoxIcon::Question);
this->groupBox1->Visible=false;
this->groupBox2->Visible=false;
this->groupBox3->Visible=false;
num=10;
this->richTextBox1->Visible=true;
this->richTextBox2->Visible=false;
this->button1->Visible=false;
this->radioButton1->Visible=false;
this->radioButton2->Visible=false;
this->radioButton3->Visible=false;
this->radioButton4->Visible=false;
this->label1->Visible=false;
this->richTextBox1->LoadFile(L"Labs/Lr15.rtf");
}
private: System::Void button28_Click(System::Object^ sender, System::EventArgs^ e) {
MessageBox::Show("Для прохождения теста должны быть изучены лекции 1 - 3","Внимание!", MessageBoxButtons::OK,MessageBoxIcon::Question);
this->groupBox1->Visible=false;
this->groupBox2->Visible=false;
this->groupBox3->Visible=false;
int m,n;
this->button1->Enabled=true;
k=0;
this->label1->Visible=false;
this->richTextBox1->Visible=false;
this->richTextBox2->Visible=true;
this->button1->Visible=true;
this->radioButton1->Visible=true;
this->radioButton2->Visible=true;
this->radioButton3->Visible=true;
this->radioButton4->Visible=true;
radioButton1->Checked = false;
radioButton2->Checked = false;
radioButton3->Checked = false;
radioButton4->Checked = false;
i=0;
srand(time(NULL));
m=1+rand()%20;
n=m-1;
this->richTextBox1->LoadFile(L"Test/Test1.rtf");
this->richTextBox2->Text=this->richTextBox1->Lines[6*n];
this->radioButton1->Text=this->richTextBox1->Lines[6*n+1];
this->radioButton2->Text=this->richTextBox1->Lines[6*n+2];
this->radioButton3->Text=this->richTextBox1->Lines[6*n+3];
this->radioButton4->Text=this->richTextBox1->Lines[6*n+4];
o=Convert::ToInt32(this->richTextBox1->Lines[6*n+5]);
}
private: System::Void button27_Click(System::Object^ sender, System::EventArgs^ e) {
MessageBox::Show("Для прохождения теста должны быть изучены лекции 4 - 6","Внимание!", MessageBoxButtons::OK,MessageBoxIcon::Question);
this->groupBox1->Visible=false;
this->groupBox2->Visible=false;
this->groupBox3->Visible=false;
int m,n;
this->button1->Enabled=true;
k=0;
this->label1->Visible=false;
this->richTextBox1->Visible=false;
this->richTextBox2->Visible=true;
this->button1->Visible=true;
this->radioButton1->Visible=true;
this->radioButton2->Visible=true;
this->radioButton3->Visible=true;
this->radioButton4->Visible=true;
radioButton1->Checked = false;
radioButton2->Checked = false;
radioButton3->Checked = false;
radioButton4->Checked = false;
i=0;
srand(time(NULL));
m=1+rand()%20;
n=m-1;
this->richTextBox1->LoadFile(L"Test/Test2.rtf");
this->richTextBox2->Text=this->richTextBox1->Lines[6*n];
this->radioButton1->Text=this->richTextBox1->Lines[6*n+1];
this->radioButton2->Text=this->richTextBox1->Lines[6*n+2];
this->radioButton3->Text=this->richTextBox1->Lines[6*n+3];
this->radioButton4->Text=this->richTextBox1->Lines[6*n+4];
o=Convert::ToInt32(this->richTextBox1->Lines[6*n+5]);
}
private: System::Void button26_Click(System::Object^ sender, System::EventArgs^ e) {
MessageBox::Show("Для прохождения теста должны быть изучены лекции 7 - 9","Внимание!", MessageBoxButtons::OK,MessageBoxIcon::Question);