huago-corrcet_tools/HuaGoCorrect/HuaGoCorrectDlg.h

121 lines
2.6 KiB
C
Raw Permalink Normal View History

2020-08-31 08:08:50 +00:00
// HuaGoCorrectDlg.h : ͷ<>ļ<EFBFBD>
//
#pragma once
#include "afxcmn.h"
#include "HuaGoCorrect.h"
#include "DefHSCommon.h"
#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"
#include "scn_usb.h"
#include "JsonConfig.h"
2020-08-31 08:08:50 +00:00
#define WM_MYMESSAGE (WM_USER+100)
union HG_ScanConfiguration
2020-08-31 08:08:50 +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
{
// <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;
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();
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();
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;
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;
CComboBox m_Usbs;
2020-08-31 08:08:50 +00:00
afx_msg void OnCbnSelChangeDpi();
afx_msg void OnCbnSelChangeColor();
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);
afx_msg void OnBnClickedBtnSelectfile();
afx_msg void OnBnClickedBtnUpdate();
afx_msg void OnBnClickedBtnRefresh();
afx_msg void OnCbnSelchangeCmbUsbs();
afx_msg void OnBnClickedBtnstart();
afx_msg void OnBnClickedBtnstop();
2022-01-26 09:05:59 +00:00
int GetSelectDPIIndex() {
return m_iDpiIndex;
}
private:
2021-08-17 01:07:55 +00:00
CString updateFilePath;
std::thread m_updateThread;
void updatefunc();
2020-08-31 08:08:50 +00:00
};