CPhotoFTPSendDlg.h 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. // CPhotoFTPSendDlg.h : header file
  2. //
  3. #if !defined(AFX_CPhotoFTPSendDLG_H__C9767248_E115_11D2_970B_00A024EBF6AB__INCLUDED_)
  4. #define AFX_CPhotoFTPSendDLG_H__C9767248_E115_11D2_970B_00A024EBF6AB__INCLUDED_
  5. #if _MSC_VER >= 1000
  6. #pragma once
  7. #endif // _MSC_VER >= 1000
  8. /////////////////////////////////////////////////////////////////////////////
  9. // CCPhotoFTPSendDlg dialog
  10. #include <afxtempl.h>
  11. #include "TrayIcon.h"
  12. #define MAX_THREAD 10
  13. class CCPhotoFTPSendDlg : public CDialog
  14. {
  15. BOOL m_bFirst;
  16. CTrayIcon m_TrayIcon;
  17. CString m_pathbak;
  18. CString m_clientinfo;
  19. // Construction
  20. public:
  21. CString GetModifyDate(CString path);
  22. BOOL IsStatusPause(CString path);
  23. void GetUserPswFromPhotoType(CString type, CString &user, CString &pass);
  24. void ModifyStaus2(CString path);
  25. void CheckTaskOK(CString path);
  26. int FTPFile(CString path, CString name);
  27. void ModifyStaus(CString path, CString info);
  28. void ModifyStaus3(CString path, int type, CString ip);
  29. void ModifyStaus4(CString path, CString str,int pos);
  30. BOOL TaskExist(CString path, CArray<CStringArray, CStringArray>*pList1array);
  31. void FillGrid();
  32. BOOL SaveTask();
  33. CString GetPhotoType(CString path);
  34. CString GetClient(CString path, int &size);
  35. CString GetBranchNameFromDoMain(CString domain);
  36. CString GetBranch(CString path);
  37. CString GetBranchIPFromDoMain(CString domain, CString &hskip);
  38. CString GetBranchIP(CString path, CString &hskip);
  39. void LoadTaskFunc();
  40. CArray<CStringArray, CStringArray>m_List1array;
  41. CArray<CStringArray, CStringArray>m_branchinfoarray;
  42. CCPhotoFTPSendDlg(CWnd* pParent = NULL); // standard constructor
  43. bool m_bRunning; // Flag to whether thread is on running or not
  44. int m_bTerminate; // Flag to Thread to be terminated
  45. unsigned int m_dwThreadID; // Thread ID
  46. HANDLE m_hThread; // Thread and Event handle
  47. BOOL TerminateThread();
  48. bool m_bRunning2; // Flag to whether thread is on running or not
  49. int m_bTerminate2; // Flag to Thread to be terminated
  50. unsigned int m_dwThreadID2; // Thread ID
  51. HANDLE m_hThread2; // Thread and Event handle
  52. BOOL TerminateThread2();
  53. bool m_bRunning1[MAX_THREAD]; // Flag to whether thread is on running or not
  54. bool m_bTerminate1[MAX_THREAD]; // Flag to Thread to be terminated
  55. unsigned int m_dwThreadID1[MAX_THREAD]; // Thread ID
  56. HANDLE m_hThread1[MAX_THREAD]; // Thread and Event handle
  57. BOOL TerminateThread1(int pos);
  58. // Dialog Data
  59. //{{AFX_DATA(CCPhotoFTPSendDlg)
  60. enum { IDD = IDD_CPhotoFTPSend_DIALOG };
  61. CListCtrl m_List1;
  62. CString m_host;
  63. CString m_user;
  64. CString m_pass;
  65. UINT m_port;
  66. CString m_fwhost;
  67. UINT m_fwport;
  68. CString m_fwuser;
  69. CString m_fwpass;
  70. CString m_lfile;
  71. CString m_rfile;
  72. BOOL m_pasv;
  73. int m_put;
  74. int m_logontype;
  75. CString m_acct;
  76. //}}AFX_DATA
  77. // ClassWizard generated virtual function overrides
  78. //{{AFX_VIRTUAL(CCPhotoFTPSendDlg)
  79. public:
  80. virtual BOOL PreTranslateMessage(MSG* pMsg);
  81. protected:
  82. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  83. //}}AFX_VIRTUAL
  84. // Implementation
  85. protected:
  86. HICON m_hIcon;
  87. // Generated message map functions
  88. //{{AFX_MSG(CCPhotoFTPSendDlg)
  89. virtual BOOL OnInitDialog();
  90. afx_msg void OnPaint();
  91. afx_msg HCURSOR OnQueryDragIcon();
  92. afx_msg void OnButton1();
  93. afx_msg void OnDestroy();
  94. afx_msg void OnTimer(UINT nIDEvent);
  95. afx_msg void OnButton2();
  96. afx_msg void OnClickList1(NMHDR* pNMHDR, LRESULT* pResult);
  97. afx_msg void OnButton3();
  98. afx_msg void OnButton4();
  99. virtual void OnCancel();
  100. afx_msg void OnOpen();
  101. afx_msg void OnExit();
  102. afx_msg void OnClose();
  103. afx_msg void OnButton5();
  104. afx_msg void OnButton6();
  105. afx_msg void OnButton7();
  106. //}}AFX_MSG
  107. afx_msg void OnRadio(UINT nID);
  108. LRESULT OnTrayNotification(WPARAM wParam,LPARAM lParam);
  109. LRESULT OnAbortClose(WPARAM wParam, LPARAM lParam);
  110. DECLARE_MESSAGE_MAP()
  111. };
  112. //{{AFX_INSERT_LOCATION}}
  113. // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
  114. #endif // !defined(AFX_CPhotoFTPSendDLG_H__C9767248_E115_11D2_970B_00A024EBF6AB__INCLUDED_)