2020-08-31 08:08:50 +00:00
|
|
|
|
|
|
|
|
|
// HuaGoCorrectDlg.h : ͷ<>ļ<EFBFBD>
|
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
#include "afxcmn.h"
|
|
|
|
|
#include "HuaGoCorrect.h"
|
|
|
|
|
#include "DefHSCommon.h"
|
2021-07-31 03:12:53 +00:00
|
|
|
|
#include "IScanner.h"
|
2020-08-31 08:08:50 +00:00
|
|
|
|
#include "Config.h"
|
|
|
|
|
#include "twain.h"
|
|
|
|
|
#include "A3.h"
|
|
|
|
|
#include "A4.h"
|
2021-08-17 01:07:55 +00:00
|
|
|
|
//#include "ConfigParam.h"
|
2020-08-31 08:08:50 +00:00
|
|
|
|
#include "afxwin.h"
|
|
|
|
|
#include "CVISON.h"
|
2021-07-31 03:12:53 +00:00
|
|
|
|
#include "scn_usb.h"
|
|
|
|
|
#include "JsonConfig.h"
|
2020-08-31 08:08:50 +00:00
|
|
|
|
|
|
|
|
|
#define WM_MYMESSAGE (WM_USER+100)
|
|
|
|
|
|
2021-07-31 03:12:53 +00:00
|
|
|
|
union HG_ScanConfiguration
|
2020-08-31 08:08:50 +00:00
|
|
|
|
{
|
2021-07-31 03:12:53 +00:00
|
|
|
|
struct
|
|
|
|
|
{
|
|
|
|
|
unsigned int pageSize : 5;
|
|
|
|
|
unsigned int isColor : 1;
|
|
|
|
|
unsigned int dpi : 2;
|
|
|
|
|
unsigned int doubleFeeded : 1;
|
|
|
|
|
unsigned int enableUV : 1;
|
|
|
|
|
unsigned int enableLed : 1;
|
|
|
|
|
unsigned int reversed1 : 6;
|
|
|
|
|
unsigned int isCorrect : 1;
|
|
|
|
|
unsigned int dstHeight : 8;
|
|
|
|
|
unsigned int reversed2 : 6;
|
|
|
|
|
} params;
|
|
|
|
|
unsigned int value;
|
2020-08-31 08:08:50 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// CHuaGoCorrectDlg <20>Ի<EFBFBD><D4BB><EFBFBD>
|
|
|
|
|
class CHuaGoCorrectDlg : public CDialogEx
|
|
|
|
|
{
|
2021-07-31 03:12:53 +00:00
|
|
|
|
// <20><><EFBFBD><EFBFBD>
|
2020-08-31 08:08:50 +00:00
|
|
|
|
public:
|
|
|
|
|
CHuaGoCorrectDlg(CWnd* pParent = NULL); // <20><><EFBFBD><D7BC><EFBFBD>캯<EFBFBD><ECBAAF>
|
|
|
|
|
|
|
|
|
|
// <20>Ի<EFBFBD><D4BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
enum { IDD = IDD_HUAGOCORRECT_DIALOG };
|
|
|
|
|
|
|
|
|
|
bool m_bScanning;
|
|
|
|
|
bool ls_flat;
|
|
|
|
|
int papercount;
|
|
|
|
|
int m_iPicIndex;
|
|
|
|
|
int m_iflatIndex;
|
|
|
|
|
int m_iDpiIndex;
|
|
|
|
|
int m_iColorIndex;
|
|
|
|
|
|
|
|
|
|
int n_hour;
|
|
|
|
|
int n_minute;
|
|
|
|
|
int n_second;
|
|
|
|
|
BOOL b_review;
|
|
|
|
|
BOOL b_suspend;
|
|
|
|
|
CA4 m_A4Dlg;
|
|
|
|
|
CVISON m_VisonDlg;
|
2021-07-31 03:12:53 +00:00
|
|
|
|
CA3 m_A3dlg;
|
|
|
|
|
std::shared_ptr<IScanner> m_drv;
|
2020-08-31 08:08:50 +00:00
|
|
|
|
CRect tabRect; // <20><>ǩ<EFBFBD>ؼ<EFBFBD><D8BC>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD>úʹ<C3BA>С
|
|
|
|
|
void Scan();
|
|
|
|
|
void RefreshTabChange();
|
|
|
|
|
void WriteLog(CString msg);
|
|
|
|
|
void InitButton();
|
|
|
|
|
|
2021-07-31 03:12:53 +00:00
|
|
|
|
protected:
|
2020-08-31 08:08:50 +00:00
|
|
|
|
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV ֧<><D6A7>
|
|
|
|
|
|
|
|
|
|
// ʵ<><CAB5>
|
|
|
|
|
protected:
|
|
|
|
|
HICON m_hIcon;
|
|
|
|
|
BOOL m_bExit;
|
|
|
|
|
// <20><><EFBFBD>ɵ<EFBFBD><C9B5><EFBFBD>Ϣӳ<CFA2>亯<EFBFBD><E4BAAF>
|
|
|
|
|
virtual BOOL OnInitDialog();
|
2021-07-31 03:12:53 +00:00
|
|
|
|
afx_msg void EnableUIItem(bool enbale);
|
|
|
|
|
bool RefreshUSBList();
|
|
|
|
|
void OnSysCommand(UINT nID, LPARAM lParam);
|
2020-08-31 08:08:50 +00:00
|
|
|
|
afx_msg void OnPaint();
|
|
|
|
|
afx_msg HCURSOR OnQueryDragIcon();
|
|
|
|
|
DECLARE_MESSAGE_MAP()
|
|
|
|
|
public:
|
|
|
|
|
CTabCtrl m_tab;
|
2021-07-31 03:12:53 +00:00
|
|
|
|
afx_msg void OnTcnSelChangeTab(NMHDR* pNMHDR, LRESULT* pResult);
|
|
|
|
|
afx_msg void OnBnClickedCheckparamset();
|
2020-08-31 08:08:50 +00:00
|
|
|
|
afx_msg void OnBnClickedCheckparamread();
|
|
|
|
|
afx_msg void OnBnClickedBtnFlat();
|
|
|
|
|
CCriticalSection m_deviceLock;
|
|
|
|
|
virtual void OnCancel();
|
|
|
|
|
CComboBox m_ComboxDpi;
|
|
|
|
|
CComboBox m_ComboxColor;
|
2021-07-31 03:12:53 +00:00
|
|
|
|
CComboBox m_Usbs;
|
2020-08-31 08:08:50 +00:00
|
|
|
|
afx_msg void OnCbnSelChangeDpi();
|
|
|
|
|
afx_msg void OnCbnSelChangeColor();
|
2021-07-31 03:12:53 +00:00
|
|
|
|
CButton m_A4Scanner;
|
2020-08-31 08:08:50 +00:00
|
|
|
|
CString s_hour;
|
|
|
|
|
CString s_minute;
|
|
|
|
|
CString s_second;
|
|
|
|
|
afx_msg void OnBnClickedStopScan();
|
2021-08-17 01:07:55 +00:00
|
|
|
|
afx_msg void OnTimer(UINT_PTR nIDEvent);
|
2021-07-31 03:12:53 +00:00
|
|
|
|
afx_msg void OnBnClickedBtnSelectfile();
|
|
|
|
|
afx_msg void OnBnClickedBtnUpdate();
|
|
|
|
|
afx_msg void OnBnClickedBtnRefresh();
|
|
|
|
|
afx_msg void OnCbnSelchangeCmbUsbs();
|
|
|
|
|
afx_msg void OnBnClickedBtnstart();
|
|
|
|
|
afx_msg void OnBnClickedBtnstop();
|
|
|
|
|
private:
|
2021-08-17 01:07:55 +00:00
|
|
|
|
CString updateFilePath;
|
2021-07-31 03:12:53 +00:00
|
|
|
|
std::thread m_updateThread;
|
|
|
|
|
void updatefunc();
|
2020-08-31 08:08:50 +00:00
|
|
|
|
};
|