RzComboBox1->Items->Add("Студент");
}
Fmain->role->Close();
RzComboBox1->ItemIndex = 0;
if (RzComboBox1->Items->Count == 1)
{
RzComboBox1->Style = csSimple;
RzComboBox1->ReadOnly = true;
}
RzComboBox1->Refresh();
}
//--------------------------------------------------------------------------void __fastcall TfrRolePlay::RzBitBtn2Click(TObject *Sender)
{
Fmain->Close();
}
//--------------------------------------------------------------------------void __fastcall TfrRolePlay::RzBitBtn1Click(TObject *Sender)
{
it = list_of_roles.begin();
if ((it = list_of_roles.find(RzComboBox1->Text)) == list_of_roles.end())
{
Application->MessageBoxA("Выбранная роль ошибочна. Продолжение невозможно", "Выбор роли", MB_OK + MB_ICONSTOP);
RzComboBox1->ItemIndex = 0;
goto L1;
}
else
Progr = (*it).second;
Fmain->Visible = false;
Fmain->isp.LoadLib(Progr, Fmain->user_uin);
Fmain->Visible = true;
L1:
}
//--------------------------------------------------------------------------void __fastcall TfrRolePlay::FrameExit(TObject *Sender)
{
list_of_roles.clear();
}
//--------------------------------------------------------------------------void __fastcall TfrRolePlay::FrameClick(TObject *Sender)
{
Fmain->frRolePlay1->SetFocus();
}
//---------------------------------------------------------------------------
TestSystem
//--------------------------------------------------------------------------#include <vcl.h>
#pragma hdrstop
//--------------------------------------------------------------------------USEFORM("fmRegistration.cpp", Fmain);
USEFORM("Registation.cpp", frRegistration); /* TFrame: File Type */
USEFORM("RolePlay.cpp", frRolePlay); /* TFrame: File Type */
USEFORM("DM.cpp", DM1); /* TDataModule: File Type */
//--------------------------------------------------------------------------WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
{
try
{
Application->Initialize();
Application->Title = "Интерактивная тестирующая система по физике";
Application->CreateForm(__classid(TFmain), &Fmain);
Application->CreateForm(__classid(TDM1), &DM1);
Application->Run();
}
catch (Exception &exception)
{
Application->ShowException(&exception);
}
catch (...)
{
try
{
throw Exception("");
}
catch (Exception &exception)
{
Application->ShowException(&exception);
}
}
return 0;
}
//---------------------------------------------------------------------------
Res
//--------------------------------------------------------------------------#include <vcl.h>
#pragma hdrstop
#include "Res.h"
#include "Unit2.h"
#include "Ttest.h"
#include "Tem.h"
//--------------------------------------------------------------------------#pragma package(smart_init)
#pragma link "RzButton"
#pragma resource "*.dfm"
TFresult *Fresult;
//--------------------------------------------------------------------------__fastcall TFresult::TFresult(TComponent* Owner)
: TForm(Owner)
{
}
//--------------------------------------------------------------------------void __fastcall TFresult::FormClose(TObject *Sender, TCloseAction &Action)
{
if (cnt > 0) {
for (int i = 0; i <= cnt - 1; i++) {
Ftest->viewer[i]->Free();
Ftest->viewert[i]->Free();
}
}
Ftest->end = true;
Ftest->Close();
}
//--------------------------------------------------------------------------void __fastcall TFresult::RzBitBtn1Click(TObject *Sender)
{
Close();
}
//--------------------------------------------------------------------------void __fastcall TFresult::FormActivate(TObject *Sender)
{
// Выводим конечную информацию
switch (Ftest->info.type_shabl) {
case 2: {
Уважаемый посетитель!
Чтобы распечатать файл, скачайте его (в формате Word).
Ссылка на скачивание - внизу страницы.