Repository navigation
Expand file tree
/
Copy pathFileView.cpp
More file actions
51 lines (45 loc) · 1.68 KB
/
Copy pathFileView.cpp
File metadata and controls
51 lines (45 loc) · 1.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "MapManager.h"
#include "FileView.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm3 *Form3;
//---------------------------------------------------------------------------
__fastcall TForm3::TForm3(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm3::AddData(TStrings* pData)
{
ListView1->Items->Clear();
// add map data
TListItem *ListItem;
SetFile(pData->Strings[0]);
for(int i=1;i<pData->Count; i++)
{
ListItem = ListView1->Items->Add();
ListItem->Caption = IntToStr(i);
ListItem->SubItems->Add(pData->Strings[i].Delete(pData->Strings[i].Pos("|"), pData->Strings[i].Length()));
ListItem->SubItems->Add(pData->Strings[i].Delete(1, pData->Strings[i].Pos("|")));
}
//SetFile(ListView1->Items->Item[4]->SubItems->Strings[1]);
}
//---------------------------------------------------------------------------
void __fastcall TForm3::SetFile(AnsiString pFileName)
{
if(FileExists(pFileName))
{
TMM_FileInfo file = Form1->MapManager1->DisplayFiles->GetFileInfo(pFileName);
Label4->Caption = file.FileLocation + file.FileName;
Label5->Caption = AnsiString(file.FileSize) + " Bytes";
Label6->Caption = file.FileDate;
Label8->Caption = file.CRC32;
Label10->Caption = file.Installed;
Label12->Caption = file.BelongsTo;
}
}
//---------------------------------------------------------------------------