Guruh: swd004-L3 Bajardi: Nishonov Javohir Tekshirdi: Ishniyazov Odil Olimovich



Download 1,05 Mb.
Sana17.07.2022
Hajmi1,05 Mb.
#813149
Bog'liq
1655477602 (1)


Muhammad Al-Xorazmiy nomidagi Toshkent Axborot Texnologiyalari Universiteti
Kompyuter Injiniring fakulteti
DASTURLASH FANIDAN
7-8-LABORATORIYA ISHI


Guruh: SWD004-L3
Bajardi:Nishonov Javohir
Tekshirdi:Ishniyazov Odil Olimovich

7-8- Laboratoriya topshiriqlari



  1. Foydalanuvchilarning login va parollarini tekshiruvchi FORMA yaratish va Formaga nom berish.





  1. FORMA da textbox, label, checkbox, button lardan foydalanish

  2. Dizayn qismiga etibor bergan holda ranglar uyg’unligini shakllantirish

  3. Login va parollar to’g’ri yozilgan bo’lish bilan birgalikda checkbox belgilangan bo’lsa, labelda FIO va fakultet(masalan: 812-20guruh Toshmatov Qulmat) guruhi chiqishi kerak.

  4. Login va parollar to’g’ri yozilgan va checkbox belgilanmagan bo’lsa SWD___ guruhi va FIO si messagebox da chiqsin.

#pragma once


