4DM3M

Menu.h

Jan 7th, 2021
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 4.07 KB | None | 0 0
  1. #pragma once
  2. #include "Real.h"
  3. #include "Info.h"
  4. namespace LR2813 {
  5.  
  6.     using namespace System;
  7.     using namespace System::ComponentModel;
  8.     using namespace System::Collections;
  9.     using namespace System::Windows::Forms;
  10.     using namespace System::Data;
  11.     using namespace System::Drawing;
  12.  
  13.     /// <summary>
  14.     /// Сводка для MyForm
  15.     /// </summary>
  16.     public ref class MyForm : public System::Windows::Forms::Form
  17.     {
  18.     public:
  19.         MyForm(void)
  20.         {
  21.             InitializeComponent();
  22.             //
  23.             //TODO: добавьте код конструктора
  24.             //
  25.         }
  26.  
  27.     protected:
  28.         /// <summary>
  29.         /// Освободить все используемые ресурсы.
  30.         /// </summary>
  31.         ~MyForm()
  32.         {
  33.             if (components)
  34.             {
  35.                 delete components;
  36.             }
  37.         }
  38.     private: System::Windows::Forms::Button^ Realization;
  39.     private: System::Windows::Forms::Button^ ButtonInfo;
  40.  
  41.     private: System::Windows::Forms::Button^ CloseButton;
  42.  
  43.  
  44.     protected:
  45.  
  46.     private:
  47.         /// <summary>
  48.         /// Обязательная переменная конструктора.
  49.         /// </summary>
  50.         System::ComponentModel::Container ^components;
  51.  
  52. #pragma region Windows Form Designer generated code
  53.         /// <summary>
  54.         /// Требуемый метод для поддержки конструктора — не изменяйте
  55.         /// содержимое этого метода с помощью редактора кода.
  56.         /// </summary>
  57.         void InitializeComponent(void)
  58.         {
  59.             this->Realization = (gcnew System::Windows::Forms::Button());
  60.             this->ButtonInfo = (gcnew System::Windows::Forms::Button());
  61.             this->CloseButton = (gcnew System::Windows::Forms::Button());
  62.             this->SuspendLayout();
  63.             //
  64.             // Realization
  65.             //
  66.             this->Realization->Location = System::Drawing::Point(188, 214);
  67.             this->Realization->Name = L"Realization";
  68.             this->Realization->Size = System::Drawing::Size(165, 58);
  69.             this->Realization->TabIndex = 0;
  70.             this->Realization->Text = L"Реализация";
  71.             this->Realization->UseVisualStyleBackColor = true;
  72.             this->Realization->Click += gcnew System::EventHandler(this, &MyForm::Realization_Click);
  73.             //
  74.             // ButtonInfo
  75.             //
  76.             this->ButtonInfo->Location = System::Drawing::Point(188, 150);
  77.             this->ButtonInfo->Name = L"ButtonInfo";
  78.             this->ButtonInfo->Size = System::Drawing::Size(165, 58);
  79.             this->ButtonInfo->TabIndex = 1;
  80.             this->ButtonInfo->Text = L"Условие";
  81.             this->ButtonInfo->UseVisualStyleBackColor = true;
  82.             this->ButtonInfo->Click += gcnew System::EventHandler(this, &MyForm::ButtonInfo_Click);
  83.             //
  84.             // CloseButton
  85.             //
  86.             this->CloseButton->Location = System::Drawing::Point(188, 278);
  87.             this->CloseButton->Name = L"CloseButton";
  88.             this->CloseButton->Size = System::Drawing::Size(165, 58);
  89.             this->CloseButton->TabIndex = 2;
  90.             this->CloseButton->Text = L"Выход";
  91.             this->CloseButton->UseVisualStyleBackColor = true;
  92.             this->CloseButton->Click += gcnew System::EventHandler(this, &MyForm::CloseButton_Click);
  93.             //
  94.             // MyForm
  95.             //
  96.             this->AutoScaleDimensions = System::Drawing::SizeF(8, 16);
  97.             this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
  98.             this->BackColor = System::Drawing::SystemColors::ControlDark;
  99.             this->ClientSize = System::Drawing::Size(561, 481);
  100.             this->Controls->Add(this->CloseButton);
  101.             this->Controls->Add(this->ButtonInfo);
  102.             this->Controls->Add(this->Realization);
  103.             this->MaximizeBox = false;
  104.             this->MinimizeBox = false;
  105.             this->Name = L"MyForm";
  106.             this->ShowInTaskbar = false;
  107.             this->Text = L"Лабораторая работа №28";
  108.             this->ResumeLayout(false);
  109.  
  110.         }
  111. #pragma endregion
  112.     private: System::Void Realization_Click(System::Object^ sender, System::EventArgs^ e) {
  113.         Real^ f2 = gcnew Real();
  114.         f2->Show();
  115.         f2->Owner = this;
  116.         MyForm::Hide();
  117.     }
  118.     private: System::Void CloseButton_Click(System::Object^ sender, System::EventArgs^ e) {
  119.         this->Close();
  120.     }
  121.     private: System::Void ButtonInfo_Click(System::Object^ sender, System::EventArgs^ e) {
  122.         Info^ f3 = gcnew Info();
  123.         f3->Show();
  124.         f3->Owner = this;
  125.         MyForm::Hide();
  126.     }
  127. };
  128. }
  129.  
Advertisement
Add Comment
Please, Sign In to add comment