Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma once
- #include <string>
- namespace srednia {
- 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 MyForm
- /// </summary>
- public ref class MyForm : public System::Windows::Forms::Form
- {
- public:
- double A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P;
- int ile_liczb = 1;
- double *wskaznik;
- int numer = 1;
- double suma = A + B + C + D + E + F + G + H + I + J + K + L + M + N + O + P;
- double wynik = suma / ile_liczb;
- double test = 8;
- MyForm(void)
- {
- InitializeComponent();
- //
- //TODO: Add the constructor code here
- //
- }
- protected:
- /// <summary>
- /// Clean up any resources being used.
- /// </summary>
- ~MyForm()
- {
- if (components)
- {
- delete components;
- }
- }
- private: System::Windows::Forms::Button^ Ocena1;
- private: System::Windows::Forms::Button^ Ocena3;
- private: System::Windows::Forms::Button^ Ocena4;
- private: System::Windows::Forms::Button^ Ocena5;
- private: System::Windows::Forms::Button^ Ocena6;
- protected:
- private: System::Windows::Forms::Button^ Ocena2;
- private: System::Windows::Forms::Button^ Ocena15;
- private: System::Windows::Forms::Button^ Ocena25;
- private: System::Windows::Forms::Button^ Ocena35;
- private: System::Windows::Forms::Button^ Ocena45;
- private: System::Windows::Forms::Button^ Ocena55;
- private: System::Windows::Forms::Button^ Poprzedni;
- private: System::Windows::Forms::Button^ Nastepny;
- private: System::Windows::Forms::Label^ r_A;
- private: System::Windows::Forms::Label^ r_B;
- private: System::Windows::Forms::Label^ r_C;
- private: System::Windows::Forms::Label^ r_D;
- private: System::Windows::Forms::Label^ r_E;
- private: System::Windows::Forms::Label^ r_F;
- private: System::Windows::Forms::Label^ r_G;
- private: System::Windows::Forms::Label^ r_H;
- private: System::Windows::Forms::Label^ r_I;
- private: System::Windows::Forms::Label^ r_J;
- private: System::Windows::Forms::Label^ r_K;
- private: System::Windows::Forms::Label^ r_L;
- private: System::Windows::Forms::Label^ r_M;
- private: System::Windows::Forms::Label^ r_N;
- private: System::Windows::Forms::Label^ r_O;
- private: System::Windows::Forms::Label^ r_P;
- private: System::Windows::Forms::Label^ Napis;
- private: System::Windows::Forms::Label^ Wynik;
- private: System::Windows::Forms::Button^ Reset;
- private: System::Windows::Forms::Label^ A_suma;
- private: System::Windows::Forms::Label^ A_ile;
- private: System::ComponentModel::IContainer^ components;
- protected:
- private:
- /// <summary>
- /// Required designer variable.
- /// </summary>
- #pragma region Windows Form Designer generated code
- /// <summary>
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- /// </summary>
- void InitializeComponent(void)
- {
- System::ComponentModel::ComponentResourceManager^ resources = (gcnew System::ComponentModel::ComponentResourceManager(MyForm::typeid));
- this->Ocena1 = (gcnew System::Windows::Forms::Button());
- this->Ocena2 = (gcnew System::Windows::Forms::Button());
- this->Ocena3 = (gcnew System::Windows::Forms::Button());
- this->Ocena4 = (gcnew System::Windows::Forms::Button());
- this->Ocena5 = (gcnew System::Windows::Forms::Button());
- this->Ocena6 = (gcnew System::Windows::Forms::Button());
- this->Ocena15 = (gcnew System::Windows::Forms::Button());
- this->Ocena25 = (gcnew System::Windows::Forms::Button());
- this->Ocena35 = (gcnew System::Windows::Forms::Button());
- this->Ocena45 = (gcnew System::Windows::Forms::Button());
- this->Ocena55 = (gcnew System::Windows::Forms::Button());
- this->Poprzedni = (gcnew System::Windows::Forms::Button());
- this->Nastepny = (gcnew System::Windows::Forms::Button());
- this->r_A = (gcnew System::Windows::Forms::Label());
- this->r_B = (gcnew System::Windows::Forms::Label());
- this->r_C = (gcnew System::Windows::Forms::Label());
- this->r_D = (gcnew System::Windows::Forms::Label());
- this->r_E = (gcnew System::Windows::Forms::Label());
- this->r_F = (gcnew System::Windows::Forms::Label());
- this->r_G = (gcnew System::Windows::Forms::Label());
- this->r_H = (gcnew System::Windows::Forms::Label());
- this->r_I = (gcnew System::Windows::Forms::Label());
- this->r_J = (gcnew System::Windows::Forms::Label());
- this->r_K = (gcnew System::Windows::Forms::Label());
- this->r_L = (gcnew System::Windows::Forms::Label());
- this->r_M = (gcnew System::Windows::Forms::Label());
- this->r_N = (gcnew System::Windows::Forms::Label());
- this->r_O = (gcnew System::Windows::Forms::Label());
- this->r_P = (gcnew System::Windows::Forms::Label());
- this->Napis = (gcnew System::Windows::Forms::Label());
- this->Wynik = (gcnew System::Windows::Forms::Label());
- this->Reset = (gcnew System::Windows::Forms::Button());
- this->A_suma = (gcnew System::Windows::Forms::Label());
- this->A_ile = (gcnew System::Windows::Forms::Label());
- this->SuspendLayout();
- //
- // Ocena1
- //
- this->Ocena1->Cursor = System::Windows::Forms::Cursors::Hand;
- resources->ApplyResources(this->Ocena1, L"Ocena1");
- this->Ocena1->Name = L"Ocena1";
- this->Ocena1->UseVisualStyleBackColor = true;
- this->Ocena1->Click += gcnew System::EventHandler(this, &MyForm::Ocena1_Click);
- //
- // Ocena2
- //
- this->Ocena2->Cursor = System::Windows::Forms::Cursors::Hand;
- resources->ApplyResources(this->Ocena2, L"Ocena2");
- this->Ocena2->Name = L"Ocena2";
- this->Ocena2->UseVisualStyleBackColor = true;
- //
- // Ocena3
- //
- this->Ocena3->Cursor = System::Windows::Forms::Cursors::Hand;
- resources->ApplyResources(this->Ocena3, L"Ocena3");
- this->Ocena3->Name = L"Ocena3";
- this->Ocena3->UseVisualStyleBackColor = true;
- //
- // Ocena4
- //
- this->Ocena4->Cursor = System::Windows::Forms::Cursors::Hand;
- resources->ApplyResources(this->Ocena4, L"Ocena4");
- this->Ocena4->Name = L"Ocena4";
- this->Ocena4->UseVisualStyleBackColor = true;
- //
- // Ocena5
- //
- this->Ocena5->Cursor = System::Windows::Forms::Cursors::Hand;
- resources->ApplyResources(this->Ocena5, L"Ocena5");
- this->Ocena5->Name = L"Ocena5";
- this->Ocena5->UseVisualStyleBackColor = true;
- //
- // Ocena6
- //
- this->Ocena6->Cursor = System::Windows::Forms::Cursors::Hand;
- resources->ApplyResources(this->Ocena6, L"Ocena6");
- this->Ocena6->Name = L"Ocena6";
- this->Ocena6->UseVisualStyleBackColor = true;
- //
- // Ocena15
- //
- this->Ocena15->Cursor = System::Windows::Forms::Cursors::Hand;
- resources->ApplyResources(this->Ocena15, L"Ocena15");
- this->Ocena15->Name = L"Ocena15";
- this->Ocena15->UseVisualStyleBackColor = true;
- //
- // Ocena25
- //
- this->Ocena25->Cursor = System::Windows::Forms::Cursors::Hand;
- resources->ApplyResources(this->Ocena25, L"Ocena25");
- this->Ocena25->Name = L"Ocena25";
- this->Ocena25->UseVisualStyleBackColor = true;
- //
- // Ocena35
- //
- this->Ocena35->Cursor = System::Windows::Forms::Cursors::Hand;
- resources->ApplyResources(this->Ocena35, L"Ocena35");
- this->Ocena35->Name = L"Ocena35";
- this->Ocena35->UseVisualStyleBackColor = true;
- //
- // Ocena45
- //
- this->Ocena45->Cursor = System::Windows::Forms::Cursors::Hand;
- resources->ApplyResources(this->Ocena45, L"Ocena45");
- this->Ocena45->Name = L"Ocena45";
- this->Ocena45->UseVisualStyleBackColor = true;
- //
- // Ocena55
- //
- this->Ocena55->Cursor = System::Windows::Forms::Cursors::Hand;
- resources->ApplyResources(this->Ocena55, L"Ocena55");
- this->Ocena55->Name = L"Ocena55";
- this->Ocena55->UseVisualStyleBackColor = true;
- //
- // Poprzedni
- //
- resources->ApplyResources(this->Poprzedni, L"Poprzedni");
- this->Poprzedni->Name = L"Poprzedni";
- this->Poprzedni->UseVisualStyleBackColor = true;
- //
- // Nastepny
- //
- resources->ApplyResources(this->Nastepny, L"Nastepny");
- this->Nastepny->Name = L"Nastepny";
- this->Nastepny->UseVisualStyleBackColor = true;
- //
- // r_A
- //
- this->r_A->BackColor = System::Drawing::Color::FromArgb(static_cast<System::Int32>(static_cast<System::Byte>(0)), static_cast<System::Int32>(static_cast<System::Byte>(192)),
- static_cast<System::Int32>(static_cast<System::Byte>(0)));
- resources->ApplyResources(this->r_A, L"r_A");
- this->r_A->Name = L"r_A";
- //
- // r_B
- //
- this->r_B->BackColor = System::Drawing::Color::FromArgb(static_cast<System::Int32>(static_cast<System::Byte>(0)), static_cast<System::Int32>(static_cast<System::Byte>(192)),
- static_cast<System::Int32>(static_cast<System::Byte>(0)));
- resources->ApplyResources(this->r_B, L"r_B");
- this->r_B->Name = L"r_B";
- //
- // r_C
- //
- this->r_C->BackColor = System::Drawing::Color::FromArgb(static_cast<System::Int32>(static_cast<System::Byte>(0)), static_cast<System::Int32>(static_cast<System::Byte>(192)),
- static_cast<System::Int32>(static_cast<System::Byte>(0)));
- resources->ApplyResources(this->r_C, L"r_C");
- this->r_C->Name = L"r_C";
- //
- // r_D
- //
- this->r_D->BackColor = System::Drawing::Color::FromArgb(static_cast<System::Int32>(static_cast<System::Byte>(0)), static_cast<System::Int32>(static_cast<System::Byte>(192)),
- static_cast<System::Int32>(static_cast<System::Byte>(0)));
- resources->ApplyResources(this->r_D, L"r_D");
- this->r_D->Name = L"r_D";
- //
- // r_E
- //
- this->r_E->BackColor = System::Drawing::Color::FromArgb(static_cast<System::Int32>(static_cast<System::Byte>(0)), static_cast<System::Int32>(static_cast<System::Byte>(192)),
- static_cast<System::Int32>(static_cast<System::Byte>(0)));
- resources->ApplyResources(this->r_E, L"r_E");
- this->r_E->Name = L"r_E";
- //
- // r_F
- //
- this->r_F->BackColor = System::Drawing::Color::FromArgb(static_cast<System::Int32>(static_cast<System::Byte>(0)), static_cast<System::Int32>(static_cast<System::Byte>(192)),
- static_cast<System::Int32>(static_cast<System::Byte>(0)));
- resources->ApplyResources(this->r_F, L"r_F");
- this->r_F->Name = L"r_F";
- //
- // r_G
- //
- this->r_G->BackColor = System::Drawing::Color::FromArgb(static_cast<System::Int32>(static_cast<System::Byte>(0)), static_cast<System::Int32>(static_cast<System::Byte>(192)),
- static_cast<System::Int32>(static_cast<System::Byte>(0)));
- resources->ApplyResources(this->r_G, L"r_G");
- this->r_G->Name = L"r_G";
- //
- // r_H
- //
- this->r_H->BackColor = System::Drawing::Color::FromArgb(static_cast<System::Int32>(static_cast<System::Byte>(0)), static_cast<System::Int32>(static_cast<System::Byte>(192)),
- static_cast<System::Int32>(static_cast<System::Byte>(0)));
- resources->ApplyResources(this->r_H, L"r_H");
- this->r_H->Name = L"r_H";
- //
- // r_I
- //
- this->r_I->BackColor = System::Drawing::Color::FromArgb(static_cast<System::Int32>(static_cast<System::Byte>(0)), static_cast<System::Int32>(static_cast<System::Byte>(192)),
- static_cast<System::Int32>(static_cast<System::Byte>(0)));
- resources->ApplyResources(this->r_I, L"r_I");
- this->r_I->Name = L"r_I";
- //
- // r_J
- //
- this->r_J->BackColor = System::Drawing::Color::FromArgb(static_cast<System::Int32>(static_cast<System::Byte>(0)), static_cast<System::Int32>(static_cast<System::Byte>(192)),
- static_cast<System::Int32>(static_cast<System::Byte>(0)));
- resources->ApplyResources(this->r_J, L"r_J");
- this->r_J->Name = L"r_J";
- //
- // r_K
- //
- this->r_K->BackColor = System::Drawing::Color::FromArgb(static_cast<System::Int32>(static_cast<System::Byte>(0)), static_cast<System::Int32>(static_cast<System::Byte>(192)),
- static_cast<System::Int32>(static_cast<System::Byte>(0)));
- resources->ApplyResources(this->r_K, L"r_K");
- this->r_K->Name = L"r_K";
- //
- // r_L
- //
- this->r_L->BackColor = System::Drawing::Color::FromArgb(static_cast<System::Int32>(static_cast<System::Byte>(0)), static_cast<System::Int32>(static_cast<System::Byte>(192)),
- static_cast<System::Int32>(static_cast<System::Byte>(0)));
- resources->ApplyResources(this->r_L, L"r_L");
- this->r_L->Name = L"r_L";
- //
- // r_M
- //
- this->r_M->BackColor = System::Drawing::Color::FromArgb(static_cast<System::Int32>(static_cast<System::Byte>(0)), static_cast<System::Int32>(static_cast<System::Byte>(192)),
- static_cast<System::Int32>(static_cast<System::Byte>(0)));
- resources->ApplyResources(this->r_M, L"r_M");
- this->r_M->Name = L"r_M";
- //
- // r_N
- //
- this->r_N->BackColor = System::Drawing::Color::FromArgb(static_cast<System::Int32>(static_cast<System::Byte>(0)), static_cast<System::Int32>(static_cast<System::Byte>(192)),
- static_cast<System::Int32>(static_cast<System::Byte>(0)));
- resources->ApplyResources(this->r_N, L"r_N");
- this->r_N->Name = L"r_N";
- //
- // r_O
- //
- this->r_O->BackColor = System::Drawing::Color::FromArgb(static_cast<System::Int32>(static_cast<System::Byte>(0)), static_cast<System::Int32>(static_cast<System::Byte>(192)),
- static_cast<System::Int32>(static_cast<System::Byte>(0)));
- resources->ApplyResources(this->r_O, L"r_O");
- this->r_O->Name = L"r_O";
- //
- // r_P
- //
- this->r_P->BackColor = System::Drawing::Color::FromArgb(static_cast<System::Int32>(static_cast<System::Byte>(0)), static_cast<System::Int32>(static_cast<System::Byte>(192)),
- static_cast<System::Int32>(static_cast<System::Byte>(0)));
- resources->ApplyResources(this->r_P, L"r_P");
- this->r_P->Name = L"r_P";
- //
- // Napis
- //
- resources->ApplyResources(this->Napis, L"Napis");
- this->Napis->ForeColor = System::Drawing::Color::OrangeRed;
- this->Napis->Name = L"Napis";
- //
- // Wynik
- //
- resources->ApplyResources(this->Wynik, L"Wynik");
- this->Wynik->Name = L"Wynik";
- //
- // Reset
- //
- resources->ApplyResources(this->Reset, L"Reset");
- this->Reset->Name = L"Reset";
- this->Reset->UseVisualStyleBackColor = true;
- //
- // A_suma
- //
- resources->ApplyResources(this->A_suma, L"A_suma");
- this->A_suma->ForeColor = System::Drawing::Color::DarkOrange;
- this->A_suma->Name = L"A_suma";
- this->A_suma->Click += gcnew System::EventHandler(this, &MyForm::A_suma_Click);
- //
- // A_ile
- //
- resources->ApplyResources(this->A_ile, L"A_ile");
- this->A_ile->ForeColor = System::Drawing::Color::DarkOrange;
- this->A_ile->Name = L"A_ile";
- //
- // MyForm
- //
- resources->ApplyResources(this, L"$this");
- this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
- this->BackColor = System::Drawing::SystemColors::HotTrack;
- this->Controls->Add(this->A_ile);
- this->Controls->Add(this->A_suma);
- this->Controls->Add(this->Reset);
- this->Controls->Add(this->Wynik);
- this->Controls->Add(this->Napis);
- this->Controls->Add(this->r_P);
- this->Controls->Add(this->r_O);
- this->Controls->Add(this->r_N);
- this->Controls->Add(this->r_M);
- this->Controls->Add(this->r_L);
- this->Controls->Add(this->r_K);
- this->Controls->Add(this->r_J);
- this->Controls->Add(this->r_I);
- this->Controls->Add(this->r_H);
- this->Controls->Add(this->r_G);
- this->Controls->Add(this->r_F);
- this->Controls->Add(this->r_E);
- this->Controls->Add(this->r_D);
- this->Controls->Add(this->r_C);
- this->Controls->Add(this->r_B);
- this->Controls->Add(this->r_A);
- this->Controls->Add(this->Nastepny);
- this->Controls->Add(this->Poprzedni);
- this->Controls->Add(this->Ocena55);
- this->Controls->Add(this->Ocena45);
- this->Controls->Add(this->Ocena35);
- this->Controls->Add(this->Ocena25);
- this->Controls->Add(this->Ocena15);
- this->Controls->Add(this->Ocena6);
- this->Controls->Add(this->Ocena5);
- this->Controls->Add(this->Ocena4);
- this->Controls->Add(this->Ocena3);
- this->Controls->Add(this->Ocena2);
- this->Controls->Add(this->Ocena1);
- this->FormBorderStyle = System::Windows::Forms::FormBorderStyle::FixedSingle;
- this->MaximizeBox = false;
- this->Name = L"MyForm";
- this->Load += gcnew System::EventHandler(this, &MyForm::MyForm_Load);
- this->ResumeLayout(false);
- }
- #pragma endregion
- private: System::Void MyForm_Load(System::Object^ sender, System::EventArgs^ e) {
- Wynik->Text = Convert::ToString(wynik);
- A_suma->Text = Convert::ToString(suma);
- A_ile->Text = Convert::ToString(ile_liczb);
- *wskaznik = &A;
- }
- private: System::Void A_suma_Click(System::Object^ sender, System::EventArgs^ e) {
- }
- private: System::Void Wynik_TextChanged(System::Object^ sender, System::EventArgs^ e) {
- }
- private: System::Void Ocena1_Click(System::Object^ sender, System::EventArgs^ e) {
- Wynik->Text = Convert::ToString(test);
- }
- };
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement