📄 main.cpp
字号:
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "main.h"
#include "biolife.h"
#include "ORDFORM.h"
#include "INHERIT.h"
#include "MAST_DTL.h"
#include "BARGRAPH.h"
#include "NEWPREV.h"
#include "SAMPDEST.h"
#include "STATSAMP.h"
#include "CUSTPREV.h"
#include "ACECAN.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TFormMain *FormMain;
//---------------------------------------------------------------------------
__fastcall TFormMain::TFormMain(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TFormMain::Exit2Click(TObject *Sender)
{
Close();
}
//---------------------------------------------------------------------------
void __fastcall TFormMain::BiolifeReport1Click(TObject *Sender)
{
TFormBioLife *bio = new TFormBioLife(Application);
bio->Show();
}
//---------------------------------------------------------------------------
void __fastcall TFormMain::Invoices1Click(TObject *Sender)
{
TFormOrders *orders = new TFormOrders(Application);
orders->Show();
}
//---------------------------------------------------------------------------
void __fastcall TFormMain::Inherit1Click(TObject *Sender)
{
TFormInheritance *inherit = new TFormInheritance(Application);
inherit->Show();
}
//---------------------------------------------------------------------------
void __fastcall TFormMain::MasterDetail1Click(TObject *Sender)
{
TFormMasterDetail *masterdetail = new TFormMasterDetail(Application);
masterdetail->Show();
}
//---------------------------------------------------------------------------
void __fastcall TFormMain::BarGraph2Click(TObject *Sender)
{
TFormBarGraph *bargraph = new TFormBarGraph(Application);
bargraph->Show();
}
//---------------------------------------------------------------------------
void __fastcall TFormMain::CheckBox1Click(TObject *Sender)
{
if (CheckBox1->Checked) CustomPreview = Preview;
else CustomPreview = NULL;
}
//---------------------------------------------------------------------------
void __fastcall Preview(TSctPage *Page)
{
TNewPreview *np = new TNewPreview(Application);
np->SetAceFile(Page->PrintTo->AceFile);
np->OnAbort = Page->AbortGeneration;
Page->OnUpdate = np->UpdateStatus;
np->Show();
}
//---------------------------------------------------------------------------
void __fastcall TFormMain::CheckBox2Click(TObject *Sender)
{
if ((( TCheckBox *) Sender)->Checked) CustomStatus = MyStat;
else CustomStatus = NULL;
}
//---------------------------------------------------------------------------
void __fastcall MyStat(TSctPage *Page)
{
TSampleStatus *ss = new TSampleStatus(Application);
ss->Show();
ss->Report = Page->Report;
Page->OnUpdateStatus = ss->UpdateStatus;
}
void __fastcall TFormMain::CheckBox3Click(TObject *Sender)
{
if (((TCheckBox *) Sender)->Checked) CustomPrompt = MyPrompt;
else CustomPrompt = NULL;
}
//---------------------------------------------------------------------------
void __fastcall MyPrompt(TSctPage *Page, Boolean &Result)
{
TSampleDestination *OutForm = new TSampleDestination(Application);
OutForm->PageSetup = Page->PageSetup;
Result = (OutForm->ShowModal() == mrOk);
OutForm->Free();
}
//---------------------------------------------------------------------------
void __fastcall TFormMain::Canvas1Click(TObject *Sender)
{
TFormCanvas *canvas = new TFormCanvas(Application);
canvas->Show();
}
//---------------------------------------------------------------------------
void __fastcall TFormMain::CustomPreview1Click(TObject *Sender)
{
TFormCustomPreview *custompreview = new TFormCustomPreview(Application);
custompreview->Show();
}
//---------------------------------------------------------------------------
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -