Основы разработки электронного учебника

Курсовой проект - Компьютеры, программирование

Другие курсовые по предмету Компьютеры, программирование

p>

void __fastcall SpeedButton2Click(TObject *Sender);

void __fastcall TreeView1KeyDown(TObject *Sender, WORD &Key,

TShiftState Shift);

void __fastcall Memo1KeyDown(TObject *Sender, WORD &Key,

TShiftState Shift);

void __fastcall N4Click(TObject *Sender);

void __fastcall N3Click(TObject *Sender);

void __fastcall N7Click(TObject *Sender);

void __fastcall FindDialog1Find(TObject *Sender);

void __fastcall N9Click(TObject *Sender);

void __fastcall SpeedButton4Click(TObject *Sender);

private:// User declarations

public:// User declarations

__fastcall TForm2(TComponent* Owner);

};

//---------------------------------------------------------------------------

extern PACKAGE TForm2 *Form2;

//---------------------------------------------------------------------------

#endif

 

// Заголовочный файл Unit3.H с объявлением класса формы Form3

//---------------------------------------------------------------------------

 

#ifndef Unit3H

#define Unit3H

//---------------------------------------------------------------------------

">#include

">#include

">#include

">#include

">#include

">#include

">#include

//---------------------------------------------------------------------------

class TForm3 : public TForm

{

__published:// IDE-managed Components

TSpeedButton *SpeedButton1;

TLabel *Label1;

TLabel *Label2;

TLabel *Label3;

TLabel *Label4;

void __fastcall SpeedButton1Click(TObject *Sender);

private:// User declarations

public:// User declarations

__fastcall TForm3(TComponent* Owner);

};

//---------------------------------------------------------------------------

extern PACKAGE TForm3 *Form3;

//---------------------------------------------------------------------------

#endif

 

// Заголовочный файл Unit4.H с объявлением класса формы Form4

//---------------------------------------------------------------------------

#ifndef Unit4H

#define Unit4H

//---------------------------------------------------------------------------

">#include

">#include

">#include

">#include

">#include

">#include

">#include

//---------------------------------------------------------------------------

class TForm4 : public TForm

{

__published:// IDE-managed Components

TSpeedButton *SpeedButton1;

TLabel *Label1;

TLabel *Label2;

TLabel *Label3;

TLabel *Label4;

TLabel *Label5;

void __fastcall SpeedButton1Click(TObject *Sender);

private:// User declarations

public:// User declarations

__fastcall TForm4(TComponent* Owner);

};

//---------------------------------------------------------------------------

extern PACKAGE TForm4 *Form4;

//---------------------------------------------------------------------------

#endif

 

// Файл Unit1.cpp для формы Form1

//---------------------------------------------------------------------------

#include

#pragma hdrstop

 

#include "Unit1.h"

#include "Unit2.h"

//---------------------------------------------------------------------------

#pragma package(smart_init)

#pragma resource "*.dfm"

TForm1 *Form1;

int c,c1;

bool fl,fl2;

 

//---------------------------------------------------------------------------

__fastcall TForm1::TForm1(TComponent* Owner)

: TForm(Owner)

{

}

//---------------------------------------------------------------------------

 

void __fastcall TForm1::SpeedButton1Click(TObject *Sender)

{

Form2->Visible=true;

Form1->Visible=false;

}

//---------------------------------------------------------------------------

 

void __fastcall TForm1::SpeedButton2Click(TObject *Sender)

{

Application->Terminate();

}

//---------------------------------------------------------------------------

 

 

void __fastcall TForm1::SpeedButton1MouseMove(TObject *Sender,

TShiftState Shift, int X, int Y)

{

fl=true;

}

//---------------------------------------------------------------------------

 

void __fastcall TForm1::FormMouseMove(TObject *Sender, TShiftState Shift,

int X, int Y)

{

fl=false;

}

//---------------------------------------------------------------------------

 

