lyfzCheckBackupDlg.h 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. // lyfzCheckBackupDlg.h : 头文件
  2. //
  3. #pragma once
  4. #include "ItrayIcon.h" // 托盘操作头文件 [6/8/2013 Z.t]
  5. #include "afxcmn.h"
  6. #include <vector>
  7. class DataBaseOpt;
  8. // ClyfzCheckBackupDlg 对话框
  9. class ClyfzCheckBackupDlg : public CDialog
  10. {
  11. // 构造
  12. public:
  13. ClyfzCheckBackupDlg(CWnd* pParent = NULL); // 标准构造函数
  14. // 对话框数据
  15. enum { IDD = IDD_LYFZCHECKBACKUP_DIALOG };
  16. protected:
  17. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持
  18. virtual BOOL PreTranslateMessage(MSG* pMsg);
  19. // 实现
  20. protected:
  21. HICON m_hIcon;
  22. // 生成的消息映射函数
  23. virtual BOOL OnInitDialog();
  24. afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
  25. afx_msg void OnPaint();
  26. afx_msg void OnExit();
  27. afx_msg void OnShowWnd();
  28. afx_msg void OnDestroy();
  29. afx_msg void OnClose();
  30. afx_msg HCURSOR OnQueryDragIcon();
  31. afx_msg void OnBnClickedModifyBtn();
  32. afx_msg void OnBnClickedAddBtn();
  33. afx_msg void OnBnClickedDelBtn();
  34. afx_msg void OnBnClickedCheckBtn();
  35. afx_msg void OnBnClickedCancelBtn();
  36. afx_msg LRESULT OnTrayNotification(WPARAM wp, LPARAM lp);
  37. afx_msg LRESULT ShowPrompting(WPARAM wParam, LPARAM lParam);
  38. afx_msg void OnTimer(UINT_PTR nIDEvent);
  39. DECLARE_MESSAGE_MAP()
  40. public:
  41. void InitTrayIcon();
  42. void TrayRight();
  43. void TaskNotifyIcon();
  44. int LoadConnect(LPCTSTR lpPath);
  45. void GetBackupLogs(OUT CArray<CStringArray,CStringArray>& logsArr);
  46. int CheckTheStringIsNum(const CString& strNum);
  47. void GetDateRangeFilter(OUT CString& strStart, OUT CString& strEnd, OUT CString& strFilter);
  48. void ScreeningOrderDir();
  49. //备份完成回调
  50. static int WINAPI BackupCallBack(IN LPVOID lpParam1, IN LPVOID lpParam2, IN LPVOID lpParam3, IN LPVOID lpParam4, IN LPVOID lpParam5, IN LPVOID lpParam6);
  51. int BackupCallBackPro(IN LPVOID lpParam1, IN LPVOID lpParam2, IN LPVOID lpParam3, IN LPVOID lpParam4, IN LPVOID lpParam5, IN LPVOID lpParam6);
  52. int FindBakTargetDir(OUT CString& strTargetDir);
  53. public:
  54. // 托盘工作类;
  55. ITrayIcon m_trayIcon;
  56. CString m_strDays; // 天数
  57. BOOL m_bAutoRuning;
  58. BOOL m_bNoticeTray; // 是否响应托盘消息;
  59. BOOL m_isNotify; // 托盘是否显示;
  60. DataBaseOpt* m_pDBOpt; // 数据库操作
  61. std::vector<TCHAR*> m_vDBConnect; // 数据库连接组
  62. TCHAR m_szDBConnect[MAX_PATH];
  63. CArray<CStringArray,CStringArray> m_BackupLogsArr; // 备份记录集
  64. int m_nCountTime; //倒计时
  65. };