默认打开设备失败支持弹窗显示
This commit is contained in:
parent
22254e0aaa
commit
25ebf4c4fc
|
@ -166,7 +166,6 @@ HGResult HGTwainDSMImpl::OpenDS(HGUInt index, class HGTwainDSImpl** dsImpl)
|
|||
return ret;
|
||||
}
|
||||
|
||||
saveCfgValue("twain", "showMsgBox", true);
|
||||
std::string DSName = m_vds[index].ProductName;
|
||||
saveCfgValue("twain", "source", DSName);
|
||||
m_listDSImpl.push_back(newDSImpl);
|
||||
|
@ -186,7 +185,6 @@ HGResult HGTwainDSMImpl::OpenDefaultDS(class HGTwainDSImpl** dsImpl)
|
|||
return HGBASE_ERR_FAIL;
|
||||
}
|
||||
|
||||
saveCfgValue("twain", "showMsgBox", false);
|
||||
std::string sourceName = getCfgValue("twain", "source", std::string(""));
|
||||
|
||||
int index = -1;
|
||||
|
@ -226,8 +224,6 @@ HGResult HGTwainDSMImpl::OpenSelectedDS(class HGTwainDSImpl** dsImpl)
|
|||
return HGBASE_ERR_INVALIDARG;
|
||||
}
|
||||
|
||||
saveCfgValue("twain", "showMsgBox", true);
|
||||
|
||||
TW_IDENTITY selectDS;
|
||||
if (TWRC_SUCCESS != m_pDSMProc(&m_AppId, NULL, DG_CONTROL, DAT_IDENTITY, MSG_USERSELECT, &selectDS))
|
||||
{
|
||||
|
@ -256,7 +252,6 @@ HGResult HGTwainDSMImpl::OpenSelectedDSEx(class HGTwainDSImpl** dsImpl)
|
|||
return HGBASE_ERR_INVALIDARG;
|
||||
}
|
||||
|
||||
saveCfgValue("twain", "showMsgBox", true);
|
||||
std::string sourceName = getCfgValue("twain", "source", std::string(""));
|
||||
|
||||
TW_IDENTITY selectDS;
|
||||
|
|
|
@ -207,11 +207,7 @@ int show_messagebox_ui(HWND parent, int event, void *msg, int flag)
|
|||
g_manager = new Manager;
|
||||
}
|
||||
|
||||
bool showMsgBox = getCfgValue("twain", "showMsgBox", true);
|
||||
if (showMsgBox)
|
||||
return g_manager->showMessageBoxUi(nullptr == g_hThread, parent, event, msg, flag);
|
||||
|
||||
return 0;
|
||||
return g_manager->showMessageBoxUi(nullptr == g_hThread, parent, event, msg, flag);
|
||||
}
|
||||
|
||||
int show_twain_srclist_ui(const TW_IDENTITY *vds, HGUInt count, const HGChar *defDsName, HGWindow parent, TW_IDENTITY *ds)
|
||||
|
|
Loading…
Reference in New Issue