-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathUTCMGRApp.cpp
643 lines (542 loc) · 19.1 KB
/
UTCMGRApp.cpp
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
/******************************************************************************
** (C) Chris Oldwood
**
** MODULE: UTCMGRAPP.CPP
** COMPONENT: The Application.
** DESCRIPTION: The CUTCMGRApp class definition.
**
*******************************************************************************
*/
#include "Common.hpp"
#include "UTCMGRApp.hpp"
#include <Core/Algorithm.hpp>
/******************************************************************************
**
** Global variables.
**
*******************************************************************************
*/
// "The" application object.
CUTCMGRApp App;
/******************************************************************************
**
** Class constants.
**
*******************************************************************************
*/
#ifdef _DEBUG
const tchar* CUTCMGRApp::VERSION = TXT("v2.5 [Debug]");
#else
const tchar* CUTCMGRApp::VERSION = TXT("v2.5");
#endif
const tchar* CUTCMGRApp::INI_FILE_VER_10 = TXT("1.0");
const tchar* CUTCMGRApp::INI_FILE_VER_20 = TXT("2.0");
const tchar* CUTCMGRApp::INI_FILE_VER_25 = TXT("2.5");
/******************************************************************************
** Method: Constructor
**
** Description: Default constructor.
**
** Parameters: None.
**
** Returns: Nothing.
**
*******************************************************************************
*/
CUTCMGRApp::CUTCMGRApp()
: CApp(m_AppWnd, m_AppCmds)
, m_AppWnd(m_MainThread, m_AppCmds)
, m_AppCmds(m_AppWnd)
, m_oHelpFile(m_AppWnd)
, m_nModified(NONE)
, m_oCache()
, m_pProfile(nullptr)
, m_bScanOnStart(true)
, m_bScanOnSwitch(true)
, m_bScanForTmp(true)
, m_bScanIndex(true)
, m_bShowAllFiles(false)
, m_bLogEdits(true)
, m_bIgnoreDates(true)
{
// Set the help file path.
m_oHelpFile.m_HelpFile = CPath(CPath::ApplicationDir(), TXT("UTCacheMgr.hlp"));
}
/******************************************************************************
** Method: Destructor
**
** Description: Cleanup.
**
** Parameters: None.
**
** Returns: Nothing.
**
*******************************************************************************
*/
CUTCMGRApp::~CUTCMGRApp()
{
Core::deleteAll(m_aoProfiles);
}
/******************************************************************************
** Method: OnOpen()
**
** Description: Initialises the application.
**
** Parameters: None.
**
** Returns: true or false.
**
*******************************************************************************
*/
bool CUTCMGRApp::OnOpen()
{
// Set the app title.
m_strTitle = TXT("UT Cache Manager");
// Load settings.
LoadConfig();
// Create the main window.
if (!m_AppWnd.Create())
return false;
// Show it.
if (!m_rcLastWndPos.Empty())
m_AppWnd.Move(m_rcLastWndPos);
m_AppWnd.Show(m_iCmdShow);
// Initialise UI.
BuildProfileMenu();
m_AppCmds.InitialiseUI();
// Scan on startup?
if (m_bScanOnStart)
m_AppWnd.PostCommand(ID_CACHE_RESCAN);
return true;
}
/******************************************************************************
** Method: OnClose()
**
** Description: Cleans up the application resources.
**
** Parameters: None.
**
** Returns: true or false.
**
*******************************************************************************
*/
bool CUTCMGRApp::OnClose()
{
// Save settings.
SaveConfig();
return true;
}
/******************************************************************************
** Method: LoadConfig()
**
** Description: Load the app configuration.
**
** Parameters: None.
**
** Returns: Nothing.
**
*******************************************************************************
*/
void CUTCMGRApp::LoadConfig()
{
// Read the file version.
CString strVer = m_oIniFile.ReadString(TXT("Version"), TXT("Version"), TXT(""));
// If first run, mark all settings as modified.
if (strVer == TXT(""))
m_nModified = SETTINGS | PROFILES | PIN_LIST;
// Read the cache general settings.
m_strCacheIndex = m_oIniFile.ReadString(TXT("Cache"), TXT("Index"), CProfile::DEF_CACHE_IDX_FILE);
m_strCacheExt = m_oIniFile.ReadString(TXT("Cache"), TXT("Ext"), CProfile::DEF_CACHE_FILE_EXT);
m_bScanOnStart = m_oIniFile.ReadBool (TXT("Cache"), TXT("ScanOnStart"), m_bScanOnStart);
m_bScanOnSwitch = m_oIniFile.ReadBool (TXT("Cache"), TXT("ScanOnSwitch"), m_bScanOnSwitch);
m_bScanForTmp = m_oIniFile.ReadBool (TXT("Cache"), TXT("ScanForTmp"), m_bScanForTmp);
m_bScanIndex = m_oIniFile.ReadBool (TXT("Cache"), TXT("ScanIndex"), m_bScanIndex);
m_bShowAllFiles = m_oIniFile.ReadBool (TXT("Cache"), TXT("ShowAllFiles"), m_bShowAllFiles);
m_bLogEdits = m_oIniFile.ReadBool (TXT("Cache"), TXT("LogEdits"), m_bLogEdits);
m_bIgnoreDates = m_oIniFile.ReadBool (TXT("Cache"), TXT("IgnoreDates"), m_bIgnoreDates);
// Read the number of profiles.
uint nProfiles = m_oIniFile.ReadInt(TXT("Profiles"), TXT("Count"), 0);
// Read the profiles.
for (uint i = 0; i < nProfiles; ++i)
{
CString strSection;
CProfile oProfile;
// Create section name.
strSection.Format(TXT("Profile%d"), i);
// Read profile details.
oProfile.m_strName = m_oIniFile.ReadString(strSection, TXT("Name"), TXT(""));
oProfile.m_nFormat = m_oIniFile.ReadInt (strSection, TXT("Format"), CProfile::UT_FORMAT);
oProfile.m_strCacheDir = m_oIniFile.ReadString(strSection, TXT("CacheDir"), TXT(""));
oProfile.m_bReadOnly = m_oIniFile.ReadBool (strSection, TXT("ReadOnly"), false);
oProfile.m_strSystemDir = m_oIniFile.ReadString(strSection, TXT("SystemDir"), TXT(""));
oProfile.m_strMapDir = m_oIniFile.ReadString(strSection, TXT("MapDir"), TXT(""));
oProfile.m_strTextureDir = m_oIniFile.ReadString(strSection, TXT("TextureDir"), TXT(""));
oProfile.m_strSoundDir = m_oIniFile.ReadString(strSection, TXT("SoundDir"), TXT(""));
oProfile.m_strMusicDir = m_oIniFile.ReadString(strSection, TXT("MusicDir"), TXT(""));
oProfile.m_strMeshDir = m_oIniFile.ReadString(strSection, TXT("MeshDir"), TXT(""));
oProfile.m_strAnimDir = m_oIniFile.ReadString(strSection, TXT("AnimDir"), TXT(""));
oProfile.m_strKarmaDir = m_oIniFile.ReadString(strSection, TXT("KarmaDir"), TXT(""));
oProfile.m_strConfigFile = m_oIniFile.ReadString(strSection, TXT("ConfigFile"), TXT(""));
oProfile.m_strLastCopyTo = m_oIniFile.ReadString(strSection, TXT("LastCopyTo"), TXT(""));
oProfile.m_strLastImport = m_oIniFile.ReadString(strSection, TXT("LastImport"), TXT(""));
oProfile.m_strLastInstall = m_oIniFile.ReadString(strSection, TXT("LastInstall"), TXT(""));
// If valid, add to collection.
if (oProfile.m_strName.Length() > 0)
m_aoProfiles.push_back(new CProfile(oProfile));
}
// Read the default profile.
m_strDefProfile = m_oIniFile.ReadString(TXT("Profiles"), TXT("Default"), TXT(""));
// Find the default profile.
if (m_strDefProfile != TXT(""))
m_pProfile = FindProfile(m_strDefProfile);
// New installation?.
if (m_pProfile == nullptr)
{
CProfile* pProfile = nullptr;
// Look for a UT installation.
if ((pProfile = CProfile::DetectUT()) != nullptr)
m_aoProfiles.push_back(pProfile);
// Look for a UT2003 installation.
if ((pProfile = CProfile::DetectUT2003()) != nullptr)
m_aoProfiles.push_back(pProfile);
// Look for a UT2004 installation.
if ((pProfile = CProfile::DetectUT2004()) != nullptr)
m_aoProfiles.push_back(pProfile);
// Look for a Tactical Ops installation.
if ((pProfile = CProfile::DetectTacOps()) != nullptr)
m_aoProfiles.push_back(pProfile);
// If nothing detected, create a default UT one.
if (m_aoProfiles.empty())
{
// Warn user.
AlertMsg(TXT("No UT/TO/UT2003/UT2004 installation could not be detected.\n\n")
TXT("The inital cache scan may fail as it is performed on\n")
TXT("the default UT installation folder."));
m_pProfile = new CProfile();
// Initialise profile with sensible defaults.
m_pProfile->m_strName = CProfile::DEF_UT_PROFILE_NAME;
m_pProfile->m_nFormat = CProfile::UT_FORMAT;
m_pProfile->m_strCacheDir = CPath(CProfile::DEF_ROOT_DIR, CProfile::DEF_CACHE_DIR );
m_pProfile->m_bReadOnly = false;
m_pProfile->m_strSystemDir = CPath(CProfile::DEF_ROOT_DIR, CProfile::DEF_SYSTEM_DIR );
m_pProfile->m_strMapDir = CPath(CProfile::DEF_ROOT_DIR, CProfile::DEF_MAPS_DIR );
m_pProfile->m_strTextureDir = CPath(CProfile::DEF_ROOT_DIR, CProfile::DEF_TEXTURES_DIR);
m_pProfile->m_strSoundDir = CPath(CProfile::DEF_ROOT_DIR, CProfile::DEF_SOUNDS_DIR );
m_pProfile->m_strMusicDir = CPath(CProfile::DEF_ROOT_DIR, CProfile::DEF_MUSIC_DIR );
m_pProfile->m_strConfigFile = CPath(m_pProfile->m_strSystemDir, CProfile::DEF_CONFIG_FILE );
m_aoProfiles.push_back(m_pProfile);
}
ASSERT(!m_aoProfiles.empty());
// Set the default profile.
m_pProfile = m_aoProfiles[0];
m_strDefProfile = m_pProfile->m_strName;
}
ASSERT(m_pProfile != nullptr);
// Read the number of pinned files.
uint nPinned = m_oIniFile.ReadInt(TXT("Pinned"), TXT("Count"), 0);
// Read the pinned files.
for (uint i = 0; i < nPinned; ++i)
{
CString strEntry;
CString strName;
// Create entry name.
strEntry.Format(TXT("File%d"), i);
strName = m_oIniFile.ReadString(TXT("Pinned"), strEntry, TXT(""));
// Add if valid and not already listed.
if ((strName.Length() > 0) && (m_astrPinned.Find(strName, false) == -1))
m_astrPinned.Add(strName);
}
// Read the previous UI settings.
m_rcLastWndPos = m_oIniFile.ReadRect(TXT("UI"), TXT("MainWindow"), CRect());
m_rcLastDlgPos = m_oIniFile.ReadRect(TXT("UI"), TXT("SelFilesDlg"), CRect());
if ( (strVer == INI_FILE_VER_10) || (strVer == INI_FILE_VER_20) )
{
m_rcLastWndPos.left = m_oIniFile.ReadInt(TXT("UI"), TXT("Left"), 0);
m_rcLastWndPos.top = m_oIniFile.ReadInt(TXT("UI"), TXT("Top"), 0);
m_rcLastWndPos.right = m_oIniFile.ReadInt(TXT("UI"), TXT("Right"), 0);
m_rcLastWndPos.bottom = m_oIniFile.ReadInt(TXT("UI"), TXT("Bottom"), 0);
}
}
/******************************************************************************
** Method: SaveConfig()
**
** Description: Save the app configuration.
**
** Parameters: None.
**
** Returns: Nothing.
**
*******************************************************************************
*/
void CUTCMGRApp::SaveConfig()
{
// Write the file version.
m_oIniFile.WriteString(TXT("Version"), TXT("Version"), INI_FILE_VER_25);
// Application settings changed?
if (m_nModified & SETTINGS)
{
// Write the cache general settings.
m_oIniFile.WriteString(TXT("Cache"), TXT("Index"), m_strCacheIndex);
m_oIniFile.WriteString(TXT("Cache"), TXT("Ext"), m_strCacheExt);
m_oIniFile.WriteBool (TXT("Cache"), TXT("ScanOnStart"), m_bScanOnStart);
m_oIniFile.WriteBool (TXT("Cache"), TXT("ScanOnSwitch"), m_bScanOnSwitch);
m_oIniFile.WriteBool (TXT("Cache"), TXT("ScanForTmp"), m_bScanForTmp);
m_oIniFile.WriteBool (TXT("Cache"), TXT("ScanIndex"), m_bScanIndex);
m_oIniFile.WriteBool (TXT("Cache"), TXT("ShowAllFiles"), m_bShowAllFiles);
m_oIniFile.WriteBool (TXT("Cache"), TXT("LogEdits"), m_bLogEdits);
m_oIniFile.WriteBool (TXT("Cache"), TXT("IgnoreDates"), m_bIgnoreDates);
m_oIniFile.WriteString(TXT("Profiles"), TXT("Default"), m_strDefProfile);
}
// Profiles changed?
if (m_nModified & PROFILES)
{
// Write the profiles.
m_oIniFile.WriteInt(TXT("Profiles"), TXT("Count"), static_cast<int>(m_aoProfiles.size()));
for (uint i = 0; i < m_aoProfiles.size(); ++i)
{
CString strSection;
CProfile* pProfile = m_aoProfiles[i];
// Create section name.
strSection.Format(TXT("Profile%d"), i);
// Write profile details.
m_oIniFile.WriteString(strSection, TXT("Name"), pProfile->m_strName );
m_oIniFile.WriteInt (strSection, TXT("Format"), pProfile->m_nFormat );
m_oIniFile.WriteString(strSection, TXT("CacheDir"), pProfile->m_strCacheDir );
m_oIniFile.WriteBool (strSection, TXT("ReadOnly"), pProfile->m_bReadOnly );
m_oIniFile.WriteString(strSection, TXT("SystemDir"), pProfile->m_strSystemDir );
m_oIniFile.WriteString(strSection, TXT("MapDir"), pProfile->m_strMapDir );
m_oIniFile.WriteString(strSection, TXT("TextureDir"), pProfile->m_strTextureDir);
m_oIniFile.WriteString(strSection, TXT("SoundDir"), pProfile->m_strSoundDir );
m_oIniFile.WriteString(strSection, TXT("MusicDir"), pProfile->m_strMusicDir );
m_oIniFile.WriteString(strSection, TXT("MeshDir"), pProfile->m_strMeshDir );
m_oIniFile.WriteString(strSection, TXT("AnimDir"), pProfile->m_strAnimDir );
m_oIniFile.WriteString(strSection, TXT("KarmaDir"), pProfile->m_strKarmaDir );
m_oIniFile.WriteString(strSection, TXT("ConfigFile"), pProfile->m_strConfigFile);
m_oIniFile.WriteString(strSection, TXT("LastCopyTo"), pProfile->m_strLastCopyTo);
m_oIniFile.WriteString(strSection, TXT("LastImport"), pProfile->m_strLastImport);
m_oIniFile.WriteString(strSection, TXT("LastInstall"), pProfile->m_strLastInstall);
}
}
// Pinned files list changed?
if (m_nModified & PIN_LIST)
{
// Write the list of pinned files.
m_oIniFile.DeleteSection(TXT("Pinned"));
m_oIniFile.WriteInt (TXT("Pinned"), TXT("Count"), static_cast<int>(m_astrPinned.Size()));
for (size_t i = 0; i < m_astrPinned.Size(); ++i)
{
CString strEntry;
// Create entry name.
strEntry.Format(TXT("File%d"), i);
m_oIniFile.WriteString(TXT("Pinned"), strEntry, m_astrPinned[i]);
}
}
// Save the current UI settings.
m_oIniFile.WriteRect(TXT("UI"), TXT("MainWindow"), m_rcLastWndPos);
m_oIniFile.WriteRect(TXT("UI"), TXT("SelFilesDlg"), m_rcLastDlgPos);
}
/******************************************************************************
** Method: FindProfile()
**
** Description: Finds a profile by name.
**
** Parameters: None.
**
** Returns: The profile or nullptr.
**
*******************************************************************************
*/
CProfile* CUTCMGRApp::FindProfile(const tchar* pszName) const
{
ASSERT(pszName != nullptr);
// For all profiles...
for (uint i = 0; i < m_aoProfiles.size(); ++i)
{
if (m_aoProfiles[i]->m_strName.Compare(pszName, true) == 0)
return m_aoProfiles[i];
}
return nullptr;
}
/******************************************************************************
** Method: FindProfileByCfgFile()
**
** Description: Finds a profile by its config (.ini) file.
**
** Parameters: strCfgFile.
**
** Returns: The profile or nullptr.
**
*******************************************************************************
*/
CProfile* CUTCMGRApp::FindProfileByCfgFile(const CPath& strCfgFile) const
{
// For all profiles...
for (uint i = 0; i < m_aoProfiles.size(); ++i)
{
if (m_aoProfiles[i]->m_strConfigFile.Compare(strCfgFile, true) == 0)
return m_aoProfiles[i];
}
return nullptr;
}
/******************************************************************************
** Method: GetProfileIndex()
**
** Description: Gets the index of a profile.
**
** Parameters: pProfile The profile.
**
** Returns: The index or -1 if not found.
**
*******************************************************************************
*/
int CUTCMGRApp::GetProfileIndex(CProfile* pProfile) const
{
ASSERT(pProfile != nullptr);
// For all profiles...
for (uint i = 0; i < m_aoProfiles.size(); ++i)
{
if (m_aoProfiles[i] == pProfile)
return i;
}
return -1;
}
/******************************************************************************
** Method: BuildProfileMenu()
**
** Description: Builds the Cache | Profile sub-menu.
**
** Parameters: None.
**
** Returns: Nothing.
**
*******************************************************************************
*/
void CUTCMGRApp::BuildProfileMenu()
{
// Ensure profile list is sorted.
std::sort(m_aoProfiles.begin(), m_aoProfiles.end(), CProfile::Compare);
// Delete old menu.
for (int i = ID_CACHE_FIRST_PROFILE; i <= ID_CACHE_LAST_PROFILE; ++i)
App.m_AppWnd.m_Menu.RemoveCmd(i);
CPopupMenu oCacheMenu = App.m_AppWnd.m_Menu.GetItemPopup(0).GetItemPopup(0);
// Build new menu.
for (uint i = 0; i < m_aoProfiles.size(); ++i)
oCacheMenu.InsertCmd(i, ID_CACHE_FIRST_PROFILE + i, m_aoProfiles[i]->m_strName);
}
/******************************************************************************
** Method: FormatType()
**
** Description: Convert the file type to a string.
**
** Parameters: cType The file type.
**
** Returns: The type as a string.
**
*******************************************************************************
*/
CString CUTCMGRApp::FormatType(tchar cType) const
{
switch (cType)
{
case SYSTEM_FILE: return TXT("System");
case MAP_FILE: return TXT("Map");
case TEXTURE_FILE: return TXT("Texture");
case SOUND_FILE: return TXT("Sound");
case MUSIC_FILE: return TXT("Music");
case MESH_FILE: return TXT("Mesh");
case ANIM_FILE: return TXT("Anim");
case KARMA_FILE: return TXT("Karma");
}
ASSERT_FALSE();
return TXT("");
}
/******************************************************************************
** Method: FormatSize()
**
** Description: Convert the file size to a string.
**
** Parameters: nSize The file size.
**
** Returns: The size as a string.
**
*******************************************************************************
*/
CString CUTCMGRApp::FormatSize(int nSize) const
{
CString str;
// Ensure we report at least 1K.
nSize = std::max(1024, nSize);
str.Format(TXT("%d K"), nSize/1024);
return str;
}
/******************************************************************************
** Method: FormatStatus()
**
** Description: Convert the file status to a string.
**
** Parameters: cStatus The file status.
**
** Returns: The status as a string.
**
*******************************************************************************
*/
CString CUTCMGRApp::FormatStatus(tchar cStatus) const
{
switch (cStatus)
{
case NEW_FILE : return TXT("New");
case OLD_FILE : return TXT("Old");
case PIN_FILE : return TXT("Pinned");
}
ASSERT_FALSE();
return TXT("");
}
/******************************************************************************
** Method: IconIndex()
**
** Description: Gets the index of the icon for the given file type.
**
** Parameters: cType The file type.
**
** Returns: The icon index.
**
*******************************************************************************
*/
int CUTCMGRApp::IconIndex(tchar cType) const
{
switch (cType)
{
case SYSTEM_FILE: return 0;
case MAP_FILE: return 1;
case TEXTURE_FILE: return 2;
case SOUND_FILE: return 3;
case MUSIC_FILE: return 4;
case MESH_FILE: return 5;
case ANIM_FILE: return 6;
case KARMA_FILE: return 7;
}
ASSERT_FALSE();
return -1;
}
/******************************************************************************
** Method: UpdateCacheStatus()
**
** Description: Updates the cache status bar message.
**
** Parameters: None.
**
** Returns: Nothing.
**
*******************************************************************************
*/
void CUTCMGRApp::UpdateCacheStatus()
{
size_t nFiles = m_oCache.RowCount();
double dSize = 0.0;
// Sum file sizes...
for (size_t i = 0; i < nFiles; ++i)
dSize += m_oCache[i][CCache::FILE_SIZE].GetInt();
// Format and display it.
App.m_strDefStatus.Format(TXT("Total: %d Files - %.2f MB"), nFiles, dSize / (1024.0*1024.0));
App.m_AppWnd.m_StatusBar.Hint(App.m_strDefStatus);
}