testDlg.cpp 39 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138
  1. // testDlg.cpp : 实现文件
  2. //
  3. #include "stdafx.h"
  4. #include "test.h"
  5. #include "testDlg.h"
  6. #include "ODBCImpl.h"
  7. #ifdef _DEBUG
  8. #define new DEBUG_NEW
  9. #endif
  10. // 用于应用程序“关于”菜单项的 CAboutDlg 对话框
  11. class CAboutDlg : public CDialog
  12. {
  13. public:
  14. CAboutDlg();
  15. // 对话框数据
  16. enum { IDD = IDD_ABOUTBOX };
  17. protected:
  18. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持
  19. // 实现
  20. protected:
  21. DECLARE_MESSAGE_MAP()
  22. };
  23. CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
  24. {
  25. }
  26. void CAboutDlg::DoDataExchange(CDataExchange* pDX)
  27. {
  28. CDialog::DoDataExchange(pDX);
  29. }
  30. BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
  31. END_MESSAGE_MAP()
  32. // CtestDlg 对话框
  33. #define TEST_ON 1
  34. #define TEST_OFF 0
  35. CtestDlg::CtestDlg(CWnd* pParent /*=NULL*/)
  36. : CDialog(CtestDlg::IDD, pParent)
  37. {
  38. m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
  39. }
  40. void CtestDlg::DoDataExchange(CDataExchange* pDX)
  41. {
  42. CDialog::DoDataExchange(pDX);
  43. }
  44. BEGIN_MESSAGE_MAP(CtestDlg, CDialog)
  45. ON_WM_SYSCOMMAND()
  46. ON_WM_PAINT()
  47. ON_WM_QUERYDRAGICON()
  48. //}}AFX_MSG_MAP
  49. END_MESSAGE_MAP()
  50. // CtestDlg 消息处理程序
  51. BOOL CtestDlg::OnInitDialog()
  52. {
  53. CDialog::OnInitDialog();
  54. // 将“关于...”菜单项添加到系统菜单中。
  55. // IDM_ABOUTBOX 必须在系统命令范围内。
  56. ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
  57. ASSERT(IDM_ABOUTBOX < 0xF000);
  58. CMenu* pSysMenu = GetSystemMenu(FALSE);
  59. if (pSysMenu != NULL)
  60. {
  61. BOOL bNameValid;
  62. CString strAboutMenu;
  63. bNameValid = strAboutMenu.LoadString(IDS_ABOUTBOX);
  64. ASSERT(bNameValid);
  65. if (!strAboutMenu.IsEmpty())
  66. {
  67. pSysMenu->AppendMenu(MF_SEPARATOR);
  68. pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
  69. }
  70. }
  71. // 设置此对话框的图标。当应用程序主窗口不是对话框时,框架将自动
  72. // 执行此操作
  73. SetIcon(m_hIcon, TRUE); // 设置大图标
  74. SetIcon(m_hIcon, FALSE); // 设置小图标
  75. // TODO: 在此添加额外的初始化代码
  76. ImgEnvInterface *pInstance = NULL;
  77. ImgEnvInterface *pInstance2 = NULL;
  78. pInstance = CreateImgInterface();
  79. pInstance2 = CreateImgInterface2();
  80. if ( pInstance == NULL || pInstance2 == NULL )
  81. {
  82. OutputDebugString(_T("生成对象失败!"));
  83. return FALSE;
  84. }
  85. TblVersion tbVersion;
  86. vector<TblNetShareInfo> vtNetShareInfo;
  87. CODBCImpl::GetInstance()->GetVersionInfo(&tbVersion);
  88. CODBCImpl::GetInstance()->GetNetShareInfo(&vtNetShareInfo);
  89. TCHAR szBranchId[MAX_PATH] = {0};
  90. #ifdef UNICODE
  91. ascii2unicode(Global::g_YtInfoVer1.szBranchId, szBranchId);
  92. #else
  93. _stprintf_s(szBranchId, _T("%s"), Global::g_YtInfoVer1.szBranchId);
  94. #endif
  95. pInstance->SetEnvInfo( &tbVersion, szBranchId, Global::g_szHostName );
  96. pInstance2->SetEnvInfo( &vtNetShareInfo, szBranchId, Global::g_szHostName );
  97. //////////////////////////////////////////////////////////////////////////
  98. // ImgEnvInterface
  99. #ifndef _ImgEnvInterface_
  100. Test_GetEnableShareDirectory( pInstance, pInstance2 );
  101. Test_GetOrderAllShareDirectory( pInstance, pInstance2 );
  102. Test_GetSceneryAllShareDirectory( pInstance, pInstance2 );
  103. #endif
  104. //////////////////////////////////////////////////////////////////////////
  105. // ImgLoadSpecifiedpathInterface
  106. #ifndef _ImgLoadSpecifiedpathInterface_
  107. Test_LoadSpecifiedpathImages( pInstance, pInstance2 );
  108. Test_LoadSelectedIamgesFromSpecifiedpath( pInstance, pInstance2 );
  109. Test_LoadSpecifiedpathImagesEx( pInstance, pInstance2 );
  110. Test_LoadSelectedIamgesFromSpecifiedpathEx( pInstance, pInstance2 );
  111. #endif
  112. //////////////////////////////////////////////////////////////////////////
  113. // ImgLoadOrderpathInterface
  114. #ifndef _ImgLoadOrderpathInterface_
  115. Test_LoadSelectedIamges( pInstance, pInstance2 );
  116. Test_LoadSelectedIamges2( pInstance, pInstance2 );
  117. Test_LoadSelectedIamgesInOrder( pInstance, pInstance2 );
  118. Test_LoadSceneryImages( pInstance, pInstance2 );
  119. Test_LoadOrderImages( pInstance, pInstance2 );
  120. #endif
  121. //////////////////////////////////////////////////////////////////////////
  122. // ImgLoadOrderpathExInterface
  123. #ifndef _ImgLoadOrderpathExInterface_
  124. Test_LoadSelectedIamgesEx( pInstance, pInstance2 );
  125. Test_LoadSelectedIamgesInOrderEx( pInstance, pInstance2 );
  126. Test_LoadSceneryImagesEx( pInstance, pInstance2 );
  127. Test_LoadOrderImagesEx( pInstance, pInstance2 );
  128. #endif
  129. //////////////////////////////////////////////////////////////////////////
  130. // ImgCopyInterface
  131. #ifdef _ImgCopyInterface_
  132. Test_CopyImg2Specifiedpath( pInstance, pInstance2 );
  133. #endif
  134. pInstance->Release();
  135. pInstance2->Release();
  136. return TRUE; // 除非将焦点设置到控件,否则返回 TRUE
  137. }
  138. void CtestDlg::OnSysCommand(UINT nID, LPARAM lParam)
  139. {
  140. if ((nID & 0xFFF0) == IDM_ABOUTBOX)
  141. {
  142. CAboutDlg dlgAbout;
  143. dlgAbout.DoModal();
  144. }
  145. else
  146. {
  147. CDialog::OnSysCommand(nID, lParam);
  148. }
  149. }
  150. // 如果向对话框添加最小化按钮,则需要下面的代码
  151. // 来绘制该图标。对于使用文档/视图模型的 MFC 应用程序,
  152. // 这将由框架自动完成。
  153. void CtestDlg::OnPaint()
  154. {
  155. if (IsIconic())
  156. {
  157. CPaintDC dc(this); // 用于绘制的设备上下文
  158. SendMessage(WM_ICONERASEBKGND, reinterpret_cast<WPARAM>(dc.GetSafeHdc()), 0);
  159. // 使图标在工作区矩形中居中
  160. int cxIcon = GetSystemMetrics(SM_CXICON);
  161. int cyIcon = GetSystemMetrics(SM_CYICON);
  162. CRect rect;
  163. GetClientRect(&rect);
  164. int x = (rect.Width() - cxIcon + 1) / 2;
  165. int y = (rect.Height() - cyIcon + 1) / 2;
  166. // 绘制图标
  167. dc.DrawIcon(x, y, m_hIcon);
  168. }
  169. else
  170. {
  171. CDialog::OnPaint();
  172. }
  173. }
  174. //当用户拖动最小化窗口时系统调用此函数取得光标
  175. //显示。
  176. HCURSOR CtestDlg::OnQueryDragIcon()
  177. {
  178. return static_cast<HCURSOR>(m_hIcon);
  179. }
  180. //////////////////////////////////////////////////////////////////////////
  181. #ifdef _ImgEnvInterface_
  182. void CtestDlg::Test_GetEnableShareDirectory( IN LPVOID lpInstance, IN LPVOID lpInstance2 )
  183. {
  184. ImgEnvInterface *pInstance = (ImgEnvInterface*)lpInstance;
  185. ImgEnvInterface *pInstance2 = (ImgEnvInterface*)lpInstance2;
  186. TCHAR szEnableShareDirectory[MAX_PATH] = {0};
  187. if ( !pInstance->GetEnableShareDirectory(OImgtype, _T("20151208000000587611.ly.com"), _T("20151002-001"), szEnableShareDirectory, MAX_PATH) )
  188. {
  189. OutputDebugString(szEnableShareDirectory);
  190. OutputDebugString(_T("\n\n"));
  191. ZeroMemory(szEnableShareDirectory, sizeof(TCHAR)*MAX_PATH);
  192. if ( pInstance2->GetEnableShareDirectory(OImgtype, _T("20151208000000587611.ly.com"), _T("20151002-001"), szEnableShareDirectory, MAX_PATH) )
  193. {
  194. OutputDebugString(szEnableShareDirectory);
  195. OutputDebugString(_T("\n\n"));
  196. }
  197. }
  198. OutputDebugString(szEnableShareDirectory);
  199. OutputDebugString(_T("\n\n"));
  200. ZeroMemory(szEnableShareDirectory, sizeof(TCHAR)*MAX_PATH);
  201. if ( !pInstance->GetEnableShareDirectory(EImgtype, _T("20151208000000587611.ly.com"), _T("20151002-001"), szEnableShareDirectory, MAX_PATH) )
  202. {
  203. OutputDebugString(szEnableShareDirectory);
  204. OutputDebugString(_T("\n\n"));
  205. ZeroMemory(szEnableShareDirectory, sizeof(TCHAR)*MAX_PATH);
  206. if ( pInstance2->GetEnableShareDirectory(EImgtype, _T("20151208000000587611.ly.com"), _T("20151002-001"), szEnableShareDirectory, MAX_PATH) )
  207. {
  208. OutputDebugString(szEnableShareDirectory);
  209. OutputDebugString(_T("\n\n"));
  210. }
  211. }
  212. OutputDebugString(szEnableShareDirectory);
  213. OutputDebugString(_T("\n\n"));
  214. ZeroMemory(szEnableShareDirectory, sizeof(TCHAR)*MAX_PATH);
  215. if ( !pInstance->GetEnableShareDirectory(FImgtype, _T("20151208000000587611.ly.com"), _T("20151002-001"), szEnableShareDirectory, MAX_PATH) )
  216. {
  217. OutputDebugString(szEnableShareDirectory);
  218. OutputDebugString(_T("\n\n"));
  219. ZeroMemory(szEnableShareDirectory, sizeof(TCHAR)*MAX_PATH);
  220. if ( pInstance2->GetEnableShareDirectory(FImgtype, _T("20151208000000587611.ly.com"), _T("20151002-001"), szEnableShareDirectory, MAX_PATH) )
  221. {
  222. OutputDebugString(szEnableShareDirectory);
  223. OutputDebugString(_T("\n\n"));
  224. }
  225. }
  226. OutputDebugString(szEnableShareDirectory);
  227. OutputDebugString(_T("\n\n"));
  228. ZeroMemory(szEnableShareDirectory, sizeof(TCHAR)*MAX_PATH);
  229. if ( !pInstance->GetEnableShareDirectory(DImgtype, _T("20151208000000587611.ly.com"), _T("20151002-001"), szEnableShareDirectory, MAX_PATH) )
  230. {
  231. OutputDebugString(szEnableShareDirectory);
  232. OutputDebugString(_T("\n\n"));
  233. ZeroMemory(szEnableShareDirectory, sizeof(TCHAR)*MAX_PATH);
  234. if ( pInstance2->GetEnableShareDirectory(DImgtype, _T("20151208000000587611.ly.com"), _T("20151002-001"), szEnableShareDirectory, MAX_PATH) )
  235. {
  236. OutputDebugString(szEnableShareDirectory);
  237. OutputDebugString(_T("\n\n"));
  238. }
  239. }
  240. OutputDebugString(szEnableShareDirectory);
  241. OutputDebugString(_T("\n\n"));
  242. //////////////////////////////////////////////////////////////////////////
  243. // 备份目录;
  244. ZeroMemory(szEnableShareDirectory, sizeof(TCHAR)*MAX_PATH);
  245. if ( !pInstance->GetEnableShareDirectory(OBImgtype, _T("20151208000000587611.ly.com"), _T("20151002-001"), szEnableShareDirectory, MAX_PATH) )
  246. {
  247. OutputDebugString(szEnableShareDirectory);
  248. OutputDebugString(_T("\n\n"));
  249. ZeroMemory(szEnableShareDirectory, sizeof(TCHAR)*MAX_PATH);
  250. if ( pInstance2->GetEnableShareDirectory(OBImgtype, _T("20151208000000587611.ly.com"), _T("20151002-001"), szEnableShareDirectory, MAX_PATH) )
  251. {
  252. OutputDebugString(szEnableShareDirectory);
  253. OutputDebugString(_T("\n\n"));
  254. }
  255. }
  256. OutputDebugString(szEnableShareDirectory);
  257. OutputDebugString(_T("\n\n"));
  258. ZeroMemory(szEnableShareDirectory, sizeof(TCHAR)*MAX_PATH);
  259. if ( !pInstance->GetEnableShareDirectory(EBImgtype, _T("20151208000000587611.ly.com"), _T("20151002-001"), szEnableShareDirectory, MAX_PATH) )
  260. {
  261. OutputDebugString(szEnableShareDirectory);
  262. OutputDebugString(_T("\n\n"));
  263. ZeroMemory(szEnableShareDirectory, sizeof(TCHAR)*MAX_PATH);
  264. if ( pInstance2->GetEnableShareDirectory(EBImgtype, _T("20151208000000587611.ly.com"), _T("20151002-001"), szEnableShareDirectory, MAX_PATH) )
  265. {
  266. OutputDebugString(szEnableShareDirectory);
  267. OutputDebugString(_T("\n\n"));
  268. }
  269. }
  270. OutputDebugString(szEnableShareDirectory);
  271. OutputDebugString(_T("\n\n"));
  272. ZeroMemory(szEnableShareDirectory, sizeof(TCHAR)*MAX_PATH);
  273. if ( !pInstance->GetEnableShareDirectory(FBImgtype, _T("20151208000000587611.ly.com"), _T("20151002-001"), szEnableShareDirectory, MAX_PATH) )
  274. {
  275. OutputDebugString(szEnableShareDirectory);
  276. OutputDebugString(_T("\n\n"));
  277. ZeroMemory(szEnableShareDirectory, sizeof(TCHAR)*MAX_PATH);
  278. if ( pInstance2->GetEnableShareDirectory(FBImgtype, _T("20151208000000587611.ly.com"), _T("20151002-001"), szEnableShareDirectory, MAX_PATH) )
  279. {
  280. OutputDebugString(szEnableShareDirectory);
  281. OutputDebugString(_T("\n\n"));
  282. }
  283. }
  284. OutputDebugString(szEnableShareDirectory);
  285. OutputDebugString(_T("\n\n"));
  286. ZeroMemory(szEnableShareDirectory, sizeof(TCHAR)*MAX_PATH);
  287. if ( !pInstance->GetEnableShareDirectory(DBImgtype, _T("20151208000000587611.ly.com"), _T("20151002-001"), szEnableShareDirectory, MAX_PATH) )
  288. {
  289. OutputDebugString(szEnableShareDirectory);
  290. OutputDebugString(_T("\n\n"));
  291. ZeroMemory(szEnableShareDirectory, sizeof(TCHAR)*MAX_PATH);
  292. if ( pInstance2->GetEnableShareDirectory(DBImgtype, _T("20151208000000587611.ly.com"), _T("20151002-001"), szEnableShareDirectory, MAX_PATH) )
  293. {
  294. OutputDebugString(szEnableShareDirectory);
  295. OutputDebugString(_T("\n\n"));
  296. }
  297. }
  298. OutputDebugString(szEnableShareDirectory);
  299. OutputDebugString(_T("\n\n"));
  300. }
  301. void CtestDlg::Test_GetOrderAllShareDirectory( IN LPVOID lpInstance, IN LPVOID lpInstance2 )
  302. {
  303. ImgEnvInterface *pInstance = (ImgEnvInterface*)lpInstance;
  304. ImgEnvInterface *pInstance2 = (ImgEnvInterface*)lpInstance2;
  305. TCHAR szEnableShareDirectory[MAX_PATH] = {0};
  306. STR_VEC vtOrderpath;
  307. pInstance->GetOrderAllShareDirectory(OImgtype, _T("20151208000000587611.ly.com"), _T("20151002-001"), vtOrderpath);
  308. pInstance2->GetOrderAllShareDirectory(OImgtype, _T("20151208000000587611.ly.com"), _T("20151002-001"), vtOrderpath);
  309. CStringArray AryOrderpath;
  310. pInstance->GetOrderAllShareDirectory(OImgtype, _T("20151208000000587611.ly.com"), _T("20151002-001"), AryOrderpath);
  311. pInstance2->GetOrderAllShareDirectory(OImgtype, _T("20151208000000587611.ly.com"), _T("20151002-001"), AryOrderpath);
  312. for ( int i = 0; i < AryOrderpath.GetSize(); i++)
  313. {
  314. OutputDebugString(_T("\n"));
  315. OutputDebugString(AryOrderpath.ElementAt(i));
  316. OutputDebugString(_T("\n"));
  317. }
  318. }
  319. void CtestDlg::Test_GetSceneryAllShareDirectory( IN LPVOID lpInstance, IN LPVOID lpInstance2 )
  320. {
  321. ImgEnvInterface *pInstance = (ImgEnvInterface*)lpInstance;
  322. ImgEnvInterface *pInstance2 = (ImgEnvInterface*)lpInstance2;
  323. TCHAR szEnableShareDirectory[MAX_PATH] = {0};
  324. STR_VEC vtScenerypath;
  325. pInstance->GetSceneryAllShareDirectory(OImgtype, _T("20151208000000587611.ly.com"), _T("20151002-001"), _T("内景大西街店C棚"), vtScenerypath);
  326. pInstance2->GetSceneryAllShareDirectory(OImgtype, _T("20151208000000587611.ly.com"), _T("20151002-001"), _T("内景大西街店C棚"), vtScenerypath);
  327. CStringArray AryScenerypath;
  328. pInstance->GetSceneryAllShareDirectory(OImgtype, _T("20151208000000587611.ly.com"), _T("20151002-001"), _T("内景大西街店C棚"), AryScenerypath);
  329. pInstance2->GetSceneryAllShareDirectory(OImgtype, _T("20151208000000587611.ly.com"), _T("20151002-001"), _T("内景大西街店C棚"), AryScenerypath);
  330. for ( int i = 0; i < AryScenerypath.GetSize(); i++)
  331. {
  332. OutputDebugString(_T("\n"));
  333. OutputDebugString(AryScenerypath.ElementAt(i));
  334. OutputDebugString(_T("\n"));
  335. }
  336. }
  337. #endif
  338. //////////////////////////////////////////////////////////////////////////
  339. #ifdef _ImgLoadSpecifiedpathInterface_
  340. void CtestDlg::Test_LoadSpecifiedpathImages( IN LPVOID lpInstance, IN LPVOID lpInstance2 )
  341. {
  342. ImgEnvInterface *pEnv = (ImgEnvInterface*)lpInstance;
  343. ImgEnvInterface *pEnv2 = (ImgEnvInterface*)lpInstance2;
  344. ImgLoadSpecifiedpathInterface *pInstance = NULL;
  345. pEnv->QueryInterface(IID_ImgLoadSpecifiedpathInterface, (void**)&pInstance);
  346. ImgLoadSpecifiedpathInterface *pInstance2 = NULL;
  347. pEnv2->QueryInterface(IID_ImgLoadSpecifiedpathInterface, (void**)&pInstance2);
  348. TCHAR szEnableShareDirectory[MAX_PATH] = {0};
  349. STR_VEC vtImgpath;
  350. pInstance->LoadSpecifiedpathImages(_T("\\\\IT-PC\\客户原片(管理软件)$\\20151002-001"), _T("*.jpg"), vtImgpath);
  351. pInstance2->LoadSpecifiedpathImages(_T("\\\\IT-PC\\客户原片(管理软件)$\\20151002-001"), _T("*.jpg"), vtImgpath);
  352. CStringArray AryImgpath;
  353. pInstance->LoadSpecifiedpathImages(_T("\\\\IT-PC\\客户原片(管理软件)$\\20151002-001"), _T("*.jpg"), AryImgpath);
  354. pInstance2->LoadSpecifiedpathImages(_T("\\\\IT-PC\\客户原片(管理软件)$\\20151002-001"), _T("*.jpg"), AryImgpath);
  355. for ( int i = 0; i < AryImgpath.GetSize(); i++)
  356. {
  357. OutputDebugString(_T("\n"));
  358. OutputDebugString(AryImgpath.ElementAt(i));
  359. OutputDebugString(_T("\n"));
  360. }
  361. pEnv->Release();
  362. pEnv2->Release();
  363. }
  364. void CtestDlg::Test_LoadSelectedIamgesFromSpecifiedpath( IN LPVOID lpInstance, IN LPVOID lpInstance2 )
  365. {
  366. ImgEnvInterface *pEnv = (ImgEnvInterface*)lpInstance;
  367. ImgEnvInterface *pEnv2 = (ImgEnvInterface*)lpInstance2;
  368. ImgLoadSpecifiedpathInterface *pInstance = NULL;
  369. pEnv->QueryInterface(IID_ImgLoadSpecifiedpathInterface, (void**)&pInstance);
  370. ImgLoadSpecifiedpathInterface *pInstance2 = NULL;
  371. pEnv2->QueryInterface(IID_ImgLoadSpecifiedpathInterface, (void**)&pInstance2);
  372. TCHAR szEnableShareDirectory[MAX_PATH] = {0};
  373. STR_VEC vtImgpath;
  374. STR_VEC vtSelectedImg;
  375. STR_VEC vtNoExistImg;
  376. if ( Global::OpenFloder(vtSelectedImg))
  377. {
  378. for ( STR_VEC::iterator it = vtSelectedImg.begin(); it != vtSelectedImg.end(); it++ )
  379. {
  380. *it = Global::getfilename(*it);
  381. }
  382. pInstance->LoadSelectedIamgesFromSpecifiedpath(_T("\\\\IT-PC\\客户原片(管理软件)$\\20151002-001"), _T("*.jpg"), vtSelectedImg, vtNoExistImg, vtImgpath);
  383. pInstance2->LoadSelectedIamgesFromSpecifiedpath(_T("\\\\IT-PC\\客户原片(管理软件)$\\20151002-001"), _T("*.jpg"), vtSelectedImg, vtNoExistImg, vtImgpath);
  384. }
  385. CStringArray AryImgpath;
  386. CStringArray ArySelectedImg;
  387. CStringArray AryNoExistImg;
  388. if ( Global::OpenFloder(ArySelectedImg))
  389. {
  390. for ( int i = 0; i < ArySelectedImg.GetSize(); i++ )
  391. {
  392. ArySelectedImg.SetAt(i,Global::getfilename(ArySelectedImg.ElementAt(i)));
  393. }
  394. pInstance->LoadSelectedIamgesFromSpecifiedpath(_T("\\\\IT-PC\\客户原片(管理软件)$\\20151002-001"), _T("*.jpg"), ArySelectedImg, AryNoExistImg, AryImgpath);
  395. pInstance2->LoadSelectedIamgesFromSpecifiedpath(_T("\\\\IT-PC\\客户原片(管理软件)$\\20151002-001"), _T("*.jpg"), ArySelectedImg, AryNoExistImg, AryImgpath);
  396. for ( int i = 0; i < AryImgpath.GetSize(); i++)
  397. {
  398. OutputDebugString(_T("\n"));
  399. OutputDebugString(AryImgpath.ElementAt(i));
  400. OutputDebugString(_T("\n"));
  401. }
  402. }
  403. pEnv->Release();
  404. pEnv2->Release();
  405. }
  406. void CtestDlg::Test_LoadSpecifiedpathImagesEx( IN LPVOID lpInstance, IN LPVOID lpInstance2 )
  407. {
  408. ImgEnvInterface *pEnv = (ImgEnvInterface*)lpInstance;
  409. ImgEnvInterface *pEnv2 = (ImgEnvInterface*)lpInstance2;
  410. ImgLoadSpecifiedpathInterface *pInstance = NULL;
  411. pEnv->QueryInterface(IID_ImgLoadSpecifiedpathInterface, (void**)&pInstance);
  412. ImgLoadSpecifiedpathInterface *pInstance2 = NULL;
  413. pEnv2->QueryInterface(IID_ImgLoadSpecifiedpathInterface, (void**)&pInstance2);
  414. TCHAR szEnableShareDirectory[MAX_PATH] = {0};
  415. BOOL bSet = TRUE;
  416. STR_VEC vtLoadImgpath;
  417. STR_VEC vtWithImgpath;
  418. pInstance->LoadSpecifiedpathImagesEx(_T("\\\\IT-PC\\客户原片(管理软件)$\\20151002-001"), bSet, _T("*.jpg|*.nef"), vtLoadImgpath, _T("*.jpeg|*.cr2"), vtWithImgpath);
  419. pInstance2->LoadSpecifiedpathImagesEx(_T("\\\\IT-PC\\客户原片(管理软件)$\\20151002-001"), bSet, _T("*.jpg|*.nef"), vtLoadImgpath, _T("*.jpeg|*.cr2"), vtWithImgpath);
  420. CStringArray AryLoadImgpath;
  421. CStringArray AryWithImgpath;
  422. pInstance->LoadSpecifiedpathImagesEx(_T("\\\\IT-PC\\客户原片(管理软件)$\\20151002-001"), bSet, _T("*.jpg|*.nef"), AryLoadImgpath, _T("*.jpeg|*.cr2"), AryWithImgpath);
  423. pInstance2->LoadSpecifiedpathImagesEx(_T("\\\\IT-PC\\客户原片(管理软件)$\\20151002-001"), bSet, _T("*.jpg|*.nef"), AryLoadImgpath, _T("*.jpeg|*.cr2"), AryWithImgpath);
  424. for ( int i = 0; i < AryLoadImgpath.GetSize(); i++)
  425. {
  426. OutputDebugString(_T("\n"));
  427. OutputDebugString(AryLoadImgpath.ElementAt(i));
  428. OutputDebugString(_T("\n"));
  429. }
  430. for ( int i = 0; i < AryWithImgpath.GetSize(); i++)
  431. {
  432. OutputDebugString(_T("\n"));
  433. OutputDebugString(AryWithImgpath.ElementAt(i));
  434. OutputDebugString(_T("\n"));
  435. }
  436. pEnv->Release();
  437. pEnv2->Release();
  438. }
  439. void CtestDlg::Test_LoadSelectedIamgesFromSpecifiedpathEx( IN LPVOID lpInstance, IN LPVOID lpInstance2 )
  440. {
  441. ImgEnvInterface *pEnv = (ImgEnvInterface*)lpInstance;
  442. ImgEnvInterface *pEnv2 = (ImgEnvInterface*)lpInstance2;
  443. ImgLoadSpecifiedpathInterface *pInstance = NULL;
  444. pEnv->QueryInterface(IID_ImgLoadSpecifiedpathInterface, (void**)&pInstance);
  445. ImgLoadSpecifiedpathInterface *pInstance2 = NULL;
  446. pEnv2->QueryInterface(IID_ImgLoadSpecifiedpathInterface, (void**)&pInstance2);
  447. TCHAR szEnableShareDirectory[MAX_PATH] = {0};
  448. BOOL bSet = FALSE;
  449. STR_VEC vtLoadImgpath;
  450. STR_VEC vtWithImgpath;
  451. STR_VEC vtSelectedImg;
  452. STR_VEC vtNoExistImg;
  453. if ( Global::OpenFloder(vtSelectedImg))
  454. {
  455. for ( STR_VEC::iterator it = vtSelectedImg.begin(); it != vtSelectedImg.end(); it++ )
  456. {
  457. *it = Global::getfilename(*it);
  458. }
  459. pInstance->LoadSelectedIamgesFromSpecifiedpathEx(_T("\\\\IT-PC\\客户原片(管理软件)$\\20151002-001"), bSet, vtSelectedImg, vtNoExistImg, _T("*.jpg|*.nef"), vtLoadImgpath, _T("*.jpeg|*.cr2"), vtWithImgpath);
  460. pInstance2->LoadSelectedIamgesFromSpecifiedpathEx(_T("\\\\IT-PC\\客户原片(管理软件)$\\20151002-001"), bSet, vtSelectedImg, vtNoExistImg, _T("*.jpg|*.nef"), vtLoadImgpath, _T("*.jpeg|*.cr2"), vtWithImgpath);
  461. }
  462. CStringArray AryLoadImgpath;
  463. CStringArray AryWithImgpath;
  464. CStringArray ArySelectedImg;
  465. CStringArray AryNoExistImg;
  466. if ( Global::OpenFloder(ArySelectedImg))
  467. {
  468. for ( int i = 0; i < ArySelectedImg.GetSize(); i++ )
  469. {
  470. ArySelectedImg.SetAt(i,Global::getfilename(ArySelectedImg.ElementAt(i)));
  471. }
  472. pInstance->LoadSelectedIamgesFromSpecifiedpathEx(_T("\\\\IT-PC\\客户原片(管理软件)$\\20151002-001"), bSet, ArySelectedImg, AryNoExistImg, _T("*.jpg|*.nef"), AryLoadImgpath, _T("*.jpeg|*.cr2"), AryWithImgpath);
  473. pInstance2->LoadSelectedIamgesFromSpecifiedpathEx(_T("\\\\IT-PC\\客户原片(管理软件)$\\20151002-001"), bSet, ArySelectedImg, AryNoExistImg, _T("*.jpg|*.nef"), AryLoadImgpath, _T("*.jpeg|*.cr2"), AryWithImgpath);
  474. for ( int i = 0; i < AryLoadImgpath.GetSize(); i++)
  475. {
  476. OutputDebugString(_T("\n"));
  477. OutputDebugString(AryLoadImgpath.ElementAt(i));
  478. OutputDebugString(_T("\n"));
  479. }
  480. OutputDebugString(_T("\n------------------------------------\n"));
  481. for ( int i = 0; i < AryWithImgpath.GetSize(); i++)
  482. {
  483. OutputDebugString(_T("\n"));
  484. OutputDebugString(AryWithImgpath.ElementAt(i));
  485. OutputDebugString(_T("\n"));
  486. }
  487. }
  488. pEnv->Release();
  489. pEnv2->Release();
  490. }
  491. #endif
  492. //////////////////////////////////////////////////////////////////////////
  493. #ifdef _ImgLoadOrderpathInterface_
  494. void CtestDlg::Test_LoadSelectedIamges( IN LPVOID lpInstance, IN LPVOID lpInstance2 )
  495. {
  496. ImgEnvInterface *pEnv = (ImgEnvInterface*)lpInstance;
  497. ImgEnvInterface *pEnv2 = (ImgEnvInterface*)lpInstance2;
  498. ImgLoadOrderpathInterface *pInstance = NULL;
  499. pEnv->QueryInterface(IID_ImgLoadOrderpathInterface, (void**)&pInstance);
  500. ImgLoadOrderpathInterface *pInstance2 = NULL;
  501. pEnv2->QueryInterface(IID_ImgLoadOrderpathInterface, (void**)&pInstance2);
  502. TCHAR szEnableShareDirectory[MAX_PATH] = {0};
  503. STR_VEC vtImgpath;
  504. STR_VEC vtSelectedImg;
  505. STR_VEC vtNoExistImg;
  506. if ( Global::OpenFloder(vtSelectedImg))
  507. {
  508. for ( STR_VEC::iterator it = vtSelectedImg.begin(); it != vtSelectedImg.end(); it++ )
  509. {
  510. *it = Global::getfilename(*it);
  511. }
  512. pInstance->LoadSelectedIamges(OImgtype, _T("20151208000000587611.ly.com"), _T("20151002-001"), _T("*.jpg"), vtSelectedImg, vtNoExistImg, vtImgpath);
  513. pInstance2->LoadSelectedIamges(OImgtype, _T("20151208000000587611.ly.com"), _T("20151002-001"), _T("*.jpg"), vtSelectedImg, vtNoExistImg, vtImgpath);
  514. }
  515. CStringArray AryImgpath;
  516. CStringArray ArySelectedImg;
  517. CStringArray AryNoExistImg;
  518. if ( Global::OpenFloder(ArySelectedImg))
  519. {
  520. for ( int i = 0; i < ArySelectedImg.GetSize(); i++ )
  521. {
  522. ArySelectedImg.SetAt(i,Global::getfilename(ArySelectedImg.ElementAt(i)));
  523. }
  524. pInstance->LoadSelectedIamges(OImgtype, _T("20151208000000587611.ly.com"), _T("20151002-001"), _T("*.jpg"), ArySelectedImg, AryNoExistImg, AryImgpath);
  525. pInstance2->LoadSelectedIamges(OImgtype, _T("20151208000000587611.ly.com"), _T("20151002-001"), _T("*.jpg"), ArySelectedImg, AryNoExistImg, AryImgpath);
  526. for ( int i = 0; i < AryImgpath.GetSize(); i++)
  527. {
  528. OutputDebugString(_T("\n"));
  529. OutputDebugString(AryImgpath.ElementAt(i));
  530. OutputDebugString(_T("\n"));
  531. }
  532. }
  533. pEnv->Release();
  534. pEnv2->Release();
  535. }
  536. void CtestDlg::Test_LoadSelectedIamges2( IN LPVOID lpInstance, IN LPVOID lpInstance2 )
  537. {
  538. ImgEnvInterface *pEnv = (ImgEnvInterface*)lpInstance;
  539. ImgEnvInterface *pEnv2 = (ImgEnvInterface*)lpInstance2;
  540. ImgLoadOrderpathInterface *pInstance = NULL;
  541. pEnv->QueryInterface(IID_ImgLoadOrderpathInterface, (void**)&pInstance);
  542. ImgLoadOrderpathInterface *pInstance2 = NULL;
  543. pEnv2->QueryInterface(IID_ImgLoadOrderpathInterface, (void**)&pInstance2);
  544. TCHAR szEnableShareDirectory[MAX_PATH] = {0};
  545. STR_VEC vtImgpath;
  546. STR_VEC vtSelectedImg;
  547. STR_VEC vtNoExistImg;
  548. if ( Global::OpenFloder(vtSelectedImg))
  549. {
  550. for ( STR_VEC::iterator it = vtSelectedImg.begin(); it != vtSelectedImg.end(); it++ )
  551. {
  552. *it = Global::getfilename(*it);
  553. }
  554. pInstance->LoadSelectedIamges2(OImgtype, _T("20151208000000587611.ly.com"), _T("20151002-001"), _T("*.jpg"), vtSelectedImg, vtNoExistImg, vtImgpath);
  555. pInstance2->LoadSelectedIamges2(OImgtype, _T("20151208000000587611.ly.com"), _T("20151002-001"), _T("*.jpg"), vtSelectedImg, vtNoExistImg, vtImgpath);
  556. }
  557. CStringArray AryImgpath;
  558. CStringArray ArySelectedImg;
  559. CStringArray AryNoExistImg;
  560. if ( Global::OpenFloder(ArySelectedImg))
  561. {
  562. for ( int i = 0; i < ArySelectedImg.GetSize(); i++ )
  563. {
  564. ArySelectedImg.SetAt(i,Global::getfilename(ArySelectedImg.ElementAt(i)));
  565. }
  566. pInstance->LoadSelectedIamges2(OImgtype, _T("20151208000000587611.ly.com"), _T("20151002-001"), _T("*.jpg"), ArySelectedImg, AryNoExistImg, AryImgpath);
  567. pInstance2->LoadSelectedIamges2(OImgtype, _T("20151208000000587611.ly.com"), _T("20151002-001"), _T("*.jpg"), ArySelectedImg, AryNoExistImg, AryImgpath);
  568. for ( int i = 0; i < AryImgpath.GetSize(); i++)
  569. {
  570. OutputDebugString(_T("\n"));
  571. OutputDebugString(AryImgpath.ElementAt(i));
  572. OutputDebugString(_T("\n"));
  573. }
  574. }
  575. pEnv->Release();
  576. pEnv2->Release();
  577. }
  578. void CtestDlg::Test_LoadSelectedIamgesInOrder( IN LPVOID lpInstance, IN LPVOID lpInstance2 )
  579. {
  580. ImgEnvInterface *pEnv = (ImgEnvInterface*)lpInstance;
  581. ImgEnvInterface *pEnv2 = (ImgEnvInterface*)lpInstance2;
  582. ImgLoadOrderpathInterface *pInstance = NULL;
  583. pEnv->QueryInterface(IID_ImgLoadOrderpathInterface, (void**)&pInstance);
  584. ImgLoadOrderpathInterface *pInstance2 = NULL;
  585. pEnv2->QueryInterface(IID_ImgLoadOrderpathInterface, (void**)&pInstance2);
  586. TCHAR szEnableShareDirectory[MAX_PATH] = {0};
  587. STR_VEC vtImgpath;
  588. STR_VEC vtSelectedImg;
  589. STR_VEC vtNoExistImg;
  590. if ( Global::OpenFloder(vtSelectedImg))
  591. {
  592. for ( STR_VEC::iterator it = vtSelectedImg.begin(); it != vtSelectedImg.end(); it++ )
  593. {
  594. *it = Global::getfilename(*it);
  595. }
  596. pInstance->LoadSelectedIamgesInOrder(OImgtype, _T("20151208000000587611.ly.com"), _T("20151002-001"), _T("*.jpg"), vtSelectedImg, vtNoExistImg, vtImgpath);
  597. pInstance2->LoadSelectedIamgesInOrder(OImgtype, _T("20151208000000587611.ly.com"), _T("20151002-001"), _T("*.jpg"), vtSelectedImg, vtNoExistImg, vtImgpath);
  598. }
  599. CStringArray AryImgpath;
  600. CStringArray ArySelectedImg;
  601. CStringArray AryNoExistImg;
  602. if ( Global::OpenFloder(ArySelectedImg))
  603. {
  604. for ( int i = 0; i < ArySelectedImg.GetSize(); i++ )
  605. {
  606. ArySelectedImg.SetAt(i,Global::getfilename(ArySelectedImg.ElementAt(i)));
  607. }
  608. pInstance->LoadSelectedIamgesInOrder(OImgtype, _T("20151208000000587611.ly.com"), _T("20151002-001"), _T("*.jpg"), ArySelectedImg, AryNoExistImg, AryImgpath);
  609. pInstance2->LoadSelectedIamgesInOrder(OImgtype, _T("20151208000000587611.ly.com"), _T("20151002-001"), _T("*.jpg"), ArySelectedImg, AryNoExistImg, AryImgpath);
  610. for ( int i = 0; i < AryImgpath.GetSize(); i++)
  611. {
  612. OutputDebugString(_T("\n"));
  613. OutputDebugString(AryImgpath.ElementAt(i));
  614. OutputDebugString(_T("\n"));
  615. }
  616. }
  617. pEnv->Release();
  618. pEnv2->Release();
  619. }
  620. void CtestDlg::Test_LoadSceneryImages( IN LPVOID lpInstance, IN LPVOID lpInstance2 )
  621. {
  622. ImgEnvInterface *pEnv = (ImgEnvInterface*)lpInstance;
  623. ImgEnvInterface *pEnv2 = (ImgEnvInterface*)lpInstance2;
  624. ImgLoadOrderpathInterface *pInstance = NULL;
  625. pEnv->QueryInterface(IID_ImgLoadOrderpathInterface, (void**)&pInstance);
  626. ImgLoadOrderpathInterface *pInstance2 = NULL;
  627. pEnv2->QueryInterface(IID_ImgLoadOrderpathInterface, (void**)&pInstance2);
  628. TCHAR szEnableShareDirectory[MAX_PATH] = {0};
  629. STR_VEC vtSceneryImgpath;
  630. STR_VEC vtScenerypath;
  631. pInstance->LoadSceneryImages(OImgtype, _T("20151208000000587611.ly.com"), _T("20151002-001"), _T("内景大西街店C棚"), _T("*.jpg"), vtSceneryImgpath, &vtScenerypath);
  632. pInstance2->LoadSceneryImages(OImgtype, _T("20151208000000587611.ly.com"), _T("20151002-001"), _T("内景大西街店C棚"), _T("*.jpg"), vtSceneryImgpath, &vtScenerypath);
  633. CStringArray ArySceneryImgpath;
  634. CStringArray AryScenerypath;
  635. pInstance->LoadSceneryImages(OImgtype, _T("20151208000000587611.ly.com"), _T("20151002-001"), _T("内景大西街店C棚"), _T("*.jpg"), ArySceneryImgpath, &AryScenerypath);
  636. pInstance2->LoadSceneryImages(OImgtype, _T("20151208000000587611.ly.com"), _T("20151002-001"), _T("内景大西街店C棚"), _T("*.jpg"), ArySceneryImgpath, &AryScenerypath);
  637. for ( int i = 0; i < ArySceneryImgpath.GetSize(); i++)
  638. {
  639. OutputDebugString(_T("\n"));
  640. OutputDebugString(ArySceneryImgpath.ElementAt(i));
  641. OutputDebugString(_T("\n"));
  642. }
  643. pEnv->Release();
  644. pEnv2->Release();
  645. }
  646. void CtestDlg::Test_LoadOrderImages( IN LPVOID lpInstance, IN LPVOID lpInstance2 )
  647. {
  648. ImgEnvInterface *pEnv = (ImgEnvInterface*)lpInstance;
  649. ImgEnvInterface *pEnv2 = (ImgEnvInterface*)lpInstance2;
  650. ImgLoadOrderpathInterface *pInstance = NULL;
  651. pEnv->QueryInterface(IID_ImgLoadOrderpathInterface, (void**)&pInstance);
  652. ImgLoadOrderpathInterface *pInstance2 = NULL;
  653. pEnv2->QueryInterface(IID_ImgLoadOrderpathInterface, (void**)&pInstance2);
  654. TCHAR szEnableShareDirectory[MAX_PATH] = {0};
  655. STR_VEC vtSceneryImgpath;
  656. STR_VEC vtScenerypath;
  657. pInstance->LoadOrderImages(OImgtype, _T("20151208000000587611.ly.com"), _T("20151002-001"), _T("*.jpg"), vtSceneryImgpath, &vtScenerypath);
  658. pInstance2->LoadOrderImages(OImgtype, _T("20151208000000587611.ly.com"), _T("20151002-001"), _T("*.jpg"), vtSceneryImgpath, &vtScenerypath);
  659. CStringArray ArySceneryImgpath;
  660. CStringArray AryScenerypath;
  661. pInstance->LoadOrderImages(OImgtype, _T("20151208000000587611.ly.com"), _T("20151002-001"), _T("*.jpg"), ArySceneryImgpath, &AryScenerypath);
  662. pInstance2->LoadOrderImages(OImgtype, _T("20151208000000587611.ly.com"), _T("20151002-001"), _T("*.jpg"), ArySceneryImgpath, &AryScenerypath);
  663. for ( int i = 0; i < ArySceneryImgpath.GetSize(); i++)
  664. {
  665. OutputDebugString(_T("\n"));
  666. OutputDebugString(ArySceneryImgpath.ElementAt(i));
  667. OutputDebugString(_T("\n"));
  668. }
  669. pEnv->Release();
  670. pEnv2->Release();
  671. }
  672. #endif
  673. //////////////////////////////////////////////////////////////////////////
  674. #ifdef _ImgLoadOrderpathExInterface_
  675. void CtestDlg::Test_LoadSelectedIamgesEx( IN LPVOID lpInstance, IN LPVOID lpInstance2 )
  676. {
  677. ImgEnvInterface *pEnv = (ImgEnvInterface*)lpInstance;
  678. ImgEnvInterface *pEnv2 = (ImgEnvInterface*)lpInstance2;
  679. ImgLoadOrderpathExInterface *pInstance = NULL;
  680. pEnv->QueryInterface(IID_ImgLoadOrderpathExInterface, (void**)&pInstance);
  681. ImgLoadOrderpathExInterface *pInstance2 = NULL;
  682. pEnv2->QueryInterface(IID_ImgLoadOrderpathExInterface, (void**)&pInstance2);
  683. TCHAR szEnableShareDirectory[MAX_PATH] = {0};
  684. BOOL bSet = TRUE;
  685. STR_VEC vtLoadImgpath;
  686. STR_VEC vtWithImgpath;
  687. STR_VEC vtSelectedImg;
  688. STR_VEC vtNoExistImg;
  689. if ( Global::OpenFloder(vtSelectedImg))
  690. {
  691. for ( STR_VEC::iterator it = vtSelectedImg.begin(); it != vtSelectedImg.end(); it++ )
  692. {
  693. *it = Global::getfilename(*it);
  694. }
  695. pInstance->LoadSelectedIamgesEx(OImgtype, _T("20151208000000587611.ly.com"), _T("20151002-001"), bSet, vtSelectedImg, vtNoExistImg, _T("*.jpg|*.nef"), vtLoadImgpath, _T("*.jpeg|*.cr2"), vtWithImgpath);
  696. pInstance2->LoadSelectedIamgesEx(OImgtype, _T("20151208000000587611.ly.com"), _T("20151002-001"), bSet, vtSelectedImg, vtNoExistImg, _T("*.jpg|*.nef"), vtLoadImgpath, _T("*.jpeg|*.cr2"), vtWithImgpath);
  697. }
  698. CStringArray AryLoadImgpath;
  699. CStringArray AryWithImgpath;
  700. CStringArray ArySelectedImg;
  701. CStringArray AryNoExistImg;
  702. if ( Global::OpenFloder(ArySelectedImg))
  703. {
  704. for ( int i = 0; i < ArySelectedImg.GetSize(); i++ )
  705. {
  706. ArySelectedImg.SetAt(i,Global::getfilename(ArySelectedImg.ElementAt(i)));
  707. }
  708. pInstance->LoadSelectedIamgesEx(OImgtype, _T("20151208000000587611.ly.com"), _T("20151002-001"), bSet, ArySelectedImg, AryNoExistImg, _T("*.jpg|*.nef"), AryLoadImgpath, _T("*.jpeg|*.cr2"), AryWithImgpath);
  709. for ( int i = 0; i < AryLoadImgpath.GetSize(); i++)
  710. {
  711. OutputDebugString(_T("\n"));
  712. OutputDebugString(AryLoadImgpath.ElementAt(i));
  713. OutputDebugString(_T("\n"));
  714. }
  715. OutputDebugString(_T("\n------------------------------------\n"));
  716. for ( int i = 0; i < AryWithImgpath.GetSize(); i++)
  717. {
  718. OutputDebugString(_T("\n"));
  719. OutputDebugString(AryWithImgpath.ElementAt(i));
  720. OutputDebugString(_T("\n"));
  721. }
  722. OutputDebugString(_T("\n------------------------------------\n"));
  723. pInstance2->LoadSelectedIamgesEx(OImgtype, _T("20151208000000587611.ly.com"), _T("20151002-001"), bSet, ArySelectedImg, AryNoExistImg, _T("*.jpg|*.nef"), AryLoadImgpath, _T("*.jpeg|*.cr2"), AryWithImgpath);
  724. for ( int i = 0; i < AryLoadImgpath.GetSize(); i++)
  725. {
  726. OutputDebugString(_T("\n"));
  727. OutputDebugString(AryLoadImgpath.ElementAt(i));
  728. OutputDebugString(_T("\n"));
  729. }
  730. OutputDebugString(_T("\n------------------------------------\n"));
  731. for ( int i = 0; i < AryWithImgpath.GetSize(); i++)
  732. {
  733. OutputDebugString(_T("\n"));
  734. OutputDebugString(AryWithImgpath.ElementAt(i));
  735. OutputDebugString(_T("\n"));
  736. }
  737. }
  738. pEnv->Release();
  739. pEnv2->Release();
  740. }
  741. void CtestDlg::Test_LoadSelectedIamgesInOrderEx( IN LPVOID lpInstance, IN LPVOID lpInstance2 )
  742. {
  743. ImgEnvInterface *pEnv = (ImgEnvInterface*)lpInstance;
  744. ImgEnvInterface *pEnv2 = (ImgEnvInterface*)lpInstance2;
  745. ImgLoadOrderpathExInterface *pInstance = NULL;
  746. pEnv->QueryInterface(IID_ImgLoadOrderpathExInterface, (void**)&pInstance);
  747. ImgLoadOrderpathExInterface *pInstance2 = NULL;
  748. pEnv2->QueryInterface(IID_ImgLoadOrderpathExInterface, (void**)&pInstance2);
  749. TCHAR szEnableShareDirectory[MAX_PATH] = {0};
  750. BOOL bSet = TRUE;
  751. STR_VEC vtLoadImgpath;
  752. STR_VEC vtWithImgpath;
  753. STR_VEC vtSelectedImg;
  754. STR_VEC vtNoExistImg;
  755. if ( Global::OpenFloder(vtSelectedImg))
  756. {
  757. for ( STR_VEC::iterator it = vtSelectedImg.begin(); it != vtSelectedImg.end(); it++ )
  758. {
  759. *it = Global::getfilename(*it);
  760. }
  761. pInstance->LoadSelectedIamgesInOrderEx(OImgtype,
  762. _T("20151208000000587611.ly.com"),
  763. _T("20151002-001"), bSet, vtSelectedImg, vtNoExistImg,
  764. _T("*.jpg|*.nef"), vtLoadImgpath, _T("*.jpeg|*.cr2"), vtWithImgpath);
  765. pInstance2->LoadSelectedIamgesInOrderEx(OImgtype,
  766. _T("20151208000000587611.ly.com"),
  767. _T("20151002-001"), bSet, vtSelectedImg, vtNoExistImg,
  768. _T("*.jpg|*.nef"), vtLoadImgpath, _T("*.jpeg|*.cr2"), vtWithImgpath);
  769. }
  770. CStringArray AryLoadImgpath;
  771. CStringArray AryWithImgpath;
  772. CStringArray ArySelectedImg;
  773. CStringArray AryNoExistImg;
  774. if ( Global::OpenFloder(ArySelectedImg))
  775. {
  776. for ( int i = 0; i < ArySelectedImg.GetSize(); i++ )
  777. {
  778. ArySelectedImg.SetAt(i,Global::getfilename(ArySelectedImg.ElementAt(i)));
  779. }
  780. pInstance->LoadSelectedIamgesInOrderEx(OImgtype, _T("20151208000000587611.ly.com"), _T("20151002-001"), bSet, ArySelectedImg, AryNoExistImg, _T("*.jpg|*.nef"), AryLoadImgpath, _T("*.jpeg|*.cr2"), AryWithImgpath);
  781. for ( int i = 0; i < AryLoadImgpath.GetSize(); i++)
  782. {
  783. OutputDebugString(_T("\n"));
  784. OutputDebugString(AryLoadImgpath.ElementAt(i));
  785. OutputDebugString(_T("\n"));
  786. }
  787. OutputDebugString(_T("\n------------------------------------\n"));
  788. for ( int i = 0; i < AryWithImgpath.GetSize(); i++)
  789. {
  790. OutputDebugString(_T("\n"));
  791. OutputDebugString(AryWithImgpath.ElementAt(i));
  792. OutputDebugString(_T("\n"));
  793. }
  794. OutputDebugString(_T("\n------------------------------------\n"));
  795. pInstance2->LoadSelectedIamgesInOrderEx(OImgtype, _T("20151208000000587611.ly.com"), _T("20151002-001"), bSet, ArySelectedImg, AryNoExistImg, _T("*.jpg|*.nef"), AryLoadImgpath, _T("*.jpeg|*.cr2"), AryWithImgpath);
  796. for ( int i = 0; i < AryLoadImgpath.GetSize(); i++)
  797. {
  798. OutputDebugString(_T("\n"));
  799. OutputDebugString(AryLoadImgpath.ElementAt(i));
  800. OutputDebugString(_T("\n"));
  801. }
  802. OutputDebugString(_T("\n------------------------------------\n"));
  803. for ( int i = 0; i < AryWithImgpath.GetSize(); i++)
  804. {
  805. OutputDebugString(_T("\n"));
  806. OutputDebugString(AryWithImgpath.ElementAt(i));
  807. OutputDebugString(_T("\n"));
  808. }
  809. OutputDebugString(_T("\n------------------------------------\n"));
  810. }
  811. pEnv->Release();
  812. pEnv2->Release();
  813. }
  814. void CtestDlg::Test_LoadOrderImagesEx( IN LPVOID lpInstance, IN LPVOID lpInstance2 )
  815. {
  816. ImgEnvInterface *pEnv = (ImgEnvInterface*)lpInstance;
  817. ImgEnvInterface *pEnv2 = (ImgEnvInterface*)lpInstance2;
  818. ImgLoadOrderpathExInterface *pInstance = NULL;
  819. pEnv->QueryInterface(IID_ImgLoadOrderpathExInterface, (void**)&pInstance);
  820. ImgLoadOrderpathExInterface *pInstance2 = NULL;
  821. pEnv2->QueryInterface(IID_ImgLoadOrderpathExInterface, (void**)&pInstance2);
  822. TCHAR szEnableShareDirectory[MAX_PATH] = {0};
  823. BOOL bSet = TRUE;
  824. STR_VEC vtLoadImgpath;
  825. STR_VEC vtWithImgpath;
  826. STR_VEC vtScenerypath;
  827. pInstance->LoadOrderImagesEx(OImgtype, _T("20151208000000587611.ly.com"), _T("20151002-001"), bSet, _T("*.jpg|*.nef"), vtLoadImgpath, _T("*.jpeg|*.cr2"), vtWithImgpath, &vtScenerypath);
  828. pInstance2->LoadOrderImagesEx(OImgtype, _T("20151208000000587611.ly.com"), _T("20151002-001"), bSet, _T("*.jpg|*.nef"), vtLoadImgpath, _T("*.jpeg|*.cr2"), vtWithImgpath, &vtScenerypath);
  829. CStringArray AryLoadImgpath;
  830. CStringArray AryWithImgpath;
  831. CStringArray AryScenerypath;
  832. pInstance->LoadOrderImagesEx(OImgtype, _T("20151208000000587611.ly.com"), _T("20151002-001"), bSet, _T("*.jpg|*.nef"), AryLoadImgpath, _T("*.jpeg|*.cr2"), AryWithImgpath, &AryScenerypath);
  833. pInstance2->LoadOrderImagesEx(OImgtype, _T("20151208000000587611.ly.com"), _T("20151002-001"),bSet, _T("*.jpg|*.nef"), AryLoadImgpath, _T("*.jpeg|*.cr2"), AryWithImgpath, &AryScenerypath);
  834. pEnv->Release();
  835. pEnv2->Release();
  836. }
  837. void CtestDlg::Test_LoadSceneryImagesEx( IN LPVOID lpInstance, IN LPVOID lpInstance2 )
  838. {
  839. ImgEnvInterface *pEnv = (ImgEnvInterface*)lpInstance;
  840. ImgEnvInterface *pEnv2 = (ImgEnvInterface*)lpInstance2;
  841. ImgLoadOrderpathExInterface *pInstance = NULL;
  842. pEnv->QueryInterface(IID_ImgLoadOrderpathExInterface, (void**)&pInstance);
  843. ImgLoadOrderpathExInterface *pInstance2 = NULL;
  844. pEnv2->QueryInterface(IID_ImgLoadOrderpathExInterface, (void**)&pInstance2);
  845. TCHAR szEnableShareDirectory[MAX_PATH] = {0};
  846. BOOL bSet = TRUE;
  847. STR_VEC vtLoadImgpath;
  848. STR_VEC vtWithImgpath;
  849. STR_VEC vtScenerypath;
  850. pInstance->LoadSceneryImagesEx(OImgtype, _T("20151208000000587611.ly.com"), _T("20151002-001"), _T("内景大西街店C棚"), _T("*.jpg|*.nef"), vtLoadImgpath, _T("*.jpeg|*.cr2"), vtWithImgpath, &vtScenerypath);
  851. pInstance2->LoadSceneryImagesEx(OImgtype, _T("20151208000000587611.ly.com"), _T("20151002-001"), _T("内景大西街店C棚"), _T("*.jpg|*.nef"), vtLoadImgpath, _T("*.jpeg|*.cr2"), vtWithImgpath, &vtScenerypath);
  852. CStringArray AryLoadImgpath;
  853. CStringArray AryWithImgpath;
  854. CStringArray AryScenerypath;
  855. pInstance->LoadSceneryImagesEx(OImgtype, _T("20151208000000587611.ly.com"), _T("20151002-001"), _T("内景大西街店C棚"), _T("*.jpg|*.nef"), AryLoadImgpath, _T("*.jpeg|*.cr2"), AryWithImgpath, &AryScenerypath);
  856. pInstance2->LoadSceneryImagesEx(OImgtype, _T("20151208000000587611.ly.com"), _T("20151002-001"), _T("内景大西街店C棚"), _T("*.jpg|*.nef"), AryLoadImgpath, _T("*.jpeg|*.cr2"), AryWithImgpath, &AryScenerypath);
  857. pEnv->Release();
  858. pEnv2->Release();
  859. }
  860. #endif
  861. //////////////////////////////////////////////////////////////////////////
  862. #ifdef _ImgCopyInterface_
  863. void CtestDlg::Test_CopyImg2Specifiedpath( IN LPVOID lpInstance, IN LPVOID lpInstance2 )
  864. {
  865. ImgEnvInterface *pEnv = (ImgEnvInterface*)lpInstance;
  866. ImgEnvInterface *pEnv2 = (ImgEnvInterface*)lpInstance2;
  867. ImgCopyInterface *pInstance = NULL;
  868. pEnv->QueryInterface(IID_ImgCopyInterface, (void**)&pInstance);
  869. ImgCopyInterface *pInstance2 = NULL;
  870. pEnv2->QueryInterface(IID_ImgCopyInterface, (void**)&pInstance2);
  871. TCHAR szEnableShareDirectory[MAX_PATH] = {0};
  872. BOOL bSet = TRUE;
  873. STR_VEC vtLoadImgpath;
  874. STR_VEC vtWithImgpath;
  875. STR_VEC vtScenerypath;
  876. INT nCount = 0;
  877. //////////////////////////////////////////////////////////////////////////
  878. nCount = pInstance->CopyImg2Specifiedpath(
  879. _T("\\\\IT-PC\\客户原片(管理软件)$\\20151002-001"),
  880. _T("C:\\Users\\IT\\Desktop\\新建文件夹1"),
  881. _T("*.jpg|*.nef"),
  882. SET_PIX(800,900),
  883. bSet,
  884. FALSE
  885. );
  886. //////////////////////////////////////////////////////////////////////////
  887. STR_VEC vtSelectedImgpath;
  888. if ( Global::OpenFloder(vtSelectedImgpath))
  889. {
  890. // for ( STR_VEC::iterator it = vtSelectedImgpath.begin(); it != vtSelectedImgpath.end(); it++ )
  891. // {
  892. // *it = Global::getfilename(*it);
  893. // }
  894. nCount = pInstance2->CopyImg2Specifiedpath(
  895. vtSelectedImgpath,
  896. _T("C:\\Users\\IT\\Desktop\\新建文件夹2"),
  897. _T("*.jpg|*.nef"),
  898. SET_PIX(200,400),
  899. FALSE, // 是否同时复制子目录;
  900. NULL, // 复制子目录时的分隔符;
  901. FALSE // 目标文件存在是否复制;
  902. );
  903. }
  904. //////////////////////////////////////////////////////////////////////////
  905. CStringArray ArySelectedImgpath;
  906. if ( Global::OpenFloder(ArySelectedImgpath))
  907. {
  908. // for ( int i = 0; i < ArySelectedImgpath.GetSize(); i++ )
  909. // {
  910. // ArySelectedImgpath.SetAt(i,Global::getfilename(ArySelectedImgpath.ElementAt(i)));
  911. // }
  912. nCount = pInstance2->CopyImg2Specifiedpath(
  913. vtSelectedImgpath,
  914. _T("C:\\Users\\IT\\Desktop\\新建文件夹2"),
  915. _T("*.jpg|*.nef"),
  916. SET_PIX(1500,1200),
  917. FALSE, // 是否同时复制子目录;
  918. NULL, // 复制子目录时的分隔符;
  919. FALSE // 目标文件存在是否复制;
  920. );
  921. }
  922. pEnv->Release();
  923. pEnv2->Release();
  924. }
  925. #endif