CameraInfo.cpp 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. // CameraInfo.cpp: 实现文件
  2. //
  3. #include "pch.h"
  4. #include "DMS.h"
  5. #include "CameraInfo.h"
  6. #include "afxdialogex.h"
  7. // CameraInfo 对话框
  8. IMPLEMENT_DYNAMIC(CameraInfo, CDialogEx)
  9. CameraInfo::CameraInfo(CWnd* pParent /*=nullptr*/)
  10. : CDialogEx(IDD_DLG_CAMERA_INFO, pParent)
  11. ,m_szMsg("")
  12. ,m_iAct(0)
  13. {
  14. }
  15. CameraInfo::CameraInfo(CWnd* pParent, LPCTSTR szResultMsg)
  16. : CDialogEx(IDD_DLG_CAMERA_INFO, pParent)
  17. , m_szMsg(szResultMsg)
  18. , m_iAct(0)
  19. {
  20. }
  21. CameraInfo::~CameraInfo()
  22. {
  23. }
  24. void CameraInfo::DoDataExchange(CDataExchange* pDX)
  25. {
  26. CDialogEx::DoDataExchange(pDX);
  27. DDX_Control(pDX, IDC_STATIC_MSG, m_Ctrl_Label_Msg);
  28. DDX_Control(pDX, IDC_STATIC_CONFIRM, m_Ctrl_Label_Confirm);
  29. }
  30. BEGIN_MESSAGE_MAP(CameraInfo, CDialogEx)
  31. ON_BN_CLICKED(ID_BTN_MOVE, &CameraInfo::OnBnClickedBtnMove)
  32. ON_BN_CLICKED(ID_BTN_DEL, &CameraInfo::OnBnClickedBtnDel)
  33. END_MESSAGE_MAP()
  34. // CameraInfo 消息处理程序
  35. BOOL CameraInfo::OnInitDialog()
  36. {
  37. CDialogEx::OnInitDialog();
  38. m_Ctrl_Label_Msg.SetWindowText(m_szMsg);
  39. m_Ctrl_Label_Confirm.SetWindowText(_T("目前图片文件在U盘"));
  40. return TRUE;
  41. }
  42. void CameraInfo::OnBnClickedBtnMove()
  43. {
  44. CString szSrc(_T("D://A"));
  45. CString szDes(_T("C://A"));
  46. Utils::MoveFolder(szSrc, szDes);
  47. MessageBox("移动成功");
  48. }
  49. void CameraInfo::OnBnClickedBtnDel()
  50. {
  51. CString szDes(_T("C://A"));
  52. Utils::DeleteFolder(szDes);
  53. MessageBox("删除成功");
  54. }