添加TWAIN属性代码自动化添加工具

This commit is contained in:
gb 2023-02-23 11:30:17 +08:00
parent 0065fd421e
commit bdcb0b66ea
7 changed files with 40 additions and 0 deletions

View File

@ -9,6 +9,7 @@
#include "hgjsonDlg.h" #include "hgjsonDlg.h"
#include "CDlgLang.h" #include "CDlgLang.h"
#include "DlgTwain.h"
// CDlgMain 对话框 // CDlgMain 对话框
@ -51,6 +52,10 @@ BOOL CDlgMain::OnInitDialog()
page->Create(CDlgLang::IDD, this); page->Create(CDlgLang::IDD, this);
insert_page(page, L"\u8BED\u8A00\u5305\u5236\u4F5C"); insert_page(page, L"\u8BED\u8A00\u5305\u5236\u4F5C");
page = new CDlgTwain(this);
page->Create(CDlgTwain::IDD, this);
insert_page(page, L"TWAIN");
tab_.SetCurSel(0); tab_.SetCurSel(0);
OnTcnSelchangeTab1(NULL, &lret); OnTcnSelchangeTab1(NULL, &lret);

Binary file not shown.

View File

@ -116,6 +116,7 @@
<ClInclude Include="CDlgLang.h" /> <ClInclude Include="CDlgLang.h" />
<ClInclude Include="CDlgMain.h" /> <ClInclude Include="CDlgMain.h" />
<ClInclude Include="DlgInput.h" /> <ClInclude Include="DlgInput.h" />
<ClInclude Include="DlgTwain.h" />
<ClInclude Include="hgjson.h" /> <ClInclude Include="hgjson.h" />
<ClInclude Include="hgjsonDlg.h" /> <ClInclude Include="hgjsonDlg.h" />
<ClInclude Include="Resource.h" /> <ClInclude Include="Resource.h" />
@ -130,6 +131,7 @@
<ClCompile Include="CDlgLang.cpp" /> <ClCompile Include="CDlgLang.cpp" />
<ClCompile Include="CDlgMain.cpp" /> <ClCompile Include="CDlgMain.cpp" />
<ClCompile Include="DlgInput.cpp" /> <ClCompile Include="DlgInput.cpp" />
<ClCompile Include="DlgTwain.cpp" />
<ClCompile Include="hgjson.cpp" /> <ClCompile Include="hgjson.cpp" />
<ClCompile Include="hgjsonDlg.cpp" /> <ClCompile Include="hgjsonDlg.cpp" />
<ClCompile Include="stdafx.cpp"> <ClCompile Include="stdafx.cpp">

View File

@ -45,6 +45,9 @@
<ClInclude Include="CDlgLang.h"> <ClInclude Include="CDlgLang.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="DlgTwain.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="hgjson.cpp"> <ClCompile Include="hgjson.cpp">
@ -68,6 +71,9 @@
<ClCompile Include="CDlgLang.cpp"> <ClCompile Include="CDlgLang.cpp">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="DlgTwain.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ResourceCompile Include="hgjson.rc"> <ResourceCompile Include="hgjson.rc">

View File

@ -5892,6 +5892,32 @@ static const char* title_to_name(std::wstring& title)
////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////
// ChgjsonDlg dialog // ChgjsonDlg dialog
static bool is_match(const char* str, const char* pattern)
{
std::vector<std::string> parts;
std::string all(pattern);
size_t pos = all.find("*");
while (pos != std::string::npos)
{
if (pos++)
parts.push_back(all.substr(0, pos));
all.erase(0, pos);
pos = all.find("*");
}
if (!all.empty())
parts.push_back(all);
for (pos = 0; pos < parts.size(); ++pos)
{
str = strstr(str, parts[pos].c_str());
if (!str)
break;
str += parts[pos].length();
}
return pos == parts.size();
}
ChgjsonDlg::ChgjsonDlg(CWnd* pParent /*=NULL*/) ChgjsonDlg::ChgjsonDlg(CWnd* pParent /*=NULL*/)
: CDialogEx(ChgjsonDlg::IDD, pParent) : CDialogEx(ChgjsonDlg::IDD, pParent)
@ -5899,6 +5925,7 @@ ChgjsonDlg::ChgjsonDlg(CWnd* pParent /*=NULL*/)
, show_list_tooltips_(true) , show_list_tooltips_(true)
{ {
std::string py(hz_2_py::getLetter("ÑÕɫģʽ", true)); std::string py(hz_2_py::getLetter("ÑÕɫģʽ", true));
is_match("/usr/bin/python3.9", "bin*.9");
} }
void ChgjsonDlg::DoDataExchange(CDataExchange* pDX) void ChgjsonDlg::DoDataExchange(CDataExchange* pDX)

Binary file not shown.

Binary file not shown.