O’zbekiston respublikasi axborot texnologiyalari vakommunikatsiyalarini rivojlantirish vazirligimuhammadal-xorazmiy nomidagi


Download 0.62 Mb.
bet8/8
Sana24.12.2022
Hajmi0.62 Mb.
#1059969
1   2   3   4   5   6   7   8
Bog'liq
1-mustaqil ish

ILOVA


#pragma once #include "vaqt.h" namespace Bud {
using namespace System; usingnamespace System::ComponentModel; usingnamespace System::Collections;usingnamespace System::Windows::Forms; usingnamespace System::Data; using namespaceSystem::Drawing; using namespaceSystem::IO;
///
/// Сводка для Form1
///

public ref class Form1 : public System::Windows::Forms::Form
{
public:
Form1(void)
{
InitializeComponent();
//
//TODO:добавьте код конструктора
//
}

protected:

///


/// Освободить все используемые ресурсы.
///

~Form1()
{

if (components)
{
delete components;
}
}

#pragma endregion





>Value);
>Value);
int n,m,num1,num2,num3,S,S2; String ^a;int secund,minut,soat,vaqt;
void start(){num1=System::Convert::ToInt64(numericUpDown3->Value);
num2=System::Convert::ToInt64(numericUpDown2-num3=System::Convert::ToInt64(numericUpDown1-
S=num1+(num2*60)+(num3*3600);S2=secund+(minut*60)+(soat*3600);if(((S==S2)||(S2==vaqt))&&numericUpDown1-

>Enabled==false){


Vaqt ^ f2 = gcnew Vaqt();
f2->Show();

}
secund++;
if(secund<=9){ label2-
>Text="0"+System::Convert::ToString(secund);
}else
{label2->Text=System::Convert::ToString(secund);}if(secund==59){
secund=0;
minut++; if(minut<=9){label3-
>Text="0"+System::Convert::ToString(minut);
}else
label3->Text=System::Convert::ToString(minut);
}
if(minut==59){minut=0;
soat++;
if(soat<=9){
label4-
>Text="0"+System::Convert::ToString(soat);
}else
label4->Text=System::Convert::ToString(soat);
}
}
private: System::Void Form1_Load(System::Object^sender,System::EventArgs^e) {
a=TIME;
label2->Text=a-
>Substring(6);
label3->Text=a->Substring(3,2);
label4->Text=a->Substring(0,2);secund=System::Convert::ToInt64(label2-

>Text);

>Text);

minut=System::Convert::ToInt64(label3-


soat=System::Convert::ToInt64(label4->Text);
timer1->Enabled=true;
}
private: System::Void button1_Click(System::Object^sender,System::EventArgs^e) {

File::WriteAllText("1.txt",richTextBox1->Text);


numericUpDown1->Enabled=false;numericUpDown2->Enabled=false;

numericUpDown3->Enabled=false; if(radioButton2-
>Checked==true){
num1=System::Convert::ToInt64(numericUpDown3->Value);
num2=System::Convert::ToInt64(numericUpDown2-

>Value);

>Value);

num3=System::Convert::ToInt64(numericUpDown1-


vaqt=num1+(num2*60)+(num3*3600)+secund+(minut*60)+(soat*3600);


notifyIcon1->Visible=true;
this->Hide();
}

}
private: System::Void button2_Click(System::Object^sender,System::EventArgs^e) {


numericUpDown1-

>Enabled=true;

numericUpDown2->Enabled=true;numericUpDown3->Enabled=true;



}

private: System::Void richTextBox1_TextChanged(System::Object^sender, System::EventArgs^e) {
}
private: System::Void timer1_Tick(System::Object^sender,System::EventArgs^e) {
start();
}
private: System::VoidnotifyIcon1_MouseDoubleClick(System::Object^

sender, System::Windows::Forms::MouseEventArgs^e) {


this->Show();

}
};


}
//Form2#pragmaonce

namespace Bud {


}
#pragma endregion
private: System::Void Vaqt_Load(System::Object^sender,System::EventArgs^e) {

richTextBox1->Text=


File::ReadAllText("1.txt");
}
private: System::Void button1_Click(System::Object^sender,System::EventArgs^e) {
this->Close();
}
};
}
Download 0.62 Mb.

Do'stlaringiz bilan baham:
1   2   3   4   5   6   7   8




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