86
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TResultForm *ResultForm;
//---------------------------------------------------------------------------
__fastcall TResultForm::TResultForm(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TResultForm::FormShow(TObject *Sender)
{
int balls = (int)(((float)qtyTrue / (float)qty) * 100.0);
int n;
int *mas = openProfile(currentProfile, n);
int *newMas = new int[n+1];
for(int i = 0; i < n; i++)
{
newMas[i] = mas[i];
}
newMas[n] = balls;
saveProfile(currentProfile, newMas, n+1);
QtyPnl->Caption = IntToStr(qty);
TruePnl->Caption = IntToStr(qtyTrue);
BallsPnl->Caption = IntToStr(balls);
}
//---------------------------------------------------------------------------
void __fastcall TResultForm::CloseBtClick(TObject *Sender)
{
Close();
}