forked from Thomas-Mielke-Software/EasyCash
-
Notifications
You must be signed in to change notification settings - Fork 0
/
DownloadDialog.h
83 lines (70 loc) · 1.92 KB
/
DownloadDialog.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
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
// NewDownloadDialog.h : header file
//
//#define FTP_DOWNLOAD_SERVER "168.100.0.2"
#define FTP_DOWNLOAD_SERVER "scr957.no-ip.org"
#define FTP_DOWNLOAD_PATH "/scr957ud/"
#define FTP_UPDATE_PATH "/update/"
#define FTP_UPDATE_VERSION_FILENAME "version.txt"
class CThreadParam : public CObject
{
public:
DECLARE_DYNAMIC( CThreadParam )
BOOL bOnlyUpdateCheck;
char Server[1000];
char FTP_Path[1000];
char local_Path[1000];
char Filename[1000];
int trans_bytes;
int total_bytes;
char *status_text;
BOOL cancel; // Kommando an Thread
BOOL canceled; // Bestätigung von Thread
BOOL check; // Check for update?
};
/////////////////////////////////////////////////////////////////////////////
// CDownloadDialog dialog
class CDownloadDialog : public CDialog
{
// Construction
public:
CDownloadDialog(INFOSTRUCT *info, CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CDownloadDialog)
enum { IDD = IDD_NEW_DOWNLOAD_DIALOG };
BOOL m_check;
//}}AFX_DATA
void UpdatePercent(int nNewPos);
int SetPos();
void PumpMessages();
void BuildComboBoxList();
BOOL CheckForUpdate();
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CDownloadDialog)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
// zur Kalkulation der Restzeit:
#define ETA_INTERVALL 500 // Timer-Intervall in Millisekunden
#define ETA_ARRAY_SIZE 30
int eta_array[ETA_ARRAY_SIZE];
int eta_n; // Anzahl gespeicherter Elemente im Array
INFOSTRUCT m_info;
CString m_URL;
CWinThread *m_thread;
CThreadParam* m_pThreadParam;
int m_nLower;
int m_nUpper;
BOOL bNotYetDownload;
BOOL bClipDownloadSuccess;
// Generated message map functions
//{{AFX_MSG(CDownloadDialog)
virtual BOOL OnInitDialog();
virtual void OnOK();
virtual void OnCancel();
afx_msg void OnTimer(UINT nIDEvent);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};