Bajardi: swd008-L2 guruh talabasi Abdullayev Bobur
Download 252.12 Kb.
|
Dasturlash 9,10
HY-Страница ТЛ Sof (UZ)24 02 22, Ekonom teoriya óz betinshe 3, Kalieva bioximiya, Saidova Gulbahor. 9-3 tex ta\'lim s-20, VOYISOV UMARXON, Qo\'shayeva Charos, 2 5203909867642821024, Qaraqalpaq tili hám ádebiyatı páni 9,11-klass ushın, 5 12-dars, 5 17-dars, Hududiy ixtisoslashtirilgan maktablari natijalari
Muhammad Al-Xorazmiy nomidagi Toshkent Axborot Texnologiyalari Universiteti Bajardi:SWD008-L2 guruh talabasi Abdullayev Bobur Tekshirdi: Gulyamova Dilfuza #pragma once namespace My12labnomer5 { using namespace System::ComponentModel; using namespace System::Collections; using namespace System::Windows::Forms; using namespace System::Data; using namespace System::Drawing; /// /// Сводка для Form1 /// public ref class Form1 : public System::Windows::Forms::Form { public: Form1(void) { InitializeComponent(); // //TODO: добавьте код конструктора // } protected: /// /// Освободить все используемые ресурсы. /// ~Form1() { if (components) { delete components; } } private: System::Windows::Forms::TabControl^ tabControl1; protected: private: System::Windows::Forms::TabPage^ tabPage1; private: System::Windows::Forms::GroupBox^ groupBox3; private: System::Windows::Forms::DataGridView^ dataGridView1; private: System::Windows::Forms::GroupBox^ groupBox2; private: System::Windows::Forms::GroupBox^ groupBox1; private: System::Windows::Forms::DataVisualization::Charting::Chart^ chart2; private: System::Windows::Forms::DataVisualization::Charting::Chart^ chart1; private: System::Windows::Forms::TabPage^ tabPage2; private: System::Windows::Forms::Label^ label2; private: System::Windows::Forms::Label^ label6; private: System::Windows::Forms::TextBox^ textBox4; private: System::Windows::Forms::Button^ button2; private: /// /// Требуется переменная конструктора. /// System::ComponentModel::Container ^components; #pragma region Windows Form Designer generated code /// /// Обязательный метод для поддержки конструктора - не изменяйте /// содержимое данного метода при помощи редактора кода. /// void InitializeComponent(void) { System::Windows::Forms::DataVisualization::Charting::ChartArea^ chartArea1 = (gcnew System::Windows::Forms::DataVisualization::Charting::ChartArea()); System::Windows::Forms::DataVisualization::Charting::Legend^ legend1 = (gcnew System::Windows::Forms::DataVisualization::Charting::Legend()); System::Windows::Forms::DataVisualization::Charting::Series^ series1 = (gcnew System::Windows::Forms::DataVisualization::Charting::Series()); System::Windows::Forms::DataVisualization::Charting::ChartArea^ chartArea2 = (gcnew System::Windows::Forms::DataVisualization::Charting::ChartArea()); System::Windows::Forms::DataVisualization::Charting::Legend^ legend2 = (gcnew System::Windows::Forms::DataVisualization::Charting::Legend()); System::Windows::Forms::DataVisualization::Charting::Series^ series2 = (gcnew System::Windows::Forms::DataVisualization::Charting::Series()); this->tabControl1 = (gcnew System::Windows::Forms::TabControl()); this->tabPage1 = (gcnew System::Windows::Forms::TabPage()); this->groupBox3 = (gcnew System::Windows::Forms::GroupBox()); this->dataGridView1 = (gcnew System::Windows::Forms::DataGridView()); this->groupBox2 = (gcnew System::Windows::Forms::GroupBox()); this->button2 = (gcnew System::Windows::Forms::Button()); this->label6 = (gcnew System::Windows::Forms::Label()); this->textBox4 = (gcnew System::Windows::Forms::TextBox()); this->groupBox1 = (gcnew System::Windows::Forms::GroupBox()); this->chart2 = (gcnew System::Windows::Forms::DataVisualization::Charting::Chart()); this->chart1 = (gcnew System::Windows::Forms::DataVisualization::Charting::Chart()); this->tabPage2 = (gcnew System::Windows::Forms::TabPage()); this->label2 = (gcnew System::Windows::Forms::Label()); this->tabControl1->SuspendLayout(); this->tabPage1->SuspendLayout(); this->groupBox3->SuspendLayout(); (cli::safe_cast this->groupBox2->SuspendLayout(); this->groupBox1->SuspendLayout(); (cli::safe_cast (cli::safe_cast this->tabPage2->SuspendLayout(); this->SuspendLayout(); // // tabControl1 // this->tabControl1->Controls->Add(this->tabPage1); this->tabControl1->Controls->Add(this->tabPage2); this->tabControl1->Location = System::Drawing::Point(2, 3); this->tabControl1->Name = L"tabControl1"; this->tabControl1->SelectedIndex = 0; this->tabControl1->Size = System::Drawing::Size(758, 498); this->tabControl1->TabIndex = 0; // // tabPage1 // this->tabPage1->Controls->Add(this->groupBox3); this->tabPage1->Controls->Add(this->groupBox2); this->tabPage1->Controls->Add(this->groupBox1); this->tabPage1->Location = System::Drawing::Point(4, 25); this->tabPage1->Name = L"tabPage1"; this->tabPage1->Padding = System::Windows::Forms::Padding(3); this->tabPage1->Size = System::Drawing::Size(750, 469); this->tabPage1->TabIndex = 0; this->tabPage1->Text = L"Dastur"; this->tabPage1->UseVisualStyleBackColor = true; // // groupBox3 // this->groupBox3->Controls->Add(this->dataGridView1); this->groupBox3->ForeColor = System::Drawing::Color::Black; this->groupBox3->Location = System::Drawing::Point(352, 252); this->groupBox3->Name = L"groupBox3"; this->groupBox3->Size = System::Drawing::Size(395, 217); this->groupBox3->TabIndex = 2; this->groupBox3->TabStop = false; this->groupBox3->Text = L"Ustunli malumot"; // // dataGridView1 // this->dataGridView1->BackgroundColor = System::Drawing::Color::DarkOrange; this->dataGridView1->ColumnHeadersHeightSizeMode = System::Windows::Forms::DataGridViewColumnHeadersHeightSizeMode::AutoSize; this->dataGridView1->GridColor = System::Drawing::SystemColors::HotTrack; this->dataGridView1->Location = System::Drawing::Point(6, 21); this->dataGridView1->Name = L"dataGridView1"; this->dataGridView1->RowTemplate->Height = 24; this->dataGridView1->Size = System::Drawing::Size(386, 189); this->dataGridView1->TabIndex = 0; // // groupBox2 // this->groupBox2->Controls->Add(this->button2); this->groupBox2->Controls->Add(this->label6); this->groupBox2->Controls->Add(this->textBox4); this->groupBox2->ForeColor = System::Drawing::Color::DarkBlue; this->groupBox2->Location = System::Drawing::Point(7, 252); this->groupBox2->Name = L"groupBox2"; this->groupBox2->Size = System::Drawing::Size(339, 210); this->groupBox2->TabIndex = 1; this->groupBox2->TabStop = false; this->groupBox2->Text = L"Malumot kritish"; this->groupBox2->Enter += gcnew System::EventHandler(this, &Form1::groupBox2_Enter); // // button2 // this->button2->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 10.2F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, static_cast this->button2->ForeColor = System::Drawing::Color::DarkBlue; this->button2->Location = System::Drawing::Point(51, 114); this->button2->Name = L"button2"; this->button2->Size = System::Drawing::Size(222, 49); this->button2->TabIndex = 9; this->button2->Text = L"Diogrammaga qoshish"; this->button2->UseVisualStyleBackColor = true; this->button2->Click += gcnew System::EventHandler(this, &Form1::button2_Click); // // label6 // this->label6->AutoSize = true; this->label6->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 10.2F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, static_cast this->label6->ForeColor = System::Drawing::Color::DarkBlue; this->label6->Location = System::Drawing::Point(32, 61); this->label6->Name = L"label6"; this->label6->Size = System::Drawing::Size(143, 20); this->label6->TabIndex = 8; this->label6->Text = L"Malumotlar soni"; this->label6->TextAlign = System::Drawing::ContentAlignment::TopCenter; // // textBox4 // this->textBox4->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 10.2F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, static_cast this->textBox4->ForeColor = System::Drawing::Color::DarkBlue; this->textBox4->Location = System::Drawing::Point(213, 49); this->textBox4->Multiline = true; this->textBox4->Name = L"textBox4"; this->textBox4->Size = System::Drawing::Size(58, 32); this->textBox4->TabIndex = 7; this->textBox4->TextChanged += gcnew System::EventHandler(this, &Form1::textBox4_TextChanged); // // groupBox1 // this->groupBox1->Controls->Add(this->chart2); this->groupBox1->Controls->Add(this->chart1); this->groupBox1->ForeColor = System::Drawing::Color::SaddleBrown; this->groupBox1->Location = System::Drawing::Point(7, 7); this->groupBox1->Name = L"groupBox1"; this->groupBox1->Size = System::Drawing::Size(737, 239); this->groupBox1->TabIndex = 0; this->groupBox1->TabStop = false; this->groupBox1->Text = L"Diogrammali malumot"; // // chart2 // this->chart2->BackColor = System::Drawing::Color::Crimson; chartArea1->Name = L"ChartArea1"; this->chart2->ChartAreas->Add(chartArea1); legend1->Name = L"Legend1"; this->chart2->Legends->Add(legend1); this->chart2->Location = System::Drawing::Point(351, 21); this->chart2->Name = L"chart2"; this->chart2->Palette = System::Windows::Forms::DataVisualization::Charting::ChartColorPalette::Berry; series1->ChartArea = L"ChartArea1"; series1->Legend = L"Legend1"; series1->Name = L"Series1"; this->chart2->Series->Add(series1); this->chart2->Size = System::Drawing::Size(389, 218); this->chart2->TabIndex = 1; this->chart2->Text = L"Olgan baholar"; this->chart2->Click += gcnew System::EventHandler(this, &Form1::chart2_Click); // // chart1 // this->chart1->BackColor = System::Drawing::Color::RoyalBlue; chartArea2->Name = L"ChartArea1"; this->chart1->ChartAreas->Add(chartArea2); legend2->Name = L"Legend1"; this->chart1->Legends->Add(legend2); this->chart1->Location = System::Drawing::Point(6, 21); this->chart1->Name = L"chart1"; this->chart1->Palette = System::Windows::Forms::DataVisualization::Charting::ChartColorPalette::Chocolate; series2->ChartArea = L"ChartArea1"; series2->Legend = L"Legend1"; series2->Name = L"Series1"; this->chart1->Series->Add(series2); this->chart1->Size = System::Drawing::Size(333, 218); this->chart1->TabIndex = 0; this->chart1->Text = L"Ajratilgan soatlar"; // // tabPage2 // this->tabPage2->Controls->Add(this->label2); this->tabPage2->Location = System::Drawing::Point(4, 25); this->tabPage2->Name = L"tabPage2"; this->tabPage2->Padding = System::Windows::Forms::Padding(3); this->tabPage2->Size = System::Drawing::Size(750, 469); this->tabPage2->TabIndex = 1; this->tabPage2->Text = L"Dastur sharti"; this->tabPage2->UseVisualStyleBackColor = true; // // label2 // this->label2->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 13.8F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, static_cast this->label2->Location = System::Drawing::Point(3, 3); this->label2->Name = L"label2"; this->label2->Size = System::Drawing::Size(741, 109); this->label2->TabIndex = 1; this->label2->Text = L"1-formada Fanlardan olgan baholar kesimida va" L" 2-formada esa ajratilgan soatlar kesimidagi diagrammasini yaratuvchi vizual dastur tuzing." L"\r\n"; this->label2->TextAlign = System::Drawing::ContentAlignment::MiddleCenter; // // Form1 // this->AutoScaleDimensions = System::Drawing::SizeF(8, 16); this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font; this->ClientSize = System::Drawing::Size(762, 502); this->Controls->Add(this->tabControl1); this->Name = L"Form1"; this->Text = L"Diogramma"; this->Load += gcnew System::EventHandler(this, &Form1::Form1_Load); this->tabControl1->ResumeLayout(false); this->tabPage1->ResumeLayout(false); this->groupBox3->ResumeLayout(false); (cli::safe_cast this->groupBox2->ResumeLayout(false); this->groupBox2->PerformLayout(); this->groupBox1->ResumeLayout(false); (cli::safe_cast (cli::safe_cast this->tabPage2->ResumeLayout(false); this->ResumeLayout(false); }
int n; private: System::Void chart2_Click(System::Object^ sender, System::EventArgs^ e) { } private: System::Void Form1_Load(System::Object^ sender, System::EventArgs^ e) { } private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) { } private: System::Void textBox4_TextChanged(System::Object^ sender, System::EventArgs^ e) { n = Convert::ToInt16(textBox4->Text); dataGridView1->RowCount = n+1; dataGridView1->ColumnCount = 3; dataGridView1->Rows[0]->Cells[0]->Value = "Nomi"; dataGridView1->Rows[0]->Cells[1]->Value = "Bahosi"; dataGridView1->Rows[0]->Cells[2]->Value = "Ajratilgan soati"; } private: System::Void groupBox2_Enter(System::Object^ sender, System::EventArgs^ e) { } private: System::Void button2_Click(System::Object^ sender, System::EventArgs^ e) { for(int i=0; i<=n; i++){ chart1->Series["Series1"]->Points->AddXY(i,dataGridView1->Rows[i]->Cells[1]->Value); chart2->Series["Series1"]->Points->AddXY(i,dataGridView1->Rows[i]->Cells[2]->Value); } } private: System::Void label3_Click(System::Object^ sender, System::EventArgs^ e) { } }; } Download 252.12 Kb. Do'stlaringiz bilan baham: |
Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2022
ma'muriyatiga murojaat qiling
ma'muriyatiga murojaat qiling