Проектирование параллельных алгоритмов в задачах идентификации. Вашкевич Н.П - 45 стр.

UptoLike

45
void __fastcall TForm1::DirectoryListBox1Change(TObject *Sender)
{
DirectoryListBox1-Drive = DriveComboBox1-Drive;
FileListBox1-Drive = DriveComboBox1-Drive;
FileListBox1-Directory = DirectoryListBox1-Directory;
Edit1-Text=DirectoryListBox1-Directory;
file=false;
}
//---------------------------------------------------------------------------
void __fastcall TForm1::FileListBox1Change(TObject *Sender)
{
DirectoryListBox1-Drive = DriveComboBox1-Drive;
FileListBox1-Drive = DriveComboBox1-Drive;
FileListBox1-Directory = DirectoryListBox1-Directory;
Edit1-Text=FileListBox1-FileName;
file=true;
}
//---------------------------------------------------------------------------
result.h - заголовочный файл
//----------------------------------------------------------------------------
#ifndef OCBH
#define OCBH
//----------------------------------------------------------------------------
#include <System.hpp
#include <Windows.hpp
#include <SysUtils.hpp
#include <Classes.hpp
#include <Graphics.hpp
#include <StdCtrls.hpp
#include <Forms.hpp
#include <Controls.hpp
#include <Buttons.hpp
#include <ExtCtrls.hpp
#include <dir.h
//----------------------------------------------------------------------------
class TOKBottomDlg : public TForm
{
__published:
TButton *CancelBtn;
TListBox *ListBox1;
TLabel *Label1;
private:
char path[256];
TStringList *dirItem;
void scanDir(char *,TStringList *);
public:
virtual __fastcall TOKBottomDlg(TComponent* ,char *,bool);
};
//----------------------------------------------------------------------------
extern PACKAGE TOKBottomDlg *OKBottomDlg;
//----------------------------------------------------------------------------
#endif
result.cpp - форма "Результат полного сканирования каталога"
//---------------------------------------------------------------------
#include <vcl.h
void __fastcall TForm1::DirectoryListBox1Change(TObject *Sender)
{
DirectoryListBox1-Drive = DriveComboBox1-Drive;
FileListBox1-Drive = DriveComboBox1-Drive;
FileListBox1-Directory = DirectoryListBox1-Directory;
Edit1-Text=DirectoryListBox1-Directory;
file=false;
}
//---------------------------------------------------------------------------
void __fastcall TForm1::FileListBox1Change(TObject *Sender)
{
DirectoryListBox1-Drive = DriveComboBox1-Drive;
FileListBox1-Drive = DriveComboBox1-Drive;
FileListBox1-Directory = DirectoryListBox1-Directory;
Edit1-Text=FileListBox1-FileName;
file=true;
}
//---------------------------------------------------------------------------
result.h - заголовочный файл
//----------------------------------------------------------------------------
#ifndef OCBH
#define OCBH
//----------------------------------------------------------------------------
#include