49728 (609225), страница 3
Текст из файла (страница 3)
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm4 *Form4;
extern int b, a, q, **pokr,**pokr2 ,**arr,Flag;
//---------------------------------------------------------------------------
__fastcall TForm4::TForm4(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm4::FormShow(TObject *Sender)
{
Image1->Width=10*q;
Image1->Height=10*b;
for(int i=0; i
{
Image1->Canvas->MoveTo(0, i*Image1->Height/b);
Image1->Canvas->LineTo(Image1->Width, i*Image1->Height/b);
}
for(int j=0; j { Image1->Canvas->MoveTo(j*Image1->Width/q, 0); Image1->Canvas->LineTo(j*Image1->Width/q, Image1->Height); } Image1->Canvas->Brush->Color=clActiveCaption; for(int i=0;i { for(int j=0;j { if(pokr[i][j]==1) Image1->Canvas->FillRect(Rect(10*i+1,10*j+1,10*i+10,10*j+10)); } } delete []pokr; } Unit5.cpp #include #pragma hdrstop #include "Unit5.h" #include "Unit4.h" #include "Unit3.h" #include "Unit2.h" #include "Unit1.h" //--------------------------------------------------------------------------- #pragma package(smart_init) #pragma resource "*.dfm" TForm5 *Form5; //--------------------------------------------------------------------------- __fastcall TForm5::TForm5(TComponent* Owner) : TForm(Owner) { } //--------------------------------------------------------------------------- void __fastcall TForm5::Button1Click(TObject *Sender) { Form1->Show(); Form5->Close(); } 52