namespace WindowsFormsApplication1 {


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 for Form1
///

public ref class Form1 : public System::Windows::Forms::Form
{
public:
Form1(void)
{
InitializeComponent();
//
//TODO: Add the constructor code here
//
}

protected:


///
/// Clean up any resources being used.
///

~Form1()
{
if (components)
{
delete components;
}
}
private: System::Windows::Forms::Label^ label1;
protected:
private: System::Windows::Forms::Label^ label2;
private: System::Windows::Forms::TextBox^ textBox1;
private: System::Windows::Forms::TextBox^ textBox2;
private: System::Windows::Forms::Button^ button1;
private: System::Windows::Forms::Label^ label3;
private: System::Windows::Forms::CheckBox^ checkBox1;

private:


///
/// Required designer variable.
///

System::ComponentModel::Container ^components;

#pragma region Windows Form Designer generated code


///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///

void InitializeComponent(void)
{
System::ComponentModel::ComponentResourceManager^ resources = (gcnew System::ComponentModel::ComponentResourceManager(Form1::typeid));
this->label1 = (gcnew System::Windows::Forms::Label());
this->label2 = (gcnew System::Windows::Forms::Label());
this->textBox1 = (gcnew System::Windows::Forms::TextBox());
this->textBox2 = (gcnew System::Windows::Forms::TextBox());
this->button1 = (gcnew System::Windows::Forms::Button());
this->label3 = (gcnew System::Windows::Forms::Label());
this->checkBox1 = (gcnew System::Windows::Forms::CheckBox());
this->SuspendLayout();
//
// label1
//
this->label1->AutoSize = true;
this->label1->BackColor = System::Drawing::SystemColors::ActiveCaptionText;
this->label1->Font = (gcnew System::Drawing::Font(L"Franklin Gothic Medium", 19.8F, static_cast((System::Drawing::FontStyle::Bold | System::Drawing::FontStyle::Italic)),
System::Drawing::GraphicsUnit::Point, static_cast(204)));
this->label1->ForeColor = System::Drawing::SystemColors::ButtonHighlight;
this->label1->Location = System::Drawing::Point(55, 73);
this->label1->Name = L"label1";
this->label1->Size = System::Drawing::Size(98, 38);
this->label1->TabIndex = 0;
this->label1->Text = L"Login";
//
// label2
//
this->label2->AutoSize = true;
this->label2->BackColor = System::Drawing::SystemColors::ActiveCaptionText;
this->label2->Font = (gcnew System::Drawing::Font(L"Franklin Gothic Medium", 19.8F, static_cast((System::Drawing::FontStyle::Bold | System::Drawing::FontStyle::Italic)),
System::Drawing::GraphicsUnit::Point, static_cast(204)));
this->label2->ForeColor = System::Drawing::Color::White;
this->label2->Location = System::Drawing::Point(55, 132);
this->label2->Name = L"label2";
this->label2->Size = System::Drawing::Size(96, 38);
this->label2->TabIndex = 1;
this->label2->Text = L"Parol";
//
// textBox1
//
this->textBox1->BackColor = System::Drawing::Color::White;
this->textBox1->Font = (gcnew System::Drawing::Font(L"Franklin Gothic Medium", 10.2F, static_cast((System::Drawing::FontStyle::Bold | System::Drawing::FontStyle::Italic)),
System::Drawing::GraphicsUnit::Point, static_cast(204)));
this->textBox1->Location = System::Drawing::Point(205, 84);
this->textBox1->Name = L"textBox1";
this->textBox1->Size = System::Drawing::Size(174, 27);
this->textBox1->TabIndex = 2;
//
// textBox2
//
this->textBox2->Font = (gcnew System::Drawing::Font(L"Franklin Gothic Medium", 10.2F, static_cast((System::Drawing::FontStyle::Bold | System::Drawing::FontStyle::Italic)),
System::Drawing::GraphicsUnit::Point, static_cast(0)));
this->textBox2->Location = System::Drawing::Point(205, 143);
this->textBox2->Name = L"textBox2";
this->textBox2->PasswordChar = '*';
this->textBox2->Size = System::Drawing::Size(174, 27);
this->textBox2->TabIndex = 3;
//
// button1
//
this->button1->BackColor = System::Drawing::Color::Aqua;
this->button1->Font = (gcnew System::Drawing::Font(L"Bookman Old Style", 19.8F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point,
static_cast(204)));
this->button1->Location = System::Drawing::Point(329, 293);
this->button1->Name = L"button1";
this->button1->Size = System::Drawing::Size(168, 45);
this->button1->TabIndex = 4;
this->button1->Text = L"KIRISH";
this->button1->UseVisualStyleBackColor = false;
this->button1->Click += gcnew System::EventHandler(this, &Form1::button1_Click);
//
// label3
//
this->label3->AutoSize = true;
this->label3->BackColor = System::Drawing::Color::Black;
this->label3->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 16.2F, static_cast((System::Drawing::FontStyle::Bold | System::Drawing::FontStyle::Italic)),
System::Drawing::GraphicsUnit::Point, static_cast(204)));
this->label3->ForeColor = System::Drawing::SystemColors::ButtonHighlight;
this->label3->Location = System::Drawing::Point(46, 423);
this->label3->Name = L"label3";
this->label3->Size = System::Drawing::Size(0, 32);
this->label3->TabIndex = 5;
//
// checkBox1
//
this->checkBox1->AutoSize = true;
this->checkBox1->BackColor = System::Drawing::Color::FromArgb(static_cast(static_cast(128)), static_cast(static_cast(255)),
static_cast(static_cast(255)));
this->checkBox1->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 10.2F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point,
static_cast(204)));
this->checkBox1->Location = System::Drawing::Point(305, 293);
this->checkBox1->Name = L"checkBox1";
this->checkBox1->Size = System::Drawing::Size(18, 17);
this->checkBox1->TabIndex = 6;
this->checkBox1->UseVisualStyleBackColor = false;
//
// Form1
//
this->AutoScaleDimensions = System::Drawing::SizeF(8, 16);
this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
this->BackgroundImage = (cli::safe_cast(resources->GetObject(L"$this.BackgroundImage")));
this->ClientSize = System::Drawing::Size(793, 688);
this->Controls->Add(this->checkBox1);
this->Controls->Add(this->label3);
this->Controls->Add(this->button1);
this->Controls->Add(this->textBox2);
this->Controls->Add(this->textBox1);
this->Controls->Add(this->label2);
this->Controls->Add(this->label1);
this->Name = L"Form1";
this->Text = L"Kirish";
this->ResumeLayout(false);
this->PerformLayout();

}
#pragma endregion


private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) {
if (checkBox1->Checked)
{
if(textBox1->Text=="Javohir" && textBox2->Text=="2002")
label3->Text="211-21 guruh talabasi Nishonov Javohir";
else
label3->Text="Login yoki parol xato!!!";

}
else MessageBox::Show("SWD004-L3 guruh talabasi Nishonov Javohir","xabar oynasi",MessageBoxButtons::AbortRetryIgnore);
}
};
}


Forma ko`rinishi

Login va parollar to’g’ri yozilgan bo’lish bilan birgalikda checkbox belgilangan bo’lsa, labelda FIO va fakulteti chiqsin.


Login va parollar to’g’ri yozilgan va checkbox belgilanmagan bo’lsa SWD___ guruhi va FIO si messagebox da chiqsin.



Download 1,05 Mb.

Do'stlaringiz bilan baham:




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©www.hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish