Skip to content
Snippets Groups Projects
Commit a875609e authored by rswindell's avatar rswindell
Browse files

Checks SBBS.DLL version number on startup.

Added menu item click event for files in DATA dir.
parent 486b8f93
No related branches found
No related tags found
No related merge requests found
......@@ -600,6 +600,15 @@ void __fastcall TMainForm::FormCreate(TObject *Sender)
Height=400; // Just incase we mess it up in the IDE
Width=700;
// Verify SBBS.DLL version
long bbs_ver = bbs_ver_num();
if(bbs_ver < (0x300<<8) || bbs_ver > (0x399<<8)) {
char str[128];
sprintf(str,"Incorrect SBBS.DLL Version (%lX)",bbs_ver);
Application->MessageBox(str,"ERROR",MB_OK|MB_ICONEXCLAMATION);
Application->Terminate();
}
if(putenv("TZ=UCT0")) {
Application->MessageBox("Error settings timezone"
,"ERROR",MB_OK|MB_ICONEXCLAMATION);
......@@ -1707,6 +1716,20 @@ void __fastcall TMainForm::CtrlMenuItemEditClick(TObject *Sender)
delete TextFileEditForm;
}
void __fastcall TMainForm::DataMenuItemClick(TObject *Sender)
{
char filename[MAX_PATH+1];
sprintf(filename,"%s%s"
,MainForm->cfg.data_dir
,((TMenuItem*)Sender)->Hint.c_str());
Application->CreateForm(__classid(TTextFileEditForm), &TextFileEditForm);
TextFileEditForm->Filename=AnsiString(filename);
TextFileEditForm->Caption=((TMenuItem*)Sender)->Caption;
TextFileEditForm->ShowModal();
delete TextFileEditForm;
}
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
......@@ -1947,3 +1970,4 @@ void __fastcall TMainForm::HelpSysopMenuItemClick(TObject *Sender)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment