2020-03-11 01:58:06 +00:00
|
|
|
|
// CBasicPage.cpp: 实现文件
|
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
#include "stdafx.h"
|
|
|
|
|
#include "CBasicPage.h"
|
|
|
|
|
#include "afxdialogex.h"
|
|
|
|
|
#include "resource.h"
|
|
|
|
|
#include "CAboutDlg.h"
|
2021-11-20 03:09:04 +00:00
|
|
|
|
#include "CAttributeDlg.h"
|
2020-03-17 13:02:50 +00:00
|
|
|
|
#include "CTwainUI.h"
|
2020-03-11 01:58:06 +00:00
|
|
|
|
#include "CDiscardBlankSetting.h"
|
2020-11-16 10:05:04 +00:00
|
|
|
|
#include "CcardblankDlg.h"
|
2020-03-11 01:58:06 +00:00
|
|
|
|
#include <vector>
|
|
|
|
|
|
2020-03-17 13:02:50 +00:00
|
|
|
|
static std::vector<CString> color_Modes = {
|
2020-03-11 01:58:06 +00:00
|
|
|
|
_T("24位彩色"),
|
|
|
|
|
_T("256级灰度"),
|
2020-12-17 09:02:33 +00:00
|
|
|
|
_T("黑白"),
|
|
|
|
|
_T("颜色自动识别")
|
2020-03-11 01:58:06 +00:00
|
|
|
|
};
|
|
|
|
|
|
2020-06-20 03:04:32 +00:00
|
|
|
|
|
|
|
|
|
#ifdef G200
|
2020-03-11 01:58:06 +00:00
|
|
|
|
static std::vector<CString> surportStyles = {
|
2020-06-20 03:04:32 +00:00
|
|
|
|
_T("A3"),//pass
|
2021-04-06 01:31:21 +00:00
|
|
|
|
_T("8开"),
|
2020-03-11 01:58:06 +00:00
|
|
|
|
_T("A4"),
|
|
|
|
|
_T("A4横向"),
|
2021-04-06 01:31:21 +00:00
|
|
|
|
_T("16开"),
|
|
|
|
|
_T("16开横向"),
|
2020-03-11 01:58:06 +00:00
|
|
|
|
_T("A5"),
|
|
|
|
|
_T("A5横向"),
|
|
|
|
|
_T("A6"),
|
|
|
|
|
_T("A6横向"),
|
|
|
|
|
_T("B4"),
|
|
|
|
|
_T("B5"),
|
|
|
|
|
_T("B5横向"),
|
|
|
|
|
_T("B6"),
|
|
|
|
|
_T("B6横向"),
|
|
|
|
|
_T("Letter"),
|
|
|
|
|
_T("Letter横向"),
|
2020-06-20 03:04:32 +00:00
|
|
|
|
_T("Double Letter"),//pass
|
2020-03-11 01:58:06 +00:00
|
|
|
|
_T("LEGAL"),
|
|
|
|
|
_T("匹配原始尺寸"),
|
|
|
|
|
_T("最大扫描尺寸自动裁切"),
|
|
|
|
|
_T("最大扫描尺寸"),
|
2021-05-19 10:58:07 +00:00
|
|
|
|
_T("三联试卷"),
|
2020-03-11 01:58:06 +00:00
|
|
|
|
};
|
2020-06-20 03:04:32 +00:00
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#ifdef G300
|
|
|
|
|
static std::vector<CString> surportStyles = {
|
|
|
|
|
_T("A4"),
|
2021-04-06 01:31:21 +00:00
|
|
|
|
_T("16开"),
|
2020-06-20 03:04:32 +00:00
|
|
|
|
_T("A5"),
|
|
|
|
|
_T("A6"),
|
2020-11-12 11:42:16 +00:00
|
|
|
|
//_T("B4"),
|
2020-06-20 03:04:32 +00:00
|
|
|
|
_T("B5"),
|
|
|
|
|
_T("B6"),
|
|
|
|
|
_T("Letter"),
|
|
|
|
|
_T("LEGAL"),
|
|
|
|
|
_T("匹配原始尺寸"),
|
2022-05-24 12:05:47 +00:00
|
|
|
|
#ifndef ANDROIDSERIAL
|
|
|
|
|
_T("最大扫描尺寸自动裁切"),
|
|
|
|
|
_T("最大扫描尺寸"),
|
|
|
|
|
#endif // !ANDROIDSERIAL
|
2020-06-20 03:04:32 +00:00
|
|
|
|
};
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#ifdef G400
|
|
|
|
|
static std::vector<CString> surportStyles = {
|
|
|
|
|
_T("A3"),//pass
|
2021-04-06 01:31:21 +00:00
|
|
|
|
_T("8开"),
|
2020-06-20 03:04:32 +00:00
|
|
|
|
_T("A4"),
|
|
|
|
|
_T("A4横向"),
|
2021-04-06 01:31:21 +00:00
|
|
|
|
_T("16开"),
|
|
|
|
|
_T("16开横向"),
|
2020-06-20 03:04:32 +00:00
|
|
|
|
_T("A5"),
|
|
|
|
|
_T("A5横向"),
|
|
|
|
|
_T("A6"),
|
|
|
|
|
_T("A6横向"),
|
|
|
|
|
_T("B4"),
|
|
|
|
|
_T("B5"),
|
|
|
|
|
_T("B5横向"),
|
|
|
|
|
_T("B6"),
|
|
|
|
|
_T("B6横向"),
|
|
|
|
|
_T("Letter"),
|
|
|
|
|
_T("Letter横向"),
|
|
|
|
|
_T("Double Letter"),//pass
|
|
|
|
|
_T("LEGAL"),
|
|
|
|
|
_T("匹配原始尺寸"),
|
2021-11-20 03:09:04 +00:00
|
|
|
|
#ifndef ANDROIDSERIAL
|
2021-04-06 01:31:21 +00:00
|
|
|
|
_T("最大扫描尺寸自动裁切"),
|
|
|
|
|
_T("最大扫描尺寸"),
|
2021-05-19 10:58:07 +00:00
|
|
|
|
_T("三联试卷"),
|
2021-11-20 03:09:04 +00:00
|
|
|
|
#endif // !ANDROIDSERIAL
|
2020-06-20 03:04:32 +00:00
|
|
|
|
};
|
|
|
|
|
#endif // G400
|
|
|
|
|
|
2020-03-11 01:58:06 +00:00
|
|
|
|
|
2021-02-03 10:21:45 +00:00
|
|
|
|
//static std::vector<CString> reslutions{
|
|
|
|
|
// _T("100"),
|
|
|
|
|
// _T("150"),
|
|
|
|
|
// _T("200"),
|
|
|
|
|
// _T("240"),
|
|
|
|
|
// _T("300"),
|
|
|
|
|
//#ifndef LANXUM
|
|
|
|
|
// //_T("600")
|
|
|
|
|
//#endif // LANXUM
|
|
|
|
|
//};
|
2020-03-11 01:58:06 +00:00
|
|
|
|
|
|
|
|
|
static std::vector<CString> duplexs
|
|
|
|
|
{
|
|
|
|
|
_T("单面"),
|
|
|
|
|
_T("双面"),
|
|
|
|
|
_T("跳过空白页(通用)"),
|
2020-04-18 03:18:06 +00:00
|
|
|
|
_T("跳过空白页(发票纸)"),
|
|
|
|
|
_T("对折")
|
2020-03-11 01:58:06 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// CBasicPage 对话框
|
|
|
|
|
|
|
|
|
|
IMPLEMENT_DYNAMIC(CBasicPage, CTabPageSSL)
|
|
|
|
|
|
|
|
|
|
CBasicPage::CBasicPage(std::function<void()> dataChange, CWnd* pParent /*=nullptr*/)
|
|
|
|
|
: CTabPageSSL(IDD_PAGEBASIC, pParent)
|
|
|
|
|
, m_dataChange(dataChange)
|
|
|
|
|
, AreaNum(8)
|
|
|
|
|
, DevnMax(200)
|
2020-06-20 03:04:32 +00:00
|
|
|
|
, m_bswitchfrontback(FALSE)
|
2020-12-10 02:01:22 +00:00
|
|
|
|
, discardblank_percent(10)
|
2020-03-11 01:58:06 +00:00
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
CBasicPage::~CBasicPage()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CBasicPage::DoDataExchange(CDataExchange* pDX)
|
|
|
|
|
{
|
|
|
|
|
CTabPageSSL::DoDataExchange(pDX);
|
2020-06-20 03:04:32 +00:00
|
|
|
|
DDX_Check(pDX, IDC_CKBSWITCHFRONTBACK, m_bswitchfrontback);
|
2020-12-10 02:01:22 +00:00
|
|
|
|
DDX_Check(pDX, IDC_CKBSIZEDETECT, m_enableSizeCheck);
|
2021-02-03 10:21:45 +00:00
|
|
|
|
DDX_Control(pDX, IDC_SLIDERDPI, m_Slider_Dpi);
|
|
|
|
|
DDX_Control(pDX, IDC_EDITDPI, m_Edit_Dpi);
|
2021-06-30 13:58:13 +00:00
|
|
|
|
DDX_Check(pDX, IDC_CKBENABLEUV, m_bUV);
|
2020-03-11 01:58:06 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
BOOL CBasicPage::OnInitDialog()
|
|
|
|
|
{
|
|
|
|
|
CTabPageSSL::OnInitDialog();
|
|
|
|
|
m_cmBoxColorMode = (CComboBox*)GetDlgItem(IDC_CMBCOLORTYPE);
|
|
|
|
|
m_cmBoxSS = (CComboBox*)GetDlgItem(IDC_CMBSS);
|
|
|
|
|
m_cmBoxDuplex = (CComboBox*)GetDlgItem(IDC_CMBDUPLEX);
|
|
|
|
|
|
2021-02-03 10:21:45 +00:00
|
|
|
|
m_Edit_Dpi.SetSlideLink(this, IDC_SLIDERDPI);
|
2022-06-29 12:24:24 +00:00
|
|
|
|
m_Edit_Dpi.SetParams(100, 300, 10);
|
2021-02-03 10:21:45 +00:00
|
|
|
|
m_Edit_Dpi.SetValue(200);
|
|
|
|
|
|
2020-03-17 13:02:50 +00:00
|
|
|
|
for (const CString& colorMode : color_Modes)
|
2020-03-11 01:58:06 +00:00
|
|
|
|
m_cmBoxColorMode->AddString(colorMode);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < surportStyles.size(); i++)
|
|
|
|
|
m_cmBoxSS->InsertString(i, surportStyles[i]);
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < duplexs.size(); i++)
|
|
|
|
|
m_cmBoxDuplex->InsertString(i,duplexs[i]);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
m_cmBoxSS->SetCurSel(0);
|
|
|
|
|
m_cmBoxColorMode->SetCurSel(0);
|
|
|
|
|
m_cmBoxDuplex->SetCurSel(0);
|
2022-05-24 12:05:47 +00:00
|
|
|
|
((CButton*)GetDlgItem(IDC_RDQUALITYPRIORITY))->SetCheck(FALSE);
|
2020-03-11 01:58:06 +00:00
|
|
|
|
|
2021-06-30 13:58:13 +00:00
|
|
|
|
#ifndef UV
|
|
|
|
|
GetDlgItem(IDC_CKBENABLEUV)->ShowWindow(FALSE);
|
|
|
|
|
#endif
|
2021-11-20 03:09:04 +00:00
|
|
|
|
GetDlgItem(IDC_BTN_ATTRIBYTE)->ShowWindow(SW_HIDE);
|
2020-03-11 01:58:06 +00:00
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
BEGIN_MESSAGE_MAP(CBasicPage, CTabPageSSL)
|
|
|
|
|
ON_BN_CLICKED(IDC_BTNABOUT, &CBasicPage::OnBnClickedBtnabout)
|
|
|
|
|
ON_CBN_SELCHANGE(IDC_CMBCOLORTYPE, &CBasicPage::OnCbnSelchangeCmbcolortype)
|
|
|
|
|
ON_CBN_SELCHANGE(IDC_CMBSS, &CBasicPage::OnCbnSelchangeCmbss)
|
|
|
|
|
ON_CBN_SELCHANGE(IDC_CMBRESLUTION, &CBasicPage::OnCbnSelchangeCmbreslution)
|
|
|
|
|
ON_CBN_SELCHANGE(IDC_CMBDUPLEX, &CBasicPage::OnCbnSelchangeCmbduplex)
|
|
|
|
|
ON_BN_CLICKED(IDC_BTNDISCARDSETTING, &CBasicPage::OnClickedBtndiscardsetting)
|
2021-09-23 01:19:47 +00:00
|
|
|
|
ON_NOTIFY(NM_RELEASEDCAPTURE, IDC_SLIDERDPI, &CBasicPage::OnNMReleasedcaptureSliderdpi)
|
2021-11-20 03:09:04 +00:00
|
|
|
|
ON_BN_CLICKED(IDC_BTN_ATTRIBYTE, &CBasicPage::OnBnClickedBtnAttribyte)
|
2022-05-24 12:05:47 +00:00
|
|
|
|
ON_EN_CHANGE(IDC_EDITDPI, &CBasicPage::OnEnChangeEditdpi)
|
|
|
|
|
ON_BN_CLICKED(IDC_RDSPEEDPRIORITY, &CBasicPage::OnBnClickedRdspeedpriority)
|
|
|
|
|
ON_BN_CLICKED(IDC_RDQUALITYPRIORITY, &CBasicPage::OnBnClickedRdqualitypriority)
|
2020-03-11 01:58:06 +00:00
|
|
|
|
END_MESSAGE_MAP()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// CBasicPage 消息处理程序
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void CBasicPage::OnBnClickedBtnabout()
|
|
|
|
|
{
|
2022-05-24 12:05:47 +00:00
|
|
|
|
#ifndef NOLOGO
|
|
|
|
|
CAboutDlg dlg(m_hdVersion, m_serialNum, m_macadder, this);
|
2020-03-11 01:58:06 +00:00
|
|
|
|
dlg.DoModal();
|
2022-05-24 12:05:47 +00:00
|
|
|
|
#else
|
|
|
|
|
#ifdef G300
|
|
|
|
|
std::string text = "扫描仪名称:\t\tG300 \n固件版本:\t\t\t";
|
|
|
|
|
#elif defined G400
|
|
|
|
|
std::string text = "扫描仪名称:\t\tG400 \n固件版本:\t\t\t";
|
|
|
|
|
#elif defined G200 && defined ISG100
|
|
|
|
|
std::string text = "扫描仪名称:\t\tG100 \n固件版本:\t\t\t";
|
|
|
|
|
#else
|
|
|
|
|
std::string text = "扫描仪名称:\t\tG200 \n固件版本:\t\t\t";
|
|
|
|
|
#endif
|
|
|
|
|
text += m_hdVersion.c_str();
|
|
|
|
|
text += "\n序列号:\t\t\t";
|
|
|
|
|
text += m_serialNum.c_str();
|
|
|
|
|
::MessageBox(this->GetSafeHwnd(), CString(text.c_str()), L"关于",0);
|
|
|
|
|
#endif // !NOLOGO
|
2020-03-11 01:58:06 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void CBasicPage::OnCbnSelchangeCmbcolortype()
|
|
|
|
|
{
|
|
|
|
|
// TODO: 在此添加控件通知处理程序代码
|
2020-05-16 01:59:44 +00:00
|
|
|
|
updateCmbDuplex(TRUE);
|
2020-03-11 01:58:06 +00:00
|
|
|
|
m_dataChange();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void CBasicPage::OnCbnSelchangeCmbss()
|
|
|
|
|
{
|
|
|
|
|
// TODO: 在此添加控件通知处理程序代码
|
|
|
|
|
int sleIndex = m_cmBoxSS->GetCurSel();
|
|
|
|
|
if (sleIndex == -1)
|
|
|
|
|
{
|
|
|
|
|
sleIndex = 0;
|
|
|
|
|
}
|
2020-05-16 01:59:44 +00:00
|
|
|
|
updateCmbDuplex(TRUE);
|
2020-03-11 01:58:06 +00:00
|
|
|
|
m_dataChange();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void CBasicPage::OnCbnSelchangeCmbreslution()
|
|
|
|
|
{
|
|
|
|
|
// TODO: 在此添加控件通知处理程序代码
|
2020-05-16 01:59:44 +00:00
|
|
|
|
updateCmbDuplex(TRUE);
|
2020-03-11 01:58:06 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void CBasicPage::OnCbnSelchangeCmbduplex()
|
|
|
|
|
{
|
|
|
|
|
// TODO: 在此添加控件通知处理程序代码
|
|
|
|
|
int index = m_cmBoxDuplex->GetCurSel();
|
2020-04-18 03:18:06 +00:00
|
|
|
|
//if (index > 1) {
|
2020-03-11 01:58:06 +00:00
|
|
|
|
//AreaNum = index == 2? 8 : 20 ;
|
|
|
|
|
//DevnMax = index == 2 ? 200 : 300;
|
|
|
|
|
m_dataChange();
|
2020-04-18 03:18:06 +00:00
|
|
|
|
//}
|
2020-11-16 10:05:04 +00:00
|
|
|
|
if (m_cmBoxDuplex->GetCurSel() == 2 || m_cmBoxDuplex->GetCurSel() == 3)
|
2020-12-09 08:02:51 +00:00
|
|
|
|
this->GetDlgItem(IDC_BTNDISCARDSETTING)->EnableWindow(true);
|
2020-11-16 10:05:04 +00:00
|
|
|
|
else
|
2020-12-09 08:02:51 +00:00
|
|
|
|
this->GetDlgItem(IDC_BTNDISCARDSETTING)->EnableWindow(false);
|
2020-05-16 01:59:44 +00:00
|
|
|
|
updateCmbDuplex(TRUE);
|
2020-03-11 01:58:06 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//跳过空白页设置页面
|
|
|
|
|
void CBasicPage::OnClickedBtndiscardsetting()
|
|
|
|
|
{
|
|
|
|
|
// TODO: 在此添加控件通知处理程序代码
|
|
|
|
|
//JsonConfig jc;
|
|
|
|
|
//CONFIGPARAMS params = jc.ReadDefaultConfig();
|
|
|
|
|
//CDiscardBlankSetting dbs(this, params.DBlank_AreaNum, params.DBlank_DevnMax);
|
|
|
|
|
//int nRet = dbs.DoModal();
|
|
|
|
|
//if (nRet == IDOK) {
|
|
|
|
|
// dbs.GetParams(AreaNum, DevnMax);
|
|
|
|
|
//}
|
2020-12-09 08:02:51 +00:00
|
|
|
|
CcardblankDlg settingdlg(discardblank_percent,this);
|
2020-11-16 10:05:04 +00:00
|
|
|
|
settingdlg.DoModal();
|
|
|
|
|
discardblank_percent = settingdlg.discardblank_percent;
|
2020-03-11 01:58:06 +00:00
|
|
|
|
}
|
2020-03-17 13:02:50 +00:00
|
|
|
|
|
2022-02-14 02:30:19 +00:00
|
|
|
|
void CBasicPage::SetScannerInfo(std::string hdVersion, std::string serialNum,std::string macadder)
|
2020-03-17 13:02:50 +00:00
|
|
|
|
{
|
|
|
|
|
m_hdVersion = hdVersion;
|
|
|
|
|
m_serialNum = serialNum;
|
2022-02-14 02:30:19 +00:00
|
|
|
|
m_macadder = macadder;
|
2020-03-17 13:02:50 +00:00
|
|
|
|
}
|
2020-05-16 01:59:44 +00:00
|
|
|
|
|
|
|
|
|
void CBasicPage::updateCmbDuplex(BOOL insert)
|
|
|
|
|
{
|
|
|
|
|
//m_cmBoxDuplex->GetCurSel();
|
|
|
|
|
int tmp_colorindex=m_cmBoxColorMode->GetCurSel();
|
|
|
|
|
int tmp_paperindex = m_cmBoxSS->GetCurSel();
|
|
|
|
|
int tmp_duplexindex = m_cmBoxDuplex->GetCurSel();
|
2021-02-03 10:21:45 +00:00
|
|
|
|
//int tmp_resindex = m_cmBoxResultion->GetCurSel();
|
|
|
|
|
int tmp_resindex = m_Slider_Dpi.m_iPosition;
|
2020-05-16 01:59:44 +00:00
|
|
|
|
int totalcount = m_cmBoxDuplex->GetCount();
|
2021-09-23 01:19:47 +00:00
|
|
|
|
|
|
|
|
|
if (tmp_duplexindex == 0)
|
|
|
|
|
{
|
|
|
|
|
GetDlgItem(IDC_CKBSWITCHFRONTBACK)->EnableWindow(FALSE);
|
|
|
|
|
((CButton*)GetDlgItem(IDC_CKBSWITCHFRONTBACK))->SetCheck(FALSE);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
GetDlgItem(IDC_CKBSWITCHFRONTBACK)->EnableWindow(TRUE);
|
|
|
|
|
}
|
|
|
|
|
|
2022-05-24 12:05:47 +00:00
|
|
|
|
OnNMReleasedcaptureSliderdpi(nullptr, nullptr);
|
2021-05-13 10:13:08 +00:00
|
|
|
|
#ifndef G300
|
2021-05-19 10:58:07 +00:00
|
|
|
|
if (tmp_paperindex == 19 || tmp_paperindex == 20 || tmp_paperindex == 21 || tmp_paperindex == 22 || tmp_paperindex == 1|| tmp_paperindex == 4|| tmp_paperindex == 5){
|
2021-05-13 10:13:08 +00:00
|
|
|
|
#else
|
2022-05-24 12:05:47 +00:00
|
|
|
|
if (tmp_paperindex == 8|| tmp_paperindex == 1 || tmp_paperindex == 9 || tmp_paperindex == 10) {
|
|
|
|
|
#endif // G200
|
2021-05-13 10:13:08 +00:00
|
|
|
|
(((CButton*)GetDlgItem(IDC_CKBSIZEDETECT)))->SetCheck(false);
|
|
|
|
|
GetDlgItem(IDC_CKBSIZEDETECT)->EnableWindow(false);
|
2022-05-24 12:05:47 +00:00
|
|
|
|
(((CButton*)GetDlgItem(IDC_CKFIXEDPAPER)))->SetCheck(false);
|
|
|
|
|
GetDlgItem(IDC_CKFIXEDPAPER)->EnableWindow(false);
|
2021-05-13 10:13:08 +00:00
|
|
|
|
}
|
|
|
|
|
else {
|
2022-06-29 12:24:24 +00:00
|
|
|
|
if (m_Slider_Dpi.m_iPosition >= 500) {
|
|
|
|
|
if (m_hdVersion.size() > 9 && m_hdVersion.substr(2, 2) == "39")
|
|
|
|
|
{
|
|
|
|
|
if ((m_hdVersion[5] == 'B' && atoi(m_hdVersion.substr(6, 4).c_str()) > 429) || (m_hdVersion[5] > 'B')) {
|
|
|
|
|
GetDlgItem(IDC_CKBSIZEDETECT)->EnableWindow(true);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
GetDlgItem(IDC_CKBSIZEDETECT)->EnableWindow(true);
|
|
|
|
|
}
|
|
|
|
|
|
2022-05-24 12:05:47 +00:00
|
|
|
|
GetDlgItem(IDC_CKFIXEDPAPER)->EnableWindow(true);
|
2021-05-13 10:13:08 +00:00
|
|
|
|
}
|
2022-05-24 12:05:47 +00:00
|
|
|
|
|
2020-12-10 02:01:22 +00:00
|
|
|
|
|
2020-05-16 01:59:44 +00:00
|
|
|
|
}
|
2021-02-03 10:21:45 +00:00
|
|
|
|
|
|
|
|
|
|
2021-09-23 01:19:47 +00:00
|
|
|
|
void CBasicPage::OnNMReleasedcaptureSliderdpi(NMHDR* pNMHDR, LRESULT* pResult)
|
|
|
|
|
{
|
|
|
|
|
// TODO: 在此添加控件通知处理程序代码
|
|
|
|
|
if(pResult!=nullptr)
|
|
|
|
|
*pResult = 0;
|
2022-06-29 12:24:24 +00:00
|
|
|
|
if (m_Slider_Dpi.m_iPosition >= 500) {
|
|
|
|
|
if (m_hdVersion.size() > 9 && m_hdVersion.substr(2, 2) == "39")
|
|
|
|
|
{
|
|
|
|
|
if ((m_hdVersion[5] == 'B' && atoi(m_hdVersion.substr(6, 4).c_str()) > 429) || (m_hdVersion[5] > 'B')) {
|
|
|
|
|
int tmp_paperindex = m_cmBoxSS->GetCurSel();
|
|
|
|
|
#ifndef G300
|
|
|
|
|
if (!(tmp_paperindex == 19 || tmp_paperindex == 20 || tmp_paperindex == 21 || tmp_paperindex == 22 || tmp_paperindex == 1 || tmp_paperindex == 4 || tmp_paperindex == 5)) {
|
|
|
|
|
#else
|
|
|
|
|
if (!(tmp_paperindex == 8 || tmp_paperindex == 1 || tmp_paperindex == 9 || tmp_paperindex == 10)) {
|
|
|
|
|
#endif // G200
|
|
|
|
|
((CButton*)GetDlgItem(IDC_CKBSIZEDETECT))->EnableWindow(TRUE);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
((CButton*)GetDlgItem(IDC_CKBSIZEDETECT))->EnableWindow(FALSE);
|
|
|
|
|
((CButton*)GetDlgItem(IDC_CKBSIZEDETECT))->SetCheck(FALSE);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
int tmp_paperindex = m_cmBoxSS->GetCurSel();
|
|
|
|
|
#ifndef G300
|
|
|
|
|
if (!(tmp_paperindex == 19 || tmp_paperindex == 20 || tmp_paperindex == 21 || tmp_paperindex == 22 || tmp_paperindex == 1 || tmp_paperindex == 4 || tmp_paperindex == 5)) {
|
|
|
|
|
#else
|
|
|
|
|
if (!(tmp_paperindex == 8 || tmp_paperindex == 1 || tmp_paperindex == 9 || tmp_paperindex == 10)) {
|
|
|
|
|
#endif // G200
|
|
|
|
|
((CButton*)GetDlgItem(IDC_CKBSIZEDETECT))->EnableWindow(TRUE);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2022-05-24 12:05:47 +00:00
|
|
|
|
if (m_Slider_Dpi.m_iPosition >= 500) {
|
|
|
|
|
((CButton*)GetDlgItem(IDC_RDQUALITYPRIORITY))->EnableWindow(FALSE);
|
|
|
|
|
((CButton*)GetDlgItem(IDC_RDSPEEDPRIORITY))->EnableWindow(FALSE);
|
|
|
|
|
((CButton*)GetDlgItem(IDC_RDQUALITYPRIORITY))->SetCheck(TRUE);
|
|
|
|
|
((CButton*)GetDlgItem(IDC_RDSPEEDPRIORITY))->SetCheck(FALSE);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
((CButton*)GetDlgItem(IDC_RDQUALITYPRIORITY))->EnableWindow(TRUE);
|
|
|
|
|
((CButton*)GetDlgItem(IDC_RDSPEEDPRIORITY))->EnableWindow(TRUE);
|
|
|
|
|
}
|
2021-09-23 01:19:47 +00:00
|
|
|
|
|
2022-06-29 12:24:24 +00:00
|
|
|
|
if (((m_Slider_Dpi.m_iPosition > 300 && ((CButton*)GetDlgItem(IDC_RDQUALITYPRIORITY))->GetCheck()) ||
|
|
|
|
|
(m_Slider_Dpi.m_iPosition > 500 && ((CButton*)GetDlgItem(IDC_RDSPEEDPRIORITY))->GetCheck())) &&
|
2022-05-24 12:05:47 +00:00
|
|
|
|
#ifdef G300
|
|
|
|
|
m_cmBoxSS->GetCount() > 9)
|
|
|
|
|
{
|
|
|
|
|
if (m_cmBoxSS->GetCurSel() >= 9)
|
|
|
|
|
m_cmBoxSS->SetCurSel(8);
|
|
|
|
|
m_cmBoxSS->DeleteString(9);
|
|
|
|
|
m_cmBoxSS->DeleteString(10);
|
|
|
|
|
#else
|
|
|
|
|
m_cmBoxSS->GetCount() > 20)
|
2021-09-23 01:19:47 +00:00
|
|
|
|
{
|
|
|
|
|
if (m_cmBoxSS->GetCurSel() >= 20)
|
|
|
|
|
m_cmBoxSS->SetCurSel(19);
|
|
|
|
|
m_cmBoxSS->DeleteString(22);
|
|
|
|
|
m_cmBoxSS->DeleteString(21);
|
|
|
|
|
m_cmBoxSS->DeleteString(20);
|
2022-05-24 12:05:47 +00:00
|
|
|
|
#endif // G300
|
2021-09-23 01:19:47 +00:00
|
|
|
|
}
|
2022-06-29 12:24:24 +00:00
|
|
|
|
else if (((m_Slider_Dpi.m_iPosition <= 300 && ((CButton*)GetDlgItem(IDC_RDQUALITYPRIORITY))->GetCheck()) ||
|
|
|
|
|
(m_Slider_Dpi.m_iPosition <= 500 && ((CButton*)GetDlgItem(IDC_RDSPEEDPRIORITY))->GetCheck())) &&
|
2022-05-24 12:05:47 +00:00
|
|
|
|
#ifdef G300
|
|
|
|
|
m_cmBoxSS->GetCount() <= 9)
|
|
|
|
|
{
|
|
|
|
|
m_cmBoxSS->InsertString(9, _T("最大扫描尺寸自动裁切"));
|
|
|
|
|
m_cmBoxSS->InsertString(10, _T("最大扫描尺寸"));
|
|
|
|
|
#else
|
|
|
|
|
m_cmBoxSS->GetCount() <= 20)
|
2021-09-23 01:19:47 +00:00
|
|
|
|
{
|
|
|
|
|
m_cmBoxSS->InsertString(20,_T("最大扫描尺寸自动裁切"));
|
|
|
|
|
m_cmBoxSS->InsertString(21,_T("最大扫描尺寸"));
|
|
|
|
|
m_cmBoxSS->InsertString(22,_T("三联试卷"));
|
2022-05-24 12:05:47 +00:00
|
|
|
|
#endif // G300
|
2021-09-23 01:19:47 +00:00
|
|
|
|
}
|
|
|
|
|
if (m_Slider_Dpi.m_iPosition > 300 && m_cmBoxDuplex->GetCount() > 4)
|
|
|
|
|
{
|
|
|
|
|
if (m_cmBoxDuplex->GetCurSel() == 4)
|
|
|
|
|
m_cmBoxDuplex->SetCurSel(1);
|
|
|
|
|
m_cmBoxDuplex->DeleteString(4);
|
|
|
|
|
}
|
|
|
|
|
else if (m_Slider_Dpi.m_iPosition <= 300 && m_cmBoxDuplex->GetCount() <= 4)
|
|
|
|
|
{
|
|
|
|
|
m_cmBoxDuplex->InsertString(4, _T("对折"));
|
|
|
|
|
}
|
|
|
|
|
}
|
2021-11-20 03:09:04 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void CBasicPage::OnBnClickedBtnAttribyte()
|
|
|
|
|
{
|
|
|
|
|
// TODO: 在此添加控件通知处理程序代码
|
|
|
|
|
CAttributeDlg attributedlg(this);
|
|
|
|
|
attributedlg.DoModal();
|
|
|
|
|
}
|
2022-05-24 12:05:47 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void CBasicPage::OnEnChangeEditdpi()
|
|
|
|
|
{
|
|
|
|
|
// TODO: 如果该控件是 RICHEDIT 控件,它将不
|
|
|
|
|
// 发送此通知,除非重写 CTabPageSSL::OnInitDialog()
|
|
|
|
|
// 函数并调用 CRichEditCtrl().SetEventMask(),
|
|
|
|
|
// 同时将 ENM_CHANGE 标志“或”运算到掩码中。
|
|
|
|
|
|
|
|
|
|
// TODO: 在此添加控件通知处理程序代码
|
|
|
|
|
OnNMReleasedcaptureSliderdpi(nullptr, nullptr);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void CBasicPage::OnBnClickedRdspeedpriority()
|
|
|
|
|
{
|
|
|
|
|
// TODO: 在此添加控件通知处理程序代码
|
|
|
|
|
OnNMReleasedcaptureSliderdpi(nullptr, nullptr);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void CBasicPage::OnBnClickedRdqualitypriority()
|
|
|
|
|
{
|
|
|
|
|
// TODO: 在此添加控件通知处理程序代码
|
|
|
|
|
OnNMReleasedcaptureSliderdpi(nullptr, nullptr);
|
|
|
|
|
}
|