[go: up one dir, main page]

Menu

[r8]: / toucan / trunk / secure.h  Maximize  Restore  History

Download this file

46 lines (39 with data), 1.2 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
#include <wx/file.h>
#include <wx/filefn.h>
#include <wx/dir.h>
#include "cryptfile.h"
#include "cryptdir.h"
#include "normalise.h"
#include "frmprogress.h"
bool Secure(wxArrayString arrLocation, wxString strFunction, wxString strPass, bool blBox)
{
frmProgress* window = new frmProgress(NULL, ID_FRMPROGRESS, _("Progress"));
window->m_OK->Enable(false);
window->m_Save->Enable(false);
window->m_Progress_Text->SetValue(_("Starting..."));
if(blBox)
{
window->Show();
}
window->Update();
unsigned int i;
for(i = 0; i < arrLocation.Count(); i++)
{
arrLocation.Item(i) = Normalise(arrLocation.Item(i));
arrLocation.Item(i) = Normalise(arrLocation.Item(i));
//wxMessageBox(arrLocation.Item(i));
if(wxDirExists(arrLocation.Item(i)))
{
//wxMessageBox(wxT("Crypt Dir ") + arrLocation.Item(i));
CryptDir(arrLocation.Item(i), strPass, strFunction, window);
}
else
{
//wxMessageBox(wxT("Crypt File ") + arrLocation.Item(i));
CryptFile(arrLocation.Item(i), strPass, strFunction, window);
}
}
window->m_OK->Enable(true);
window->m_Save->Enable(true);
return true;
}