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

📄 setupfrm.~cpp

📁 用C++BUILDER做的一个迷宫,可以实现深度优先,广度优先和启发式搜索算法
💻 ~CPP
字号:
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include <cstdlib>
#include <ctime>

#include "SetUpFrm.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TFrmSetUp *FrmSetUp;
//---------------------------------------------------------------------------
__fastcall TFrmSetUp::TFrmSetUp(TComponent* Owner)
   : TForm(Owner)
{
   bili=0.25;
}
//---------------------------------------------------------------------------
void __fastcall TFrmSetUp::Button1Click(TObject *Sender)
{
   if(edtbili->Text.IsEmpty())
   {
            Application->MessageBox("请输入0~1之间的一个数","提示",MB_OK);
      return;
   }
   if(StrToFloat(edtbili->Text)>1||StrToFloat(edtbili->Text)<=0)
   {
      Application->MessageBox("请输入0~1之间的一个数","提示",MB_OK);
      return;
   }
   if(StrToFloatDef(edtbili->Text,1000)==1000)
   {
           Application->MessageBox("请输入0~1之间的一个数","提示",MB_OK);
      return;
   }
   bili=StrToFloat(edtbili->Text);
   FrmSetUp->Close();
}
//---------------------------------------------------------------------------



void __fastcall TFrmSetUp::Button2Click(TObject *Sender)
{
   Close();   
}
//---------------------------------------------------------------------------



void __fastcall TFrmSetUp::FormShow(TObject *Sender)
{
   FrmSetUp->Left=340;
   FrmSetUp->Top=240;
}
//---------------------------------------------------------------------------



⌨️ 快捷键说明

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