Файл: Основные понятия объектно-ориентированного программирования (Этапы объектно-ориентированного).pdf

ВУЗ: Не указан

Категория: Курсовая работа

Дисциплина: Не указана

Добавлен: 28.03.2023

Просмотров: 478

Скачиваний: 3

ВНИМАНИЕ! Если данный файл нарушает Ваши авторские права, то обязательно сообщите нам.

(cli::safe_cast<System::ComponentModel::ISupportInitialize^>(this->pictureBox14))->BeginInit();

(cli::safe_cast<System::ComponentModel::ISupportInitialize^>(this->pictureBox15))->BeginInit();

this->groupBox1->SuspendLayout();

this->SuspendLayout();

//

// button1

//

this->button1->Location = System::Drawing::Point(30, 121);

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, &MyForm::button1_Click);

//

// backgroundWorker1

//

this->backgroundWorker1->DoWork += gcnew System::ComponentModel::DoWorkEventHandler(this, &MyForm::backgroundWorker1_DoWork);

//

// pictureBox1

//

this->pictureBox1->BackColor = System::Drawing::Color::Transparent;

this->pictureBox1->Image = (cli::safe_cast<System::Drawing::Image^>(resources->GetObject(L"pictureBox1.Image")));

this->pictureBox1->InitialImage = nullptr;

this->pictureBox1->Location = System::Drawing::Point(247, 316);

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

this->pictureBox1->Size = System::Drawing::Size(38, 72);

this->pictureBox1->SizeMode = System::Windows::Forms::PictureBoxSizeMode::Zoom;

this->pictureBox1->TabIndex = 1;

this->pictureBox1->TabStop = false;

//

// pictureBox2

//

this->pictureBox2->BackColor = System::Drawing::Color::Transparent;

this->pictureBox2->Image = (cli::safe_cast<System::Drawing::Image^>(resources->GetObject(L"pictureBox2.Image")));

this->pictureBox2->Location = System::Drawing::Point(208, 229);

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

this->pictureBox2->Size = System::Drawing::Size(118, 81);

this->pictureBox2->SizeMode = System::Windows::Forms::PictureBoxSizeMode::Zoom;

this->pictureBox2->TabIndex = 2;

this->pictureBox2->TabStop = false;

//

// pictureBox3

//

this->pictureBox3->BackColor = System::Drawing::Color::Transparent;

this->pictureBox3->Image = (cli::safe_cast<System::Drawing::Image^>(resources->GetObject(L"pictureBox3.Image")));

this->pictureBox3->Location = System::Drawing::Point(235, 171);

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

this->pictureBox3->Size = System::Drawing::Size(75, 52);

this->pictureBox3->SizeMode = System::Windows::Forms::PictureBoxSizeMode::Zoom;

this->pictureBox3->TabIndex = 3;

this->pictureBox3->TabStop = false;

//

// label1

//

this->label1->AutoSize = true;

this->label1->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point,

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

this->label1->Location = System::Drawing::Point(260, 188);

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

this->label1->Size = System::Drawing::Size(57, 20);

this->label1->TabIndex = 4;

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

//

// label2

//

this->label2->AutoSize = true;

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

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

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

this->label2->TabIndex = 5;

this->label2->Text = L"Количество этажей в дом";

//

// textBox1

//

this->textBox1->Location = System::Drawing::Point(172, 13);

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

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

this->textBox1->TabIndex = 6;

//

// label3

//

this->label3->AutoSize = true;

this->label3->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point,

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

this->label3->Location = System::Drawing::Point(52, 188);


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

this->label3->Size = System::Drawing::Size(57, 20);

this->label3->TabIndex = 8;

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

//

// pictureBox4

//

this->pictureBox4->BackColor = System::Drawing::Color::Transparent;

this->pictureBox4->Image = (cli::safe_cast<System::Drawing::Image^>(resources->GetObject(L"pictureBox4.Image")));

this->pictureBox4->Location = System::Drawing::Point(30, 171);

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

this->pictureBox4->Size = System::Drawing::Size(75, 52);

this->pictureBox4->SizeMode = System::Windows::Forms::PictureBoxSizeMode::Zoom;

this->pictureBox4->TabIndex = 7;

this->pictureBox4->TabStop = false;

//

// pictureBox5

//

this->pictureBox5->BackColor = System::Drawing::Color::Transparent;

this->pictureBox5->Image = (cli::safe_cast<System::Drawing::Image^>(resources->GetObject(L"pictureBox5.Image")));

this->pictureBox5->Location = System::Drawing::Point(30, 238);

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

this->pictureBox5->Size = System::Drawing::Size(80, 50);

this->pictureBox5->SizeMode = System::Windows::Forms::PictureBoxSizeMode::Zoom;

this->pictureBox5->TabIndex = 9;

