Лабораторные работы / ЛЗ1 / ЛЗ1
.docForm6->Show();
Form6->Label1->Caption = "";
Form6->Label2->Caption = "";
Form6->Label3->Caption = "";
Form6->Label4->Caption = "";
Form6->Label5->Caption = "";
Found = UserSearch(FN, InfoTmp);
Form6->Label5->Caption = "Найдено записей: "+IntToStr(Found);
Form6->Label1->Caption = "Наименование: "+Trans(InfoTmp.Name);
Form6->Label2->Caption = "Марка: "+Trans(InfoTmp.Mark);
if (InfoTmp.SeatsNumb != 0)
Form6->Label3->Caption = "Число мест: " + IntToStr(InfoTmp.SeatsNumb);
else
Form6->Label3->Caption = "Число мест: ";
if (InfoTmp.UseP != 0)
Form6->Label4->Caption = "Расход бензина: " + FloatToStr(InfoTmp.UseP);
else
Form6->Label4->Caption = "Расход бензина: ";
}
//---------------------------------------------------------------------------
void __fastcall TForm7::Button2Click(TObject *Sender)
{
Form7->Edit1->Text = "";
Form7->Edit2->Text = "";
Form7->Edit3->Text = "";
Form7->Edit4->Text = "";
}
//----------------------Unit7.h-----------------------------------------------------
#ifndef Unit7H
#define Unit7H
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
//---------------------------------------------------------------------------
class TForm7 : public TForm
{
__published: // IDE-managed Components
TLabel *Label1;
TLabel *Label2;
TEdit *Edit1;
TEdit *Edit2;
TEdit *Edit3;
TEdit *Edit4;
TButton *Button1;
TButton *Button2;
TLabel *Label3;
TLabel *Label4;
void __fastcall Button1Click(TObject *Sender);
void __fastcall Button2Click(TObject *Sender);
private: // User declarations
public: // User declarations
__fastcall TForm7(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern PACKAGE TForm7 *Form7;
//---------------------------------------------------------------------------
#endif