testDlg.cpp 41 KB

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