#include <vcl.h>
#ifndef class_infoH
#define class_infoH
//---------------------------------------------------------------------------
class info_Application
{
private:
UnicodeString file_name;
TSearchRec attribute;
UnicodeString directory;
UnicodeString extract_file;
UnicodeString symbol_disc;
UnicodeString path_file;
int size_file;
UnicodeString last_modification;
public:
info_Application(UnicodeString file);
void show_Informations(TListBox *l_box);
};
#endif
#include <vcl.h>
#pragma hdrstop
#include "class_info.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
info_Application::info_Application(UnicodeString file)
{
file_name=file;
directory=ExtractFileDir(file_name);
extract_file=ExtractFileName(file_name);
symbol_disc=ExtractFileDrive(file_name);
path_file=ExtractRelativePath(GetCurrentDir(),file_name);
size_file=attribute.Size;
last_modification=UnicodeString(DateTimeToStr(FileDateToDateTime(attribute.Time)));
}
void info_Application::show_Informations(TListBox *l_box)
{
l_box->Items->Add("Application name: "+file_name);
l_box->Items->Add("Directory: "+directory);
l_box->Items->Add("Extract file: "+extract_file);
l_box->Items->Add("Disc: "+symbol_disc);
l_box->Items->Add("Path: "+path_file);
l_box->Items->Add("Size: "+IntToStr(size_file));
l_box->Items->Add("Date last modification: " +last_modification);
}
Brak komentarzy:
Prześlij komentarz