this->pictureBox5->TabStop = false;

//

// pictureBox6

//

this->pictureBox6->Image = (cli::safe_cast<System::Drawing::Image^>(resources->GetObject(L"pictureBox6.Image")));

this->pictureBox6->Location = System::Drawing::Point(30, 238);

this->pictureBox6->Margin = System::Windows::Forms::Padding(0);

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

this->pictureBox6->Size = System::Drawing::Size(80, 50);

this->pictureBox6->SizeMode = System::Windows::Forms::PictureBoxSizeMode::Zoom;

this->pictureBox6->TabIndex = 10;

this->pictureBox6->TabStop = false;

//

// pictureBox7

//

this->pictureBox7->Image = (cli::safe_cast<System::Drawing::Image^>(resources->GetObject(L"pictureBox7.Image")));

this->pictureBox7->Location = System::Drawing::Point(402, 238);

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

this->pictureBox7->Size = System::Drawing::Size(79, 50);

this->pictureBox7->SizeMode = System::Windows::Forms::PictureBoxSizeMode::Zoom;

this->pictureBox7->TabIndex = 11;

this->pictureBox7->TabStop = false;

//

// pictureBox8

//

this->pictureBox8->Image = (cli::safe_cast<System::Drawing::Image^>(resources->GetObject(L"pictureBox8.Image")));

this->pictureBox8->Location = System::Drawing::Point(402, 238);

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

this->pictureBox8->Size = System::Drawing::Size(79, 50);

this->pictureBox8->SizeMode = System::Windows::Forms::PictureBoxSizeMode::Zoom;

this->pictureBox8->TabIndex = 12;

this->pictureBox8->TabStop = false;

//

// label4

//

this->label4->AutoSize = true;

this->label4->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point,

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

this->label4->Location = System::Drawing::Point(430, 251);

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

this->label4->Size = System::Drawing::Size(57, 20);

this->label4->TabIndex = 13;

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

//

// pictureBox9

//

this->pictureBox9->Image = (cli::safe_cast<System::Drawing::Image^>(resources->GetObject(L"pictureBox9.Image")));

this->pictureBox9->Location = System::Drawing::Point(208, 229);

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

this->pictureBox9->Size = System::Drawing::Size(59, 81);

this->pictureBox9->SizeMode = System::Windows::Forms::PictureBoxSizeMode::StretchImage;

this->pictureBox9->TabIndex = 14;

this->pictureBox9->TabStop = false;

//

// pictureBox10

//

this->pictureBox10->Image = (cli::safe_cast<System::Drawing::Image^>(resources->GetObject(L"pictureBox10.Image")));


this->pictureBox10->Location = System::Drawing::Point(21, 229);

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

this->pictureBox10->Size = System::Drawing::Size(100, 67);

this->pictureBox10->TabIndex = 15;

this->pictureBox10->TabStop = false;

//

// pictureBox11

//

this->pictureBox11->Image = (cli::safe_cast<System::Drawing::Image^>(resources->GetObject(L"pictureBox11.Image")));

this->pictureBox11->Location = System::Drawing::Point(316, 173);

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

this->pictureBox11->Size = System::Drawing::Size(32, 50);

this->pictureBox11->SizeMode = System::Windows::Forms::PictureBoxSizeMode::Zoom;

this->pictureBox11->TabIndex = 16;

this->pictureBox11->TabStop = false;

//

// pictureBox12

//

this->pictureBox12->Image = (cli::safe_cast<System::Drawing::Image^>(resources->GetObject(L"pictureBox12.Image")));

this->pictureBox12->Location = System::Drawing::Point(197, 173);

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

this->pictureBox12->Size = System::Drawing::Size(32, 50);

this->pictureBox12->SizeMode = System::Windows::Forms::PictureBoxSizeMode::Zoom;

this->pictureBox12->TabIndex = 17;

this->pictureBox12->TabStop = false;

//

// label5

//

this->label5->AutoSize = true;

this->label5->Location = System::Drawing::Point(12, 42);

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

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

this->label5->TabIndex = 18;

this->label5->Text = L"Количество пассажиров";

//

// textBox2

//

this->textBox2->Location = System::Drawing::Point(172, 39);

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

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

this->textBox2->TabIndex = 19;

//

// pictureBox13

//

this->pictureBox13->Image = (cli::safe_cast<System::Drawing::Image^>(resources->GetObject(L"pictureBox13.Image")));

this->pictureBox13->Location = System::Drawing::Point(267, 229);

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

this->pictureBox13->Size = System::Drawing::Size(59, 81);

this->pictureBox13->SizeMode = System::Windows::Forms::PictureBoxSizeMode::StretchImage;

this->pictureBox13->TabIndex = 20;

this->pictureBox13->TabStop = false;

