DlgNewDownload.h
上传用户:lds876
上传日期:2013-05-25
资源大小:567k
文件大小:3k
源码类别:

P2P编程

开发平台:

Visual C++

  1. #if !defined(AFX_DLGNEWDOWNLOAD_H__6508502C_3476_4E01_8428_39473C2201E7__INCLUDED_)
  2. #define AFX_DLGNEWDOWNLOAD_H__6508502C_3476_4E01_8428_39473C2201E7__INCLUDED_
  3. #if _MSC_VER > 1000
  4. #pragma once
  5. #endif // _MSC_VER > 1000
  6. // DlgNewDownload.h : header file
  7. //
  8. #include "CategoryBarWnd.h"
  9. #include "CategoryCombobox.h"
  10. #include "HistoryComboEx.h"
  11. #include "SubFilesWnd.h"
  12. #include "SplitterBar.h"
  13. #include "ButtonEx.h"
  14. #include "ExpandingDialog.h"
  15. class CCategoryBarWnd;
  16. class CTreeCursor;
  17. class CFileTorrent;
  18. /////////////////////////////////////////////////////////////////////////////
  19. // CDlgNewDownload dialog
  20. class CDlgNewDownload : public CExpandingDialog
  21. {
  22. // Construction
  23. public:
  24. CDlgNewDownload(CImageList* pImageList, CFileTorrent* pfiletorrent, 
  25. CCategoryBarWnd* pCategoryBarWnd, bool bNewOrProperty, CFileDBItem* pFileDBItem = 0, long lDirectoryID = 0, 
  26. string strDirectorySave = string(), CWnd* pParent = NULL);   // standard constructor
  27. // Dialog Data
  28. //{{AFX_DATA(CDlgNewDownload)
  29. enum { IDD = IDD_DIALOG_NEW_DOWNLOAD };
  30. CButtonEx m_btnMore;
  31. CButtonEx m_btnDownloadLater;
  32. CButtonEx m_btnBrowseDir;
  33. CButtonEx m_btnCategoryNew;
  34. CButtonEx m_btnSaveAsDef;
  35. CButtonEx m_btnCancel;
  36. CButtonEx m_btnOK;
  37. CSubFilesWnd m_treeSubFiles;
  38. CHistoryComboEx m_cbDirectorySave;
  39. CCategoryCombobox m_cbCategory;
  40. CString m_strRename;
  41. CString m_strInfohash;
  42. CString m_strUrl;
  43. CString m_strComment;
  44. CString m_strTorrentFileName;
  45. int m_iStartMode;
  46. //}}AFX_DATA
  47. // out
  48. HTREEITEM m_ItemSel;
  49. string m_strDirectorySave; 
  50. // Overrides
  51. // ClassWizard generated virtual function overrides
  52. //{{AFX_VIRTUAL(CDlgNewDownload)
  53. protected:
  54. virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
  55. //}}AFX_VIRTUAL
  56. // Implementation
  57. protected:
  58. // Generated message map functions
  59. //{{AFX_MSG(CDlgNewDownload)
  60. virtual BOOL OnInitDialog();
  61. virtual void OnOK();
  62. afx_msg void OnSelchangeComboCategory();
  63. afx_msg void OnButtonCategoryNew();
  64. afx_msg void OnButtonDirectorySelect();
  65. afx_msg void OnButtonSaveAsDefault();
  66. afx_msg void OnDestroy();
  67. afx_msg void OnRadioDownloadManualy();
  68. afx_msg void OnRadioDownloadImmediately();
  69. afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
  70. //}}AFX_MSG
  71. void OnButtonDownloadLater();
  72. void OnSplitterMoved(long lParam, long wParam);
  73. DECLARE_MESSAGE_MAP()
  74. private:
  75. bool ApplyData();
  76. void SetCheck(UINT idBtn);
  77. void LoadState();
  78. void SaveState();
  79. void SaveStateWhenDestory();
  80. static const CString m_strSection;
  81. void LoadTorrent();
  82. void Load();
  83. void Copy(CTreeCursor& curItem, int iIndent = 1);
  84. CCategoryBarWnd::CCategoryDBItem* GetDBItemData(int icbSel);
  85. // in
  86. CImageList* m_pImageList;
  87. bool m_bNewOrProperty;
  88. CFileTorrent* m_pfiletorrent;
  89. CCategoryBarWnd* m_pCategoryBarWnd;
  90. long m_lDirectoryID;
  91. CFileDBItem* m_pFileDBItem;
  92. static const string m_strSaveAsSection;
  93. static const string m_strSaveAsCategoryKey;
  94. static const string m_strSaveAsDirectoryKey;
  95. bool m_bNoNotification;
  96. long m_lSubFilesWndWidth;
  97. CSplitterBar m_wndHSplitterBar;
  98. CImageList m_ctlImage;
  99. };
  100. //{{AFX_INSERT_LOCATION}}
  101. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  102. #endif // !defined(AFX_DLGNEWDOWNLOAD_H__6508502C_3476_4E01_8428_39473C2201E7__INCLUDED_)