Реферат: Система рейтингового контроля знаний
#include <vcl\Classes.hpp>
#include <vcl\SysUtils.hpp>
#include <vcl\Messages.hpp>
#include <vcl\Windows.hpp>
#include <vcl\System.hpp>
//----------------------------------------------------------------------------
class TQRListForm : public TForm
{
__published:
TQuickReport *QuickReport;
TQRBand *Title;
TQRBand *PageHeader;
TQRBand *Detail;
TQRBand *PageFooter;
TQRLabel *QRLabel4;
TQRLabel *QRLabel1;
TQRLabel *QRLabel2;
TQRLabel *QRLabel3;
TQRLabel *QRLabel5;
TQRLabel *QRLabel6;
TQRGroup *QRGroup1;
TQRSysData *QRSysData1;
TQRShape *QRShape1;
TQRDBText *QRDBText3;
TQRDBText *QRDBText1;
TQRDBText *QRDBText9;
TQRDBText *QRDBText10;
TQRDBText *QRDBText2;
void __fastcall QRGroup1NeedData(AnsiString &Value);
private:
public:
virtual __fastcall TQRListForm(TComponent* AOwner);
};
//----------------------------------------------------------------------------
extern TQRListForm *QRListForm;
//----------------------------------------------------------------------------
#endif
RichАbt.h:
//----------------------------------------------------------------------------
#ifndef RichAbtH
#define RichAbtH
//----------------------------------------------------------------------------
#include <ExtCtrls.hpp>
#include <StdCtrls.hpp>
#include <Dialogs.hpp>
#include <Forms.hpp>
#include <Controls.hpp>
#include <Graphics.hpp>
#include <Classes.hpp>
#include <SysUtils.hpp>
#include <Messages.hpp>
#include <Windows.hpp>
#include <System.hpp>
//----------------------------------------------------------------------------
class TForm2 : public TForm
{
__published:
TImage *ProgramIcon;
TButton *OKButton;
public:
virtual __fastcall TForm2(TComponent *Owner);
};
//----------------------------------------------------------------------------
extern TForm2 *Form2;
//----------------------------------------------------------------------------
#endif
Sort.h:
//---------------------------------------------------------------------------
#ifndef SortH
#define SortH
//---------------------------------------------------------------------------
#include <vcl\Classes.hpp>
#include <vcl\Controls.hpp>
#include <vcl\StdCtrls.hpp>
#include <vcl\Forms.hpp>
#include <vcl\ExtCtrls.hpp>
//---------------------------------------------------------------------------
class TForm4 : public TForm
{
__published: // IDE-managed Components
TBevel *Bevel1;
TComboBox *ComboBox1;
TLabel *Label1;
TButton *Button1;
TButton *Button2;
void __fastcall ComboBox1Change(TObject *Sender);
private: // User declarations
public: // User declarations
__fastcall TForm4(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern TForm4 *Form4;
//---------------------------------------------------------------------------
#endif
Unit1.h:
//---------------------------------------------------------------------------
#ifndef Unit1H
#define Unit1H
//---------------------------------------------------------------------------
#include <vcl\Classes.hpp>
#include <vcl\Controls.hpp>
#include <vcl\StdCtrls.hpp>
#include <vcl\Forms.hpp>
#include <vcl\DBTables.hpp>
#include <vcl\DB.hpp>
#include <vcl\DBCtrls.hpp>
#include <vcl\Mask.hpp>
#include <vcl\Buttons.hpp>
#include <vcl\ComCtrls.hpp>
#include <vcl\DBGrids.hpp>
#include "Grids.hpp"
#include <vcl\ExtCtrls.hpp>
//---------------------------------------------------------------------------
class TForm3 : public TForm
{
__published: // IDE-managed Components
TLabel *Label1;
TLabel *Label2;
TLabel *Label3;
TLabel *Label4;
TDBEdit *DBEdit3;
TDBEdit *DBEdit6;
TLabel *Label6;
TLabel *Label7;
TDBEdit *DBEdit8;
TButton *Button1;
TButton *Button2;
TButton *Button5;
TLabel *Label5;
TDBEdit *DBEdit4;
TDBEdit *DBEdit1;
TDBEdit *DBEdit2;
TLabel *Label8;
TDBEdit *DBEdit5;
TBitBtn *BitBtn1;
TBitBtn *BitBtn2;
TButton *Button3;
TStatusBar *StatusBar1;
void __fastcall FormCreate(TObject *Sender);
void __fastcall Button1Click(TObject *Sender);
void __fastcall Button2Click(TObject *Sender);
void __fastcall Button6Click(TObject *Sender);
void __fastcall Button4Click(TObject *Sender);
void __fastcall Button5Click(TObject *Sender);
void __fastcall Table1AfterOpen(TDataSet *DataSet);
void __fastcall Button3Click(TObject *Sender);
private: // User declarations
public: // User declarations
__fastcall TForm3(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern TForm3 *Form3;
//---------------------------------------------------------------------------
#endif
2. Файлы с методами:
Project1.cpp:
//---------------------------------------------------------------------------
#include <vcl\vcl.h>
#pragma hdrstop
//---------------------------------------------------------------------------
USEFORM("kur1.cpp", Form1);
USEFORM("Richabt.cpp", Form2);
USERES("Project1.res");
USEFORM("Report.cpp", QRListForm);
USEDATAMODULE("Datam.cpp", DM1);
USEFORM("Unit1.cpp", Form3);
USEFORM("Findcust.cpp", fmFindCust);
USEFORM("Sort.cpp", Form4);
USEFORM("filter.cpp", Form5);
USEFORM("filename.cpp", Form6);
//---------------------------------------------------------------------------
WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
{
try
{
Application->Initialize();
Application->CreateForm(__classid(TForm1), &Form1);
Application->CreateForm(__classid(TQRListForm), &QRListForm);
Application->CreateForm(__classid(TDM1), &DM1);
Application->CreateForm(__classid(TForm3), &Form3);
Application->CreateForm(__classid(TfmFindCust), &fmFindCust);
Application->CreateForm(__classid(TForm4), &Form4);
Application->CreateForm(__classid(TForm5), &Form5);
Application->CreateForm(__classid(TForm6), &Form6);
Application->Run();
}
catch (Exception &exception)
{
Application->ShowException(&exception);
}
return 0;
}
//---------------------------------------------------------------------------
Kur1.cpp:
#include <vcl\vcl.h>
#include <stdio.h>
#pragma hdrstop
#include "kur1.h"
#include "RichAbt.h"
#include "Datam.h"
#include "Report.h"
#include "Unit1.h"
#include "Findcust.h"
#include "Sort.h"
#include "filter.h"
#include "filename.h"
//---------------------------------------------------------------------------
#pragma link "Grids"
#pragma resource "*.dfm"
TForm1 *Form1;
AnsiString ff;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
ff=Form1->Caption;
}
//---------------------------------------------------------------------------
void __fastcall TForm1::N10Click(TObject *Sender)
{
Form1->Caption=ff;
Form6->ShowModal();
N2->Enabled=true;
N20->Enabled=true;
N5->Enabled=true;
N14->Enabled=true;
N16->Enabled=true;
Form1->Caption =Form1->Caption+"->"+DM1->Table1->TableName;
}
//---------------------------------------------------------------------------
void __fastcall TForm1::N17Click(TObject *Sender)
{
Close();
}
//---------------------------------------------------------------------------
void __fastcall TForm1::N14Click(TObject *Sender)
{
QRListForm->QuickReport->Print();
}
//---------------------------------------------------------------------------
Страницы: 1, 2, 3, 4, 5, 6, 7, 8