//

// pictureBox14

//

this->pictureBox14->Image = (cli::safe_cast<System::Drawing::Image^>(resources->GetObject(L"pictureBox14.Image")));

this->pictureBox14->Location = System::Drawing::Point(327, 229);

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

this->pictureBox14->Size = System::Drawing::Size(64, 81);

this->pictureBox14->TabIndex = 21;

this->pictureBox14->TabStop = false;

//

// pictureBox15

//

this->pictureBox15->Image = (cli::safe_cast<System::Drawing::Image^>(resources->GetObject(L"pictureBox15.Image")));

this->pictureBox15->Location = System::Drawing::Point(143, 229);

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

this->pictureBox15->Size = System::Drawing::Size(64, 81);

this->pictureBox15->TabIndex = 22;

this->pictureBox15->TabStop = false;

//

// label6

//

this->label6->AutoSize = true;

this->label6->Location = System::Drawing::Point(12, 65);

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

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

this->label6->TabIndex = 23;

this->label6->Text = L"Прошло";

//

// label7

//

this->label7->AutoSize = true;

this->label7->Location = System::Drawing::Point(172, 65);

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

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

this->label7->TabIndex = 24;

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

//

// groupBox1

//

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

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


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

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

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

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

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

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

this->groupBox1->Location = System::Drawing::Point(278, 12);

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

this->groupBox1->Size = System::Drawing::Size(280, 132);

this->groupBox1->TabIndex = 25;

this->groupBox1->TabStop = false;

this->groupBox1->Text = L"Время";

//

// textBox6

//

this->textBox6->Location = System::Drawing::Point(174, 105);

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

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

this->textBox6->TabIndex = 27;

//

// label11

//

this->label11->AutoSize = true;

this->label11->Location = System::Drawing::Point(6, 108);

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

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

this->label11->TabIndex = 26;

this->label11->Text = L"Работа лифта";

//

// textBox5

//

this->textBox5->Location = System::Drawing::Point(174, 79);

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

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

this->textBox5->TabIndex = 25;

//

// label10

//

this->label10->AutoSize = true;

this->label10->Location = System::Drawing::Point(6, 82);

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

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

this->label10->TabIndex = 24;

this->label10->Text = L"Открытие \\ закрытие дверей";

//

// textBox4

//

this->textBox4->Location = System::Drawing::Point(174, 53);

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

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

this->textBox4->TabIndex = 23;

//

// label9

//

this->label9->AutoSize = true;

this->label9->Location = System::Drawing::Point(6, 56);

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

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

this->label9->TabIndex = 22;

this->label9->Text = L"Вкл \\ выкл кнопок";

//

// textBox3

//

this->textBox3->Location = System::Drawing::Point(174, 27);

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

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

this->textBox3->TabIndex = 21;

//

// label8

//

this->label8->AutoSize = true;

this->label8->Location = System::Drawing::Point(6, 30);

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

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

this->label8->TabIndex = 20;

this->label8->Text = L"Вход \\ выход пассажира";

//

// MyForm

//

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

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

this->ClientSize = System::Drawing::Size(570, 391);

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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

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

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

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

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

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

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

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

this->ForeColor = System::Drawing::SystemColors::ControlText;

this->Name = L"MyForm";

this->Text = L"Lift";

this->Load += gcnew System::EventHandler(this, &MyForm::MyForm_Load);

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

this->groupBox1->ResumeLayout(false);

this->groupBox1->PerformLayout();

this->ResumeLayout(false);

this->PerformLayout();

}

#pragma endregion

// объявление делегата для функции SumPassenger

public: delegate void dSumPassenger(int);

// объявление функции SumPassenger

public: void SumPassenger(int k)

{

// Функция для отображения колличества пассажиров по форме

textBox2->Text = Convert::ToString(k);

}

// объявление делегата для функции dPassengerAction

public: delegate void dPassengerAction(int);

// объявление функции dPassengerAction

public: void PassengerAction(int k)

{

// Функция для передвижения пассажира по форме

int i; // переменная для движения пассажира

if (k < 0) { //если параметр больше 0, то переменная отрицательная

i = -1;

}

else { i = 1; }//иначе переменная положительная

pictureBox1->Location = Point(pictureBox1->Location.X, pictureBox1->Location.Y + i);// передвижение фигуры на форме

}

// объявление делегата для функции ButtonLift

public: delegate void dButtonLift(int,bool);

// объявление функции ButtonLift

public: void ButtounLift(int needFloor, bool status)

{

//функция для отображение нужного этажа на кнопке в лифте

//и для отображения этажа с пассажиром

if (status) {// если переменная True

label4->Visible = true; // сделать номер нужного этажа видимым

label4->Text = Convert::ToString(needFloor); // Конвертирование число в строку