main.cpp

来自「《bcb深度历险》 电子书」· C++ 代码 · 共 40 行

CPP
40
字号
//---------------------------------------------------------------------------

#include <vcl.h>
#pragma hdrstop

#include "main.h"
#include "about.h"
#include "tileunit.h"
#include "util.h"
#include "xFiles.hpp"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TMainForm *MainForm;
//---------------------------------------------------------------------------
__fastcall TMainForm::TMainForm(TComponent* Owner)
        : TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TMainForm::mnuExitClick(TObject *Sender)
{
  Close();        
}
//---------------------------------------------------------------------------

void __fastcall TMainForm::mnuAboutClick(TObject *Sender)
{
  TAboutBox* box = new TAboutBox(this);
  try {
    box->ShowModal();
  } __finally {
    delete box;
  }
}
//---------------------------------------------------------------------------

void __fastcall TMainForm::mnuNewClick(TObject *Sender)
{
  TTiles::Instance().FreeTiles(); // 穝

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?