//---------------------------------------------------------------------------
#include
#pragma hdrstop
#include "Unit1.h"
#include "Unit2.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm1::KerakliSaqlash1Click(TObject *Sender)
{
if(SaveDialog1->Execute())
{
Memo1->Lines->SaveToFile(SaveDialog1->FileName);
}
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Ochish1Click(TObject *Sender)
{
if(OpenDialog1->Execute())
{
Memo1->Lines->LoadFromFile(OpenDialog1->FileName);
}
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Chiqish1Click(TObject *Sender)
{
Close();
}
//---------------------------------------------------------------------------
void __fastcall TForm1::QirqibOlish1Click(TObject *Sender)
{
Memo1->CutToClipboard();
}
//---------------------------------------------------------------------------
void __fastcall TForm1::NusxaOlish1Click(TObject *Sender)
{
Memo1->CopyToClipboard();
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Joylashtirish1Click(TObject *Sender)
{
Memo1->PasteFromClipboard();
}
//---------------------------------------------------------------------------
void __fastcall TForm1::BarchasiniBelgilash1Click(TObject *Sender)
{
Memo1->SelectAll();
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Ochirish1Click(TObject *Sender)
{
Memo1->Lines->Text=Memo1->Lines->Text.Delete(Memo1->SelStart,Memo1->SelLength);
}
//---------------------------------------------------------------------------
void __fastcall TForm1::SozniKochiribOtkazish1Click(TObject *Sender)
{
if(SozniKochiribOtkazish1->Checked)
{
SozniKochiribOtkazish1->Checked=false;
Memo1->WordWrap=false;
Memo1->ScrollBars=ssBoth;
}else
{
SozniKochiribOtkazish1->Checked=true;
Memo1->WordWrap=true;
Memo1->ScrollBars=ssVertical;
}
}
//---------------------------------------------------------------------------
void __fastcall TForm1::ShriftOlchamlari1Click(TObject *Sender)
{
FontDialog1->Font=Memo1->Font;
if(FontDialog1->Execute())
Memo1->Font= FontDialog1->Font;
}
//---------------------------------------------------------------------------
void __fastcall TForm1::XolatSatri1Click(TObject *Sender)
{
if(XolatSatri1->Checked)
{
XolatSatri1->Checked=false;
StatusBar1->Visible=false;
}else
{
XolatSatri1->Checked=true;
StatusBar1->Visible=true;
}
}
//---------------------------------------------------------------------------
void __fastcall TForm1::DasturHaqida1Click(TObject *Sender)
{
ShowMessage("Ozingizga ishoning!");
}
//---------------------------------------------------------------------------
Do'stlaringiz bilan baham: |