ChoosePhotoForm.cpp 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143
  1. // ChoosePhotoForm.cpp : implementation file
  2. //
  3. #include "stdafx.h"
  4. #include "ylgl.h"
  5. #include "ChoosePhotoForm.h"
  6. #include "MyMdi.H"
  7. #include "ModifyDinDan.h"
  8. #include "ImportPhoto.h"
  9. #include "ChoosePhotoSkin2.h"
  10. #include "Login2.h"
  11. #include "ShowCut.h"
  12. #include "CompareContent.h"
  13. #include "SelBrunDevice.h"
  14. #include "DelHC.h"
  15. using namespace helper_coffs;
  16. #ifdef _DEBUG
  17. #define new DEBUG_NEW
  18. #undef THIS_FILE
  19. static char THIS_FILE[] = __FILE__;
  20. #endif
  21. #pragma comment(lib, "Shlwapi.lib")
  22. /////////////////////////////////////////////////////////////////////////////
  23. IMPLEMENT_DYNCREATE(ChoosePhotoForm, MyFormView)
  24. ChoosePhotoForm::ChoosePhotoForm(): MyFormView(ChoosePhotoForm::IDD)
  25. {
  26. m_filter = _T("");
  27. }
  28. ChoosePhotoForm::~ChoosePhotoForm()
  29. {
  30. }
  31. void ChoosePhotoForm::DoDataExchange(CDataExchange* pDX)
  32. {
  33. MyFormView::DoDataExchange(pDX);
  34. DDX_Control(pDX, IDC_COMBO1, m_combo1);
  35. DDX_Control(pDX, IDC_LIST2, m_List1);
  36. DDX_Control(pDX, IDC_STATIC1, m_static1);
  37. DDX_CBString(pDX, IDC_COMBO1, m_filter);
  38. }
  39. BEGIN_MESSAGE_MAP(ChoosePhotoForm, MyFormView)
  40. ON_BN_CLICKED(IDC_BUTclose, OnBUTclose)
  41. ON_BN_CLICKED(IDC_BUTTON1, OnButton1)
  42. ON_CBN_SELCHANGE(IDC_COMBO1, OnSelchangeCombo1)
  43. ON_WM_TIMER()
  44. ON_BN_CLICKED(IDC_BUTshowphoto, OnBUTshowphoto)
  45. ON_BN_CLICKED(IDC_BUTmoney, OnBUTmoney)
  46. ON_BN_CLICKED(IDC_BUTexportphoto, OnBUTexportphoto)
  47. ON_BN_CLICKED(IDC_BUTTON2, OnButton2)
  48. ON_NOTIFY(NM_CLICK, IDC_LIST2, OnClickList2)
  49. ON_BN_CLICKED(IDC_BTNSEARCHFILTER, OnBtnsearchfilter)
  50. ON_BN_CLICKED(IDC_BUTexportphoto2, OnBUTexportphoto2)
  51. ON_BN_CLICKED(IDC_BUTexportphoto3, OnBUTexportphoto3)
  52. END_MESSAGE_MAP()
  53. /////////////////////////////////////////////////////////////////////////////
  54. #ifdef _DEBUG
  55. void ChoosePhotoForm::AssertValid() const
  56. {
  57. MyFormView::AssertValid();
  58. }
  59. void ChoosePhotoForm::Dump(CDumpContext& dc) const
  60. {
  61. MyFormView::Dump(dc);
  62. }
  63. #endif //_DEBUG
  64. void ChoosePhotoForm::OnInitialUpdate()
  65. {
  66. MyFormView::OnInitialUpdate();
  67. CMyMdi Mdi;
  68. Mdi.SetSubView((CWnd*)GetParent(), (CWnd*)this);
  69. CRect rc2;
  70. GetWindowRect(rc2);
  71. ::MoveWindow(m_hWnd, g_rc.left, g_rc.top, g_rc.Width(), g_rc.Height(), TRUE);
  72. EnumChildWindows(m_hWnd, (WNDENUMPROC)EnumChildProc, 0);
  73. int idarray[] = { IDC_BUTshowphoto, IDC_BUTexportphoto2, IDC_BUTexportphoto3, IDC_BUTexportphoto, IDC_BUTmoney, IDC_BUTclose };
  74. int idcount = 6;
  75. int btnwid;
  76. CRect prerc;
  77. for (int a = idcount - 2; a >= 0; a--)
  78. {
  79. GetDlgItem(idarray[a + 1])->GetWindowRect(prerc);
  80. ScreenToClient(prerc);
  81. GetDlgItem(idarray[a])->GetWindowRect(rc2);
  82. ScreenToClient(rc2);
  83. btnwid = rc2.Width();
  84. rc2.right = prerc.left;
  85. rc2.left = rc2.right - btnwid;
  86. GetDlgItem(idarray[a])->MoveWindow(rc2);
  87. }
  88. // Jeff.在初修状态后添加精修日期;
  89. m_static1.SetFont(&g_titlefont);
  90. #ifdef CHILD_VERSION // 15列;
  91. m_List1.SetHeadings("订单号,100;家长姓名,100;宝宝姓名,100;修片,100;修片日期,100;选片,100;选片日期,100;加挑金额,100;加挑张数,100;接单人,100;选片人,100;摄影师,100;初修师,100;套系名称,100;套系价格,100;手机,100;固定电话,100" );
  92. #else
  93. m_List1.SetHeadings("订单号,100;男宾姓名,100;女宾姓名,100;修片,100;修片日期,100;选片,100;选片日期,100;加挑金额,100;加挑张数,100;接单人,100;选片人,100;摄影师,100;初修师,100;套系名称,100;套系价格,100;男宾电话,100;女宾电话,100");
  94. #endif
  95. m_List1.LoadColumnInfo(116);
  96. if (g_bShowOK == 0)
  97. {
  98. #ifdef LKAY_VERSION
  99. CString filter="status3='未取' and (dindantype<>'意向客户' or dindantype is null)";
  100. #else
  101. CString filter = "status3='未取'";
  102. #endif
  103. g_sendhead.bsql = 0;
  104. g_sendhead.code[0] = 28;
  105. g_sendhead.tabcount = 1;
  106. g_pMainWnd->ProcessChatMessageRequest2(filter); if (g_bSendOK == 0)return;
  107. }
  108. else
  109. {
  110. g_sendhead.bsql = 0;
  111. g_sendhead.code[0] = 28;
  112. g_sendhead.tabcount = 1;
  113. #ifdef LKAY_VERSION
  114. CString filter="dindantype<>'意向客户' or dindantype is null";
  115. g_pMainWnd->ProcessChatMessageRequest2(filter);
  116. #else
  117. g_pMainWnd->ProcessChatMessageRequest2(1);
  118. #endif
  119. if (g_bSendOK == 0)return;
  120. }
  121. DataToArray(&m_List1array);
  122. HidePrice();
  123. m_combo1.AddString(g_user.name);
  124. for (int i = 0; i < g_userarray.GetSize(); i++)
  125. m_combo1.AddString(g_userarray.ElementAt(i).ElementAt(1));
  126. FillGrid();
  127. m_combo1.GetWindowRect(rc2);
  128. ScreenToClient(rc2);
  129. rc2.bottom += 200;
  130. m_combo1.MoveWindow(rc2);
  131. GetDlgItem(IDC_BUTclose)->GetWindowRect(rc2);
  132. SetComboHei(&m_combo1, rc2.Height());
  133. GetDlgItem(IDC_BUTshowphoto)->EnableWindow(IsHasRights2new(15));
  134. GetDlgItem(IDC_BUTexportphoto2)->EnableWindow(IsHasRights2new(15));
  135. GetDlgItem(IDC_BUTexportphoto3)->EnableWindow(IsHasRights2new(15));
  136. }
  137. void ChoosePhotoForm::FillGrid(BOOL bStatus)
  138. {
  139. if (g_bSearchFilter) // 条件查询;
  140. {
  141. m_List1.DeleteAllItems2();
  142. int ii = 0;
  143. m_List1.m_arLabels.SetSize(m_List1array.GetSize(), 1);
  144. int count = 0;
  145. {
  146. for (ii = 0; ii < m_List1.m_arLabels.GetSize(); ii++)
  147. {
  148. // 查询条件==选片日期;
  149. if (g_filterdate1 != "")
  150. {
  151. if (m_List1array.ElementAt(ii).ElementAt(6) < g_filterdate1 || m_List1array.ElementAt(ii).ElementAt(6) > g_filterdate2)
  152. continue;
  153. }
  154. // 查询条件==选片人;
  155. if (g_waiter1 != "")
  156. {
  157. if (m_List1array.ElementAt(ii).ElementAt(10) != g_waiter1)
  158. continue;
  159. }
  160. if(g_waiter2 != "")
  161. {
  162. if (m_List1array.ElementAt(ii).ElementAt(11) != g_waiter2)
  163. continue;
  164. }
  165. if(g_waiter3 != "")
  166. {
  167. if (m_List1array.ElementAt(ii).ElementAt(12) != g_waiter3)
  168. continue;
  169. }
  170. m_List1.m_arLabels.ElementAt(count++).Copy(m_List1array.ElementAt(ii));
  171. }
  172. }
  173. m_List1.m_arLabels.SetSize(count, 1);
  174. ii = count;
  175. m_List1.m_LabelCount = ii;
  176. m_List1.SetItemCountEx(ii);
  177. CString str;
  178. str.Format("单数:%d", ii);
  179. SetDlgItemText(IDC_STATIC2, str);
  180. }
  181. else
  182. {
  183. m_List1.DeleteAllItems2();
  184. int ii = 0;
  185. m_List1.m_arLabels.SetSize(m_List1array.GetSize(), 1);
  186. int count = 0;
  187. if (m_filter.IsEmpty())
  188. {
  189. if (bStatus) // 已修未选;
  190. {
  191. for (ii = 0; ii < m_List1.m_arLabels.GetSize(); ii++)
  192. {
  193. // 查询条件==修片OK && 未选片;
  194. if (m_List1array.ElementAt(ii).ElementAt(3) == "OK" && m_List1array.ElementAt(ii).ElementAt(5) != "OK")
  195. m_List1.m_arLabels.ElementAt(count++).Copy(m_List1array.ElementAt(ii));
  196. }
  197. }
  198. else
  199. {
  200. for (ii = 0; ii < m_List1.m_arLabels.GetSize(); ii++)
  201. {
  202. m_List1.m_arLabels.ElementAt(count++).Copy(m_List1array.ElementAt(ii));
  203. }
  204. }
  205. }
  206. else
  207. {
  208. if (bStatus) // 已修未选;
  209. {
  210. int type = GetType(m_filter);
  211. if (type == 1)//电话
  212. {
  213. for (ii = 0; ii < m_List1.m_arLabels.GetSize(); ii++)
  214. {
  215. // 查询条件==修片OK && 未选片 &&(手机1||手机2);
  216. if (m_List1array.ElementAt(ii).ElementAt(3) == "OK"
  217. && m_List1array.ElementAt(ii).ElementAt(5) != "OK"
  218. //&&(m_List1array.ElementAt (ii).ElementAt (12).Find (m_filter)!=-1 || m_List1array.ElementAt (ii).ElementAt (13).Find (m_filter)!=-1))
  219. && (m_List1array.ElementAt(ii).ElementAt(15).Find(m_filter) != -1 || m_List1array.ElementAt(ii).ElementAt(16).Find(m_filter) != -1))
  220. {
  221. m_List1.m_arLabels.ElementAt(count++).Copy(m_List1array.ElementAt(ii));
  222. }
  223. }
  224. }
  225. else if (type == 2)//拼音
  226. {
  227. m_filter.MakeUpper();
  228. for (ii = 0; ii < m_List1.m_arLabels.GetSize(); ii++)
  229. {
  230. // 查询条件==修片OK && 未选片 &&(拼音1||拼音2);
  231. if (m_List1array.ElementAt(ii).ElementAt(3) == "OK"
  232. &&m_List1array.ElementAt(ii).ElementAt(5) != "OK"
  233. //&&(m_List1array.ElementAt (ii).ElementAt (14).Find (m_filter)!=-1 || m_List1array.ElementAt (ii).ElementAt (15).Find (m_filter)!=-1))
  234. && (m_List1array.ElementAt(ii).ElementAt(15).Find(m_filter) != -1 || m_List1array.ElementAt(ii).ElementAt(16).Find(m_filter) != -1))
  235. {
  236. m_List1.m_arLabels.ElementAt(count++).Copy(m_List1array.ElementAt(ii));
  237. }
  238. }
  239. }
  240. else
  241. {
  242. for (ii = 0; ii < m_List1.m_arLabels.GetSize(); ii++)
  243. {
  244. // 查询条件==修片OK && 未选片 &&(……);
  245. if (m_List1array.ElementAt(ii).ElementAt(3) == "OK"
  246. &&m_List1array.ElementAt(ii).ElementAt(5) != "OK"
  247. && (
  248. m_List1array.ElementAt(ii).ElementAt(0).Find(m_filter) != -1 || // 订单号;
  249. m_List1array.ElementAt(ii).ElementAt(1).Find(m_filter) != -1 || // 男宾姓名;
  250. m_List1array.ElementAt(ii).ElementAt(2).Find(m_filter) != -1 || // 女宾姓名;
  251. m_List1array.ElementAt(ii).ElementAt(9).Find(m_filter) != -1 || // 接单人;
  252. m_List1array.ElementAt(ii).ElementAt(10).Find(m_filter) != -1 || // 选片人;
  253. m_List1array.ElementAt(ii).ElementAt(11).Find(m_filter) != -1 || // 摄影师;
  254. m_List1array.ElementAt(ii).ElementAt(12).Find(m_filter) != -1 || // 初修师;
  255. m_List1array.ElementAt(ii).ElementAt(13).Find(m_filter) != -1 || // 套系名称;
  256. m_List1array.ElementAt(ii).ElementAt(15).Find(m_filter) != -1 || // 手机1
  257. m_List1array.ElementAt(ii).ElementAt(16).Find(m_filter) != -1)) // 手机2
  258. {
  259. m_List1.m_arLabels.ElementAt(count++).Copy(m_List1array.ElementAt(ii));
  260. }
  261. }
  262. }
  263. }
  264. else
  265. {
  266. int type = GetType(m_filter);
  267. if (type == 1)//电话
  268. {
  269. for (ii = 0; ii < m_List1.m_arLabels.GetSize(); ii++)
  270. {
  271. // 查询条件==手机1 || 手机2;
  272. if (m_List1array.ElementAt(ii).ElementAt(15).Find(m_filter) != -1 ||
  273. m_List1array.ElementAt(ii).ElementAt(16).Find(m_filter) != -1)
  274. {
  275. m_List1.m_arLabels.ElementAt(count++).Copy(m_List1array.ElementAt(ii));
  276. }
  277. }
  278. }
  279. else if (type == 2)//拼音
  280. {
  281. m_filter.MakeUpper();
  282. for (ii = 0; ii < m_List1.m_arLabels.GetSize(); ii++)
  283. {
  284. // 查询条件==拼音1 || 拼音2;
  285. if (m_List1array.ElementAt(ii).ElementAt(17).Find(m_filter) != -1 ||
  286. m_List1array.ElementAt(ii).ElementAt(18).Find(m_filter) != -1)
  287. {
  288. m_List1.m_arLabels.ElementAt(count++).Copy(m_List1array.ElementAt(ii));
  289. }
  290. }
  291. }
  292. else
  293. {
  294. for (ii = 0; ii < m_List1.m_arLabels.GetSize(); ii++)
  295. {
  296. // 查询条件==修片OK && 未选片 &&(……);
  297. if (m_List1array.ElementAt(ii).ElementAt(0).Find(m_filter) != -1 || // 订单号;
  298. m_List1array.ElementAt(ii).ElementAt(1).Find(m_filter) != -1 || // 男宾姓名;
  299. m_List1array.ElementAt(ii).ElementAt(2).Find(m_filter) != -1 || // 女宾姓名;
  300. m_List1array.ElementAt(ii).ElementAt(9).Find(m_filter) != -1 || // 接单人;
  301. m_List1array.ElementAt(ii).ElementAt(10).Find(m_filter) != -1 || // 选片人;
  302. m_List1array.ElementAt(ii).ElementAt(11).Find(m_filter) != -1 || // 摄影师;
  303. m_List1array.ElementAt(ii).ElementAt(12).Find(m_filter) != -1 || // 初修师;
  304. m_List1array.ElementAt(ii).ElementAt(13).Find(m_filter) != -1 || // 套系名称;
  305. m_List1array.ElementAt(ii).ElementAt(15).Find(m_filter) != -1 || // 手机1
  306. m_List1array.ElementAt(ii).ElementAt(16).Find(m_filter) != -1) // 手机2
  307. {
  308. m_List1.m_arLabels.ElementAt(count++).Copy(m_List1array.ElementAt(ii));
  309. }
  310. }
  311. }
  312. }
  313. }
  314. m_List1.m_arLabels.SetSize(count, 1);
  315. ii = count;
  316. m_List1.m_LabelCount = ii;
  317. m_List1.SetItemCountEx(ii);
  318. CString str;
  319. str.Format("单数:%d", ii);
  320. SetDlgItemText(IDC_STATIC2, str);
  321. }
  322. if (!g_id.IsEmpty())
  323. {
  324. for (int i = 0; i < m_List1.GetItemCount(); i++)
  325. {
  326. if (g_id == m_List1.GetItemText(i, 0))
  327. {
  328. m_List1.SetItemState(i, LVIS_SELECTED | LVIS_FOCUSED, LVIS_SELECTED | LVIS_FOCUSED);
  329. m_List1.EnsureVisible(i, FALSE);
  330. break;
  331. }
  332. }
  333. }
  334. }
  335. void ChoosePhotoForm::OnBUTclose()
  336. {
  337. GetParent()->SendMessage(WM_CLOSE);
  338. }
  339. void ChoosePhotoForm::OnSelchangeCombo1()
  340. {
  341. SetTimer(1, 100, NULL);
  342. }
  343. void ChoosePhotoForm::OnTimer(UINT nIDEvent)
  344. {
  345. KillTimer(nIDEvent);
  346. OnButton1();
  347. }
  348. BOOL ChoosePhotoForm::PreTranslateMessage(MSG* pMsg)
  349. {
  350. try
  351. {
  352. if (pMsg->message == WM_KEYDOWN)
  353. {
  354. switch (pMsg->wParam)
  355. {
  356. case VK_RETURN:
  357. OnButton1();
  358. return 1;
  359. case 0x43: // copy
  360. if ((GetKeyState(VK_CONTROL) & 0x80))
  361. {
  362. GetFocus()->SendMessage(WM_COPY);
  363. return TRUE;
  364. }
  365. break;
  366. case 0x56: //Ctrl + V:
  367. if ((GetKeyState(VK_CONTROL) & 0x80))
  368. {
  369. GetFocus()->SendMessage(WM_PASTE);
  370. return TRUE;
  371. }
  372. break;
  373. case 0x58: // cut
  374. if ((GetKeyState(VK_CONTROL) & 0x80))
  375. {
  376. GetFocus()->SendMessage(WM_CUT);
  377. return TRUE;
  378. }
  379. break;
  380. case 0x5A: //undo
  381. case 0x59: //redo
  382. if ((GetKeyState(VK_CONTROL) & 0x80))
  383. {
  384. GetFocus()->SendMessage(WM_UNDO);
  385. return TRUE;
  386. }
  387. break;
  388. }
  389. }
  390. }
  391. catch (...)
  392. {
  393. }
  394. return MyFormView::PreTranslateMessage(pMsg);
  395. }
  396. // Jeff.门市流程 - 选片 - 开始选片
  397. void ChoosePhotoForm::OnBUTshowphoto() // Jeff.开始选片按钮;
  398. {
  399. if (IsHasRights2new(15) == 0) return;
  400. POSITION pos;
  401. pos = m_List1.GetFirstSelectedItemPosition();
  402. if (pos == NULL)
  403. {
  404. AfxMessageBox("请先选中您要选片的定单!", MB_ICONINFORMATION);
  405. return;
  406. }
  407. int iItem = m_List1.GetNextSelectedItem(pos);
  408. CString id = m_List1.GetItemText(iItem, 0);
  409. CString status = m_List1.GetItemText(iItem, 4); // 选片状态;
  410. ChoosePhotoSkin2 dlg;
  411. dlg.m_strStatusOfChoosePhoto = status;
  412. dlg.SetLiaPath("3.lia");
  413. dlg.m_strOrderNumber = id;
  414. dlg.m_path = g_path2 + "\\";
  415. dlg.m_path += dlg.m_strOrderNumber;
  416. dlg.m_path += "\\";
  417. // printf("Jeff:ChoosePhotoSkin2::m_id=%s\n ChoosePhotoSkin2::m_path=%s\n ChoosePhotoSkin2::m_mode\n\n",dlg.m_id,dlg.m_path,dlg.m_mode);// Jeff Printf;
  418. dlg.DoModal();
  419. g_bInSkin = 0;
  420. if (dlg.m_bSave)
  421. {
  422. #if JEFF_TEST_ON
  423. if (g_bShowOK == 0)
  424. {
  425. #ifdef LKAY_VERSION
  426. CString filter="status3='未取' and (dindantype<>'意向客户' or dindantype is null)";
  427. #else
  428. CString filter = "status3='未取'";
  429. #endif //#ifdef LKAY_VERSION
  430. g_sendhead.bsql = 0;
  431. g_sendhead.code[0] = 28;
  432. g_sendhead.tabcount = 1;
  433. g_pMainWnd->ProcessChatMessageRequest2(filter); if (g_bSendOK == 0)return;
  434. }
  435. else
  436. {
  437. g_sendhead.bsql = 0;
  438. g_sendhead.code[0] = 28;
  439. g_sendhead.tabcount = 1;
  440. #ifdef LKAY_VERSION
  441. CString filter = "dindantype<>'意向客户' or dindantype is null";
  442. g_pMainWnd->ProcessChatMessageRequest2(filter);
  443. #else
  444. g_pMainWnd->ProcessChatMessageRequest2(1);
  445. #endif //#ifdef LKAY_VERSION
  446. if (g_bSendOK == 0)return;
  447. }
  448. DataToArray(&m_List1array);
  449. HidePrice();
  450. m_combo1.AddString(g_user.name);
  451. for (int i = 0; i < g_userarray.GetSize(); i++)
  452. {
  453. m_combo1.AddString(g_userarray.ElementAt(i).ElementAt(1));
  454. }
  455. FillGrid();
  456. #else
  457. for (int i = 0; i < m_List1array.GetSize(); i++)
  458. {
  459. if (id == m_List1array.ElementAt(i).ElementAt(0))
  460. {
  461. m_List1array.ElementAt(i).SetAt(4+1, "OK");
  462. m_List1array.ElementAt(i).SetAt(5+1, dlg.m_time4);
  463. m_List1array.ElementAt(i).SetAt(6+1, dlg.m_money3);
  464. m_List1array.ElementAt(i).SetAt(7+1, dlg.m_choosezs);
  465. if (status != "OK") // Jeff.若选片状态已经OK,则不刷新选片人2014.08.30
  466. m_List1array.ElementAt(i).SetAt(9+1, dlg.m_waiter3);
  467. FillGrid();
  468. break;
  469. }
  470. }
  471. #endif //#if JEFF_TEST_ON
  472. }
  473. }
  474. void ChoosePhotoForm::OnBUTmoney() // 查看裁剪 按钮;
  475. {
  476. POSITION pos;
  477. pos = m_List1.GetFirstSelectedItemPosition();
  478. if (pos == NULL)
  479. {
  480. AfxMessageBox("请先选中您要查看的客人!", MB_ICONINFORMATION);
  481. return;
  482. }
  483. int iItem = m_List1.GetNextSelectedItem(pos);
  484. CString id = m_List1.GetItemText(iItem, 0);
  485. ShowCut dlg;
  486. dlg.m_mode = 2;
  487. dlg.m_strOrderNum = id;
  488. dlg.DoModal();
  489. }
  490. void ChoosePhotoForm::OnBUTexportphoto() // 选片更改 按钮;
  491. {
  492. UpdateData();
  493. POSITION pos;
  494. pos = m_List1.GetFirstSelectedItemPosition();
  495. if (pos == NULL)
  496. {
  497. AfxMessageBox("请先选中您要对比的定单!", MB_ICONINFORMATION);
  498. return;
  499. }
  500. int iItem = m_List1.GetNextSelectedItem(pos);
  501. if (m_List1.GetItemText(iItem, 5) != "OK")return;
  502. CCompareContent dlg;
  503. dlg.m_id = m_List1.GetItemText(iItem, 0);
  504. dlg.DoModal();
  505. }
  506. void ChoosePhotoForm::GetNo(CString str, CStringArray &array)
  507. {
  508. if (!str.IsEmpty())
  509. {
  510. #ifdef USE_SEP_VEB
  511. int pos = str.Find(SEPS_VEB);
  512. #else
  513. int pos = str.Find(",");
  514. #endif
  515. while (pos != -1)
  516. {
  517. array.Add(str.Left(pos));
  518. str = str.Right(str.GetLength() - pos - 1);
  519. #ifdef USE_SEP_VEB
  520. pos = str.Find(SEPS_VEB);
  521. #else
  522. pos = str.Find(",");
  523. #endif
  524. }
  525. array.Add(str);
  526. }
  527. }
  528. int CALLBACK BrowseProc(HWND hwnd, UINT msg, LPARAM lParam, LPARAM lpData)
  529. {
  530. switch (msg)
  531. {
  532. case BFFM_INITIALIZED:
  533. SendMessage(hwnd, BFFM_SETSELECTION, TRUE, NULL);
  534. break;
  535. case BFFM_SELCHANGED:
  536. {
  537. char szFileName[MAX_PATH];
  538. LPITEMIDLIST pidlCurrent = (LPITEMIDLIST)lParam;
  539. SHGetPathFromIDList(pidlCurrent, szFileName);
  540. SendMessage(hwnd, BFFM_SETSTATUSTEXT, 0, (LPARAM)szFileName);
  541. }
  542. break;
  543. }
  544. return 0;
  545. }
  546. void GetSavePath(CString &path)
  547. {
  548. char lpszDisplayName[MAX_PATH], szFileName[MAX_PATH];
  549. LPITEMIDLIST pidlDesktop, pidlCurrent;
  550. if (SHGetSpecialFolderLocation(NULL, CSIDL_DESKTOP, &pidlDesktop) == NOERROR)
  551. {
  552. BROWSEINFO bi;
  553. bi.hwndOwner = g_pMainWnd->m_hWnd;
  554. bi.pidlRoot = pidlDesktop;
  555. bi.pszDisplayName = lpszDisplayName;
  556. bi.lpszTitle = "\n文档保存的目录:";
  557. bi.ulFlags = BIF_STATUSTEXT&BIF_RETURNONLYFSDIRS;
  558. bi.lpfn = BrowseProc;
  559. bi.lParam = 0;
  560. bi.iImage = 0;
  561. pidlCurrent = SHBrowseForFolder(&bi);
  562. SHGetPathFromIDList(pidlCurrent, szFileName);
  563. path = szFileName;
  564. }
  565. }
  566. int ChoosePhotoForm::FindArray(CStringArray *pArray, CString *pStr)
  567. {
  568. for (int i = 0; i < pArray->GetSize(); i++)
  569. {
  570. if (pArray->ElementAt(i) == *pStr)
  571. return i;
  572. }
  573. return -1;
  574. }
  575. void ChoosePhotoForm::OnButton1() // 查询 按钮;
  576. {
  577. UpdateData();
  578. m_filter.TrimLeft();
  579. m_filter.TrimRight();
  580. FillGrid();
  581. }
  582. void ChoosePhotoForm::OnButton2() // 已修未选 按钮;
  583. {
  584. UpdateData();
  585. m_filter.TrimLeft();
  586. m_filter.TrimRight();
  587. FillGrid(1);
  588. }
  589. void ChoosePhotoForm::OnClickList2(NMHDR* pNMHDR, LRESULT* pResult)
  590. {
  591. POSITION pos;
  592. pos = m_List1.GetFirstSelectedItemPosition();
  593. if (pos == NULL)return;
  594. int iItem = m_List1.GetNextSelectedItem(pos);
  595. g_id = m_List1.GetItemText(iItem, 0);
  596. *pResult = 0;
  597. }
  598. void ChoosePhotoForm::HidePrice()
  599. {
  600. #ifdef LKAY_VERSION
  601. if(IsHasRights2new(31))return;
  602. for(int i=0; i< m_List1array.GetSize (); i++)
  603. {
  604. m_List1array.ElementAt (i).SetAt (10, "***");
  605. m_List1array.ElementAt (i).SetAt (11, "***");
  606. m_List1array.ElementAt (i).SetAt (12, "***");
  607. m_List1array.ElementAt (i).SetAt (13, "***");
  608. m_List1array.ElementAt (i).SetAt (14, "***");
  609. m_List1array.ElementAt (i).SetAt (15, "***");
  610. m_List1array.ElementAt (i).SetAt (6, "***");
  611. }
  612. #else
  613. if (IsHasRights2new(31))return;
  614. for (int i = 0; i < m_List1array.GetSize(); i++)
  615. {
  616. m_List1array.ElementAt(i).SetAt(15, "***");
  617. m_List1array.ElementAt(i).SetAt(16, "***");
  618. }
  619. #endif
  620. }
  621. void ChoosePhotoForm::OnBtnsearchfilter() // 条件查询 按钮;
  622. {
  623. SearchFilter dlg;
  624. dlg.m_mode = 4;
  625. if (dlg.DoModal() == IDOK)
  626. FillGrid();
  627. g_bSearchFilter = 0;
  628. }
  629. BOOL ChoosePhotoForm::IsPhoto2Exist(CString m_id)
  630. {
  631. CString path2;
  632. CString path = g_path2 + "\\";
  633. path += m_id;
  634. path += "\\";
  635. using namespace helper_coffs;
  636. ffsco o;
  637. o.dirs(0);
  638. o.find(LPCSTR(path), LPCSTR("*.jpg"));
  639. ffsco::typeT coo;
  640. coo = o.co_file();
  641. return coo.size();
  642. }
  643. void ChoosePhotoForm::OnBUTexportphoto2() // 按钮 缓存本机;
  644. {
  645. POSITION pos;
  646. pos = m_List1.GetFirstSelectedItemPosition();
  647. if (pos == NULL)
  648. {
  649. AfxMessageBox("请先选中您要缓存的定单!", MB_ICONINFORMATION);
  650. return;
  651. }
  652. ClearHC();
  653. int iItem = m_List1.GetNextSelectedItem(pos);
  654. CString m_id = m_List1.GetItemText(iItem, 0);
  655. //////////////////////
  656. CStringArray m_patharray1;
  657. int m_nChoosePhotoType = 0; // 0 = 初修片; 1 = 原片;
  658. if (m_patharray1.GetSize() == 0)
  659. {
  660. #if USE_SHARE_FLORD
  661. CStringArray photoArray;
  662. SelBrunDevice selbrundevicedlg;
  663. selbrundevicedlg.m_mode = 1;
  664. if (selbrundevicedlg.DoModal() == IDOK)
  665. m_nChoosePhotoType = selbrundevicedlg.m_sel;
  666. else
  667. m_nChoosePhotoType = 0;
  668. BOOL bGrowthTx = FALSE;
  669. CString strTxName = _T("");
  670. GetTXName(&m_id, 1, bGrowthTx, strTxName);
  671. GetPhotosDir(m_id, m_nChoosePhotoType, bGrowthTx, strTxName, photoArray);
  672. GetPhotoFiles(&photoArray, m_patharray1);
  673. /*
  674. SelBrunDevice selbrundevicedlg;
  675. selbrundevicedlg.m_mode = 1;
  676. if (selbrundevicedlg.DoModal() == IDOK)
  677. m_nChoosePhotoType = selbrundevicedlg.m_sel;
  678. else
  679. m_nChoosePhotoType = 0;
  680. BOOL bGrowthTx = FALSE;
  681. CString strTxName = _T("");
  682. GetTXName(&m_id, 1, bGrowthTx, strTxName);
  683. CStringArray photoArray;
  684. if(m_nChoosePhotoType == 0)
  685. {// 初修片;
  686. for(int i = 0; i < 2; i++)
  687. {
  688. CStringArray patharr;
  689. GetPhotosDir(m_id, i, bGrowthTx, strTxName, photoArray);
  690. GetPhotoFiles(&photoArray, patharr);
  691. if(m_patharray1.GetSize() == 0)
  692. m_patharray1.Append(patharr);
  693. else
  694. {
  695. // 对比是否有同名的相片;
  696. for(int j=0; j<m_patharray1.GetSize(); j++)
  697. {
  698. for(int k=0; k<patharr.GetSize(); k++)
  699. {
  700. CString str1 = m_patharray1.ElementAt(j);
  701. str1 = str1.Right(str1.GetLength() - str1.ReverseFind('\\') - 1);
  702. CString str2 = patharr.ElementAt(k);
  703. str2 = str2.Right(str2.GetLength() - str2.ReverseFind('\\') - 1);
  704. if(str1 == str2)
  705. patharr.RemoveAt(k);
  706. }
  707. }
  708. if(patharr.GetSize() > 0)
  709. m_patharray1.Append(patharr);
  710. }
  711. }
  712. }
  713. else
  714. {// 原片;
  715. GetPhotosDir(m_id, m_nChoosePhotoType, bGrowthTx, strTxName, photoArray);
  716. GetPhotoFiles(&photoArray, m_patharray1);
  717. }*/
  718. #else
  719. CString m_path, m_seltxname;
  720. m_path = g_path2 + "\\";
  721. m_path += m_id;
  722. m_path += "\\";
  723. if (IsPhoto2Exist(m_id))
  724. {
  725. SelBrunDevice dlg;
  726. dlg.m_mode = 1;
  727. if (dlg.DoModal() == IDOK)
  728. m_nChoosePhotoType = dlg.m_sel;
  729. else
  730. m_nChoosePhotoType = 0;
  731. //m_nChoosePhotoType=0 原片+修片 1:修片 2:原片
  732. }
  733. else
  734. AfxMessageBox("温馨提示:\r\n未找到初修片,将使用原片选片", MB_ICONINFORMATION);
  735. {
  736. CString path, path2;
  737. m_path = g_path1 + "\\";
  738. m_path += m_id;
  739. m_path += "\\";
  740. if (m_seltxname != "" && m_seltxname != "全部")
  741. {
  742. m_path += m_seltxname; m_path += "\\";
  743. }
  744. if (m_nChoosePhotoType == 1)
  745. {
  746. m_path = g_path2 + "\\";
  747. m_path += m_id;
  748. m_path += "\\";
  749. }
  750. CString filename;
  751. ffsco o;
  752. o.dirs(1);
  753. o.find(LPCSTR(m_path), LPCSTR("*.*"));
  754. ffsco::typeT coo;
  755. ffsco::typeT::iterator it;
  756. coo = o.co_file();
  757. for (it = coo.begin(); coo.end() != it; it++)
  758. {
  759. path = (*it).c_str();
  760. if (path.GetAt(path.ReverseFind('\\') + 1) != 's' && path.GetAt(path.ReverseFind('\\') + 1) != 'm')
  761. {
  762. path.MakeLower();
  763. filename = path.Right(path.GetLength() - path.ReverseFind('\\') - 1);
  764. if (filename.Find(".") != -1)
  765. filename = filename.Left(filename.Find("."));
  766. if (!myisdigit(filename))continue;
  767. if (m_nChoosePhotoType == 1)
  768. {
  769. m_patharray1.Add(path);
  770. }
  771. else
  772. {
  773. path2 = path;
  774. if (m_nChoosePhotoType == 0)
  775. path2.Replace("客户原片", "修好的片");
  776. if (1)
  777. {
  778. int pos = path2.Find(m_id);
  779. pos += m_id.GetLength();
  780. int pos2 = path2.ReverseFind('\\');
  781. path2 = path2.Left(pos) + path2.Right(path2.GetLength() - pos2);
  782. }
  783. if (m_nChoosePhotoType == 0 && ::PathFileExists(path2))
  784. {
  785. m_patharray1.Add(path2);
  786. }
  787. else
  788. {
  789. path2.Replace(".raw", ".jpg");
  790. if (::PathFileExists(path2))
  791. {
  792. m_patharray1.Add(path2); continue;
  793. }
  794. path2.Replace(".nef", ".jpg");
  795. if (::PathFileExists(path2))
  796. {
  797. m_patharray1.Add(path2); continue;
  798. }
  799. path2.Replace(".cr2", ".jpg");
  800. if (::PathFileExists(path2))
  801. {
  802. m_patharray1.Add(path2); continue;
  803. }
  804. else
  805. {
  806. if (path.Right(3) != "jpg")continue;
  807. m_patharray1.Add(path);
  808. }
  809. }
  810. }
  811. }
  812. }
  813. }
  814. // if(0)
  815. {//多种修好的效果
  816. CString path, path2;
  817. path2 = g_path2 + "\\";
  818. path2 += m_id;
  819. path2 += "\\";
  820. using namespace helper_coffs;
  821. ffsco o;
  822. o.dirs(0);
  823. o.find(LPCSTR(path2), LPCSTR("*.jpg"));
  824. ffsco::typeT coo;
  825. ffsco::typeT::iterator it;
  826. coo = o.co_file();
  827. for (it = coo.begin();coo.end() != it;it++)
  828. {
  829. path = (*it).c_str();
  830. if (path.GetAt(path.ReverseFind('\\') + 1) != 's' && path.GetAt(path.ReverseFind('\\') + 1) != 'm')
  831. {
  832. path.MakeLower();
  833. path2 = path.Right(path.GetLength() - path.ReverseFind('\\') - 1);
  834. if (path2.Find("-") != -1)
  835. {
  836. m_patharray1.Add(path);
  837. }
  838. }
  839. }
  840. }
  841. #endif //#if USE_SHARE_FLORD
  842. /////////////////////////
  843. char path[MAX_PATH];
  844. ::GetSystemDirectory(path, MAX_PATH);
  845. CString sysdir = path;
  846. sysdir += "\\lyfz";
  847. ::CreateDirectory(sysdir, NULL);
  848. sysdir += "\\";
  849. sysdir += m_id; ::CreateDirectory(sysdir, NULL);
  850. sysdir += "\\";
  851. //----------------------------------------------------------------------------------------------
  852. // 缓存到本机的相片;
  853. //----------------------------------------------------------------------------------------------
  854. ImportPhoto dlg;
  855. dlg.m_bCopyToLocal = 1;
  856. dlg.m_mode = 1;
  857. dlg.m_pArray = &m_patharray1;
  858. dlg.m_savepath = sysdir;
  859. dlg.DoModal();
  860. AfxMessageBox("缓存成功!");
  861. }
  862. }
  863. CString GetCreateTime(CString path)
  864. {
  865. CFileFind finder;
  866. path.TrimRight("\\");
  867. BOOL bWorking = finder.FindFile(path);
  868. if (bWorking)
  869. {
  870. finder.FindNextFile();
  871. CTime tm;
  872. finder.GetCreationTime(tm);
  873. CTimeSpan dt = CTime::GetCurrentTime() - tm;
  874. int m_dtdays = AfxGetApp()->GetProfileInt(LYFZVERSION, "dtdays2", 5);
  875. if (dt.GetDays() >= m_dtdays)
  876. {
  877. ::DeleteDirectory(path); // 递归删除过期缓存;
  878. }
  879. }
  880. return "";
  881. }
  882. void ChoosePhotoForm::ClearHC()
  883. {
  884. char path[MAX_PATH];
  885. ::GetSystemDirectory(path, MAX_PATH);
  886. CString sysdir = path;
  887. sysdir += "\\lyfz";
  888. ::CreateDirectory(sysdir, NULL);
  889. sysdir += "\\";
  890. CString str;
  891. using namespace helper_coffs;
  892. ffsco o;
  893. o.dirs(0);
  894. o.find(LPCSTR(sysdir), LPCSTR("*.*"));
  895. ffsco::typeT coo;
  896. ffsco::typeT::iterator it;
  897. coo = o.co_dir();
  898. for (it = coo.begin(); coo.end() != it; it++)
  899. {
  900. str = (*it).c_str();
  901. if (str == sysdir)continue;
  902. GetCreateTime(str);
  903. }
  904. }
  905. void ChoosePhotoForm::OnBUTexportphoto3() // 管理缓存按钮;
  906. {
  907. DelHC dlg;
  908. dlg.DoModal();
  909. }
  910. /************************************************************************/
  911. /*
  912. 函数: GetTXName
  913. 描述: 获取套系名称
  914. 参数:
  915. const CString* pStrOrder, //订单号
  916. const int nModle, //
  917. BOOL& bGrowthTx, //返回是否成长套系0否,1是
  918. CString& strTxName //返回套系名
  919. 返回:
  920. */
  921. /************************************************************************/
  922. void ChoosePhotoForm::GetTXName(const CString* pStrOrder, const int nModle, BOOL& bGrowthTx, CString& strTxName)
  923. {
  924. if(pStrOrder == NULL || (*pStrOrder) == _T(""))
  925. return;
  926. IsGrowthTx growthtxdlg;
  927. growthtxdlg.m_mode = nModle;
  928. growthtxdlg.m_strOrderNumber = (*pStrOrder);
  929. growthtxdlg.DoModal();
  930. bGrowthTx = growthtxdlg.m_bGrowthTx;
  931. strTxName = growthtxdlg.m_seltxname;
  932. }
  933. /************************************************************************/
  934. /* 函数:GetPhotosDir[3/27/2016 IT];
  935. /* 描述:获取相片目录;
  936. /* 参数:;
  937. /* [IN] strID: 订单号;
  938. /* [IN] nMode: =1:修片; =2:原片;
  939. /* [IN] bGrowthTx: 是否成长套系;
  940. /* [IN] strTxName: 套系名;
  941. /* [OUT] photoDirArr: 返回路径集合;
  942. /* 返回:void;
  943. /* 注意:;
  944. /* 示例:;
  945. /*
  946. /* 修改:;
  947. /* 日期:;
  948. /* 内容:;
  949. /************************************************************************/
  950. void ChoosePhotoForm::GetPhotosDir(const CString& strID, const int nMode, const BOOL bGrowthTx, const CString& strTxName, CStringArray& photoDirArr)
  951. {
  952. TCHAR szShare[MAX_PATH] = {0};
  953. TCHAR szOrdePath[MAX_PATH] = {0};
  954. int i=0;
  955. int nSize = 0;
  956. switch(nMode)
  957. {
  958. case 0: // 初修;
  959. {
  960. sprintf(szShare, _T("\\\\%s\\%s"), g_serverbak, _T("修好的片(管理软件)$"));
  961. // 若是成长套系,初修片有子目录; 若是婚纱版,初修没了景点了目录;
  962. if ( bGrowthTx && ( !strTxName.IsEmpty() && strTxName != _T("全部")) )
  963. sprintf(szOrdePath, _T("%s\\%s\\%s"), szShare, strID, strTxName);
  964. else
  965. sprintf(szOrdePath, _T("%s\\%s"), szShare, strID);
  966. if ( PathFileExists(szOrdePath) )
  967. photoDirArr.Add(CString(szOrdePath));
  968. nSize = g_aryOfSharePathInfo.GetSize();
  969. for (i = 0; i < nSize; i++)
  970. {
  971. if ( 2 == atoi(g_aryOfSharePathInfo.ElementAt(i).ElementAt(5)) )
  972. {
  973. if ( g_aryOfSharePathInfo.ElementAt(i).ElementAt(1).Compare(g_branchname.IsEmpty() ? g_domain : g_branchname) != 0 )
  974. {
  975. continue;
  976. }
  977. // 逐一加载其他共享目录;
  978. // 如果是成长套系且套系名不为空或全部;
  979. sprintf(szShare,_T("%s"),g_aryOfSharePathInfo.ElementAt(i).ElementAt(2));
  980. // 若是成长套系,初修片有子目录; 若是婚纱版,初修没了景点了目录;
  981. if ( bGrowthTx && ( !strTxName.IsEmpty() && strTxName != _T("全部")) )
  982. sprintf(szOrdePath, _T("%s\\%s\\%s"), szShare, strID, strTxName);
  983. else
  984. sprintf(szOrdePath, _T("%s\\%s"), szShare, strID);
  985. if ( PathFileExists(szOrdePath) )
  986. photoDirArr.Add(CString(szOrdePath));
  987. }
  988. }
  989. }
  990. break;
  991. case 1: // 原片;
  992. {
  993. sprintf(szShare, _T("\\\\%s\\%s"), g_serverbak, _T("客户原片(管理软件)$"));
  994. sprintf(szOrdePath, _T("%s\\%s"), szShare, strID);
  995. if ( PathFileExists(szOrdePath) )
  996. photoDirArr.Add(CString(szOrdePath));
  997. nSize = g_aryOfSharePathInfo.GetSize();
  998. for (i = 0; i < nSize; i++)
  999. {
  1000. if ( 1 == atoi(g_aryOfSharePathInfo.ElementAt(i).ElementAt(5)) )
  1001. {
  1002. if ( g_aryOfSharePathInfo.ElementAt(i).ElementAt(1).Compare(g_branchname.IsEmpty() ? g_domain : g_branchname) != 0 )
  1003. {
  1004. continue;
  1005. }
  1006. // 逐一加载其他共享目录;
  1007. sprintf(szShare,"%s",g_aryOfSharePathInfo.ElementAt(i).ElementAt(2));
  1008. sprintf(szOrdePath,"%s\\%s",szShare, strID);
  1009. if ( PathFileExists(szOrdePath) )
  1010. photoDirArr.Add(CString(szOrdePath));
  1011. }
  1012. }
  1013. }
  1014. break;
  1015. }
  1016. }
  1017. /************************************************************************/
  1018. /*
  1019. 函数: GetPhotoFiles
  1020. 描述: 获取指定目录下的相片
  1021. 参数:
  1022. CStringArray* photoDirArr, 相片目录
  1023. CStringArray& filesArr 返回相片集
  1024. 返回:
  1025. */
  1026. /************************************************************************/
  1027. void ChoosePhotoForm::GetPhotoFiles(CStringArray* photoDirArr, CStringArray& filesArr)
  1028. {
  1029. if(photoDirArr == NULL)
  1030. return;
  1031. CString path = _T("");
  1032. CString filename = _T("");
  1033. for(int i=0; i<photoDirArr->GetSize(); i++)
  1034. {
  1035. ffsco o;
  1036. o.dirs(1);
  1037. o.find(LPCSTR(photoDirArr->ElementAt(i)), LPCSTR("*.*"));
  1038. ffsco::typeT coo;
  1039. ffsco::typeT::iterator it;
  1040. coo = o.co_file();
  1041. for (it = coo.begin(); coo.end() != it; it++)
  1042. {
  1043. path = (*it).c_str();
  1044. if (path.GetAt(path.ReverseFind('\\') + 1) != 's' && path.GetAt(path.ReverseFind('\\') + 1) != 'm')
  1045. {
  1046. path.MakeLower();
  1047. filename = path.Right(path.GetLength() - path.ReverseFind('\\') - 1);
  1048. if (filename.Find(".") != -1)
  1049. filename = filename.Left(filename.Find("."));
  1050. if (!g_bOriginal && !myisdigit(filename))
  1051. continue;
  1052. filesArr.Add(path);
  1053. }
  1054. }
  1055. }
  1056. }