⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 set.cpp

📁 一种扫雷游戏的源代码
💻 CPP
字号:
//---------------------------------------------------------------------------

#include <vcl.h>
#pragma hdrstop

#include "set.h"
#include "MainForm.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
Tset_bomb *set_bomb;
//---------------------------------------------------------------------------
__fastcall Tset_bomb::Tset_bomb(TComponent* Owner)
    : TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall Tset_bomb::UpDown3Changing(TObject *Sender,
      bool &AllowChange)
{
UpDown3->Max = (StrToInt(Edit1->Text))*(StrToInt(Edit2->Text))-10;
}
//---------------------------------------------------------------------------

void __fastcall Tset_bomb::Edit2KeyPress(TObject *Sender, char &Key)
{
    Key = 0;    
}
//---------------------------------------------------------------------------

void __fastcall Tset_bomb::Button1Click(TObject *Sender)
{
    CleanBomb->globa_width = StrToInt(Edit2->Text);
    CleanBomb->globa_height = StrToInt(Edit1->Text);
    CleanBomb->globa_bomb_num = StrToInt(Edit3->Text);
    CleanBomb->init_interface(CleanBomb->globa_width,CleanBomb->globa_height,CleanBomb->globa_bomb_num);
}
//---------------------------------------------------------------------------

void __fastcall Tset_bomb::FormPaint(TObject *Sender)
{
    Edit2->Text = CleanBomb->globa_width;
    Edit1->Text = CleanBomb->globa_height;
    Edit3->Text = CleanBomb->globa_bomb_num;
}
//---------------------------------------------------------------------------

⌨️ 快捷键说明

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