void __fastcall TForm1::SpeedButton2MouseMove(TObject *Sender,

TShiftState Shift, int X, int Y)

{

Form1->Repaint();

}

//---------------------------------------------------------------------------

 

// Файл Unit2.cpp для главной формы Form2

//---------------------------------------------------------------------------

 

#include

#pragma hdrstop

#include "Unit2.h"

#include "Unit1.h"

#include "Unit3.h"

#include "Unit4.h"

//---------------------------------------------------------------------------

#pragma package(smart_init)

#pragma resource "*.dfm"

TForm2 *Form2;

int i=0;

bool fg1,fg2;

int v1,v2,c2;

int SelPos;

AnsiString a;

//---------------------------------------------------------------------------

__fastcall TForm2::TForm2(TComponent* Owner)

: TForm(Owner)

{

}

//---------------------------------------------------------------------------

 

 

void __fastcall TForm2::SpeedButton1Click(TObject *Sender)

{

Application->Terminate();

 

 

}

//---------------------------------------------------------------------------

 

 

void __fastcall TForm2::TreeView1DblClick(TObject *Sender)

{

if (Form2->TreeView1->Selected->AbsoluteIndex==1)

Memo1->Lines->LoadFromFile("pages/1.dat");">{Form2->Memo1->Lines->LoadFromFile("pages/1.dat");

a=Form2->Memo1->Lines->Text;

};

if (Form2->TreeView1->Selected->AbsoluteIndex==2)

Memo1->Lines->LoadFromFile("pages/2.dat");">{Form2->Memo1->Lines->LoadFromFile("pages/2.dat");

a=Form2->Memo1->Lines->Text;

};

if (Form2->TreeView1->Selected->AbsoluteIndex==3)

Memo1->Lines->LoadFromFile("pages/3.dat");">{Form2->Memo1->Lines->LoadFromFile("pages/3.dat");

a=Form2->Memo1->Lines->Text;

};

if (Form2->TreeView1->Selected->AbsoluteIndex==4)

Memo1->Lines->LoadFromFile("pages/4.dat");">{Form2->Memo1->Lines->LoadFromFile("pages/4.dat");

a=Form2->Memo1->Lines->Text;

};

if (Form2->TreeView1->Selected->AbsoluteIndex==5)

Memo1->Lines->LoadFromFile("pages/5.dat");">{Form2->Memo1->Lines->LoadFromFile("pages/5.dat");

a=Form2->Memo1->Lines->Text;

};

if (Form2->TreeView1->Selected->AbsoluteIndex==6)

Memo1->Lines->LoadFromFile("pages/6.dat");">{Form2->Memo1->Lines->LoadFromFile("pages/6.dat");

a=Form2->Memo1->Lines->Text;

};

if (Form2->TreeView1->Selected->AbsoluteIndex==7)

Memo1->Lines->LoadFromFile("pages/7.dat");">{Form2->Memo1->Lines->LoadFromFile("pages/7.dat");

a=Form2->Memo1->Lines->Text;

};

if (Form2->TreeView1->Selected->AbsoluteIndex==8)

Memo1->Lines->LoadFromFile("pages/8.dat");">{Form2->Memo1->Lines->LoadFromFile("pages/8.dat");

a=Form2->Memo1->Lines->Text;

};

if (Form2->TreeView1->Selected->AbsoluteIndex==9)

Memo1->Lines->LoadFromFile("pages/9.dat");">{Form2->Memo1->Lines->LoadFromFile("pages/9.dat");

a=Form2->Memo1->Lines->Text;

};

if (Form2->TreeView1->Selected->AbsoluteIndex==10)

Memo1->Lines->LoadFromFile("pages/10.dat");">{Form2->Memo1->Lines->LoadFromFile("pages/10.dat");

a=Form2->Memo1->Lines->Text;

};

…………………………………………………………

}

//---------------------------------------------------------------------------

 

void __fastcall TForm2::FormClose(TObject *Sender, TCloseAction &Action)

{

Application-