00001
00002
00003
00004
00005
00006 #if !defined(AFX_CREATEDOWNLOADDLG_H__03F2DDF0_42A2_447A_A6F5_59C47F718201__INCLUDED_)
00007 #define AFX_CREATEDOWNLOADDLG_H__03F2DDF0_42A2_447A_A6F5_59C47F718201__INCLUDED_
00008
00009 #if _MSC_VER > 1000
00010 #pragma once
00011 #endif
00012
00013 #include "DownloadsWnd.h"
00014 #include "fsScheduleMgr.h"
00015 #include "DownloadsGroupsComboBox.h"
00016
00017 #define ID_DLNOTADDED (IDCANCEL+100)
00018
00019 class CCreateDownloadDlg : public CDialog
00020 {
00021
00022 public:
00023 static BOOL _CheckFolderName(CDialog *pdlg, UINT nIdCtrl);
00024
00025 static BOOL _CheckFileName (CDialog* pdlg, UINT nIdCtrl);
00026
00027 static BOOL _SetDownloadOutputFolderAsDefault (CWnd* pwndParent, LPCSTR pszFolder, vmsDownloadsGroupSmartPtr pGroup);
00028
00029 LPCSTR m_pszPostData;
00030
00031 LPCSTR m_pszCookies;
00032
00033 bool m_bPlaceAtTop;
00034
00035 bool m_bSetFocusToOKBtn;
00036
00037 vmsDownloadsGroupSmartPtr m_pGroup;
00038
00039 static fsSiteInfo* _SavePassword (vmsDownloadSmartPtr dld);
00040
00041 static fsSiteInfo* _SavePassword(LPCSTR pszServer, fsNetworkProtocol np, LPCSTR pszUser, LPCSTR pszPwd);
00042
00043 static int _CheckDownloadAlrExists (vmsDownloadSmartPtr dld, BOOL bNeedTopMost = FALSE, BOOL bShowUI = TRUE);
00044 BOOL m_bReqTopMostDialog;
00045 fsSchedule m_task;
00046 BOOL m_bScheduled;
00047 BOOL m_bAuthorization;
00048 CString m_strUrl;
00049
00050 CCreateDownloadDlg(vmsDownloadSmartPtr dld, LPCSTR pszStartUrl, LPCSTR pszComment, LPCSTR pszReferer, CWnd* pParent = NULL);
00051
00052
00053 enum { IDD = IDD_CREATEDOWNLOAD };
00054 CButton m_btnOutFolderSetDefault;
00055 CComboBox m_wndDldType;
00056 CButton m_btnSetTime;
00057 CButton m_btnCreateGroup;
00058 CButton m_btnChooseFolder;
00059
00060
00061
00062
00063 protected:
00064 virtual void DoDataExchange(CDataExchange* pDX);
00065
00066
00067 protected:
00068
00069 BOOL m_bUrlChanged;
00070 CString m_strReferer;
00071 CString m_strComment;
00072 volatile BOOL m_bNeedExit;
00073 volatile BOOL m_bThread;
00074
00075 static DWORD WINAPI _threadQSize (LPVOID lp);
00076 void PrepareCHMgr(CPoint point);
00077 int m_iAutostart;
00078 void ReadAutostart();
00079 void ApplyLanguage();
00080 void OnChangeGroups();
00081 BOOL m_bGroupChanged;
00082 BOOL m_bAuthChanged;
00083 void UrlChanged();
00084 void Update_User_Password();
00085
00086 BOOL ReadDNP();
00087 void WrongUserName();
00088 void WrongURL();
00089 CDownloadsGroupsComboBox m_wndGroups;
00090 vmsDownloadSmartPtr m_dld;
00091
00092 void UpdateEnabled();
00093
00094
00095 virtual void OnOK();
00096 virtual BOOL OnInitDialog();
00097 afx_msg void OnChangeSaveas();
00098 afx_msg void OnAuthorization();
00099 afx_msg void OnSelchangeGroups();
00100 afx_msg void OnStartnow();
00101 afx_msg void OnStartmanual();
00102 afx_msg void OnStartschedule();
00103 afx_msg void OnCreategroup();
00104 afx_msg void OnAdvanced();
00105 afx_msg void OnChoosefolder();
00106 afx_msg void OnSettime();
00107 afx_msg void OnEditchangeUrl();
00108 afx_msg void OnSelchangeUrl();
00109 afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
00110 afx_msg void OnWhatisthis();
00111 afx_msg void OnChangeUser();
00112 afx_msg void OnChangePassword();
00113 afx_msg BOOL OnHelpInfo(HELPINFO* pHelpInfo);
00114 afx_msg void OnQsize();
00115 virtual void OnCancel();
00116 afx_msg void OnFileauto();
00117 afx_msg void OnMirrors();
00118 afx_msg void OnSelchangeDldtype();
00119 afx_msg void OnMalicious();
00120 afx_msg void OnOutfolderSetdefault();
00121
00122 DECLARE_MESSAGE_MAP()
00123 };
00124
00125
00126
00127 #endif