-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFileReader.h
58 lines (47 loc) · 1.55 KB
/
FileReader.h
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
// author: Yuriy Yazev, july 2015
#pragma once
#include <iostream>
#include <string>
#include <clocale>
#include <locale>
#include <vector>
#include <io.h>
#include "FtpConnect.h"
#include "consts.h"
#include "resource.h"
#include "ClickImage.h"
#include "SkinProgress.h"
using namespace std;
class CFileReader
{
private:
CWnd *hWin;
DWORDLONG g_totalSize;
CSkinProgress *_TotalSkinProgress;
CRichEditCtrl *_percentText;
CRichEditCtrl *_speedText;
//íàäïèñü è êíîïêà-êàðòèíêà
CStatic *m_UpdateText;
CClickImage *m_EnterButton;
//FileDownData fileDownData;//ñâåäåíèÿ î ñêà÷èâàåìîì â äàííûé ìîìåíò ôàéëå
public:
CFileReader();
CFileReader(CWnd *hwin);
virtual ~CFileReader();
bool fileSearch(LPCWSTR dir, LPCWSTR file, LPCWSTR path, CFtpConnect& connect, DWORDLONG fileCRC = 0, DWORDLONG fileSize = 0);
void readLocalFile(CFtpConnect& connect);
void setWin(CWnd *hwin) { hWin = hwin; }
bool readTotalFilesSize(string file);
DWORDLONG getTotalSize(string file);
void setTotalProgress(CSkinProgress* prog);
void setPercentText(CRichEditCtrl* text) { _percentText = text; }
void setSpeedText(CRichEditCtrl* text) { _speedText = text; }
void HideLabelsShowButton();
void getWholeStr(ifstream &fin, string &res);
UINT32 calcCtrlSum(LPCWSTR path);
bool createDirSeq(LPCWSTR directory);//ñîçäàòü ïîñëåäîâàòåëüíîñòü äèðåêòîðèé
bool createDir(LPCWSTR directory);//ñîçäàòü êàòàëîã
void setUpdateText(CStatic *upText);
void setEnterButton(CClickImage *enterBut);
bool downloadFile(LPCWSTR path, CFtpConnect& connect, DWORDLONG fileSize, DWORDLONG totalSize);
};