ChoosePhotoSkin.cpp 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567
  1. // ChoosePhotoSkin.cpp: implementation of the ChoosePhotoSkin class.
  2. //
  3. //////////////////////////////////////////////////////////////////////
  4. #include "stdafx.h"
  5. #include "YLGL.h"
  6. #include "ChoosePhotoSkin.h"
  7. #include "SearchClient.h"
  8. #ifdef _DEBUG
  9. #undef THIS_FILE
  10. static char THIS_FILE[] = __FILE__;
  11. #define new DEBUG_NEW
  12. #endif
  13. //////////////////////////////////////////////////////////////////////
  14. // Construction/Destruction
  15. //////////////////////////////////////////////////////////////////////
  16. ChoosePhotoSkin::ChoosePhotoSkin()
  17. {
  18. m_mode = 0;
  19. m_exitcode = 0;
  20. m_bsave = 0;
  21. g_pMainWnd->GetSkin();
  22. }
  23. ChoosePhotoSkin::~ChoosePhotoSkin()
  24. {
  25. }
  26. void ChoosePhotoSkin::OnFSCommand(LPCTSTR command, LPCTSTR args)
  27. {
  28. }
  29. void ChoosePhotoSkin::Init()
  30. {
  31. g_bInSkin = 1;
  32. if (1)//g_bRedSkin)
  33. {
  34. Graphics graph(m_pBk);
  35. Image *img = NULL;
  36. if (m_mode == 0)
  37. ::LoadImageFromBuf(&img, g_mainpath + "\\图片\\选片.jpg");
  38. else
  39. ::LoadImageFromBuf(&img, g_mainpath + "\\图片\\看设计.jpg");
  40. graph.SetSmoothingMode(SmoothingModeHighQuality);
  41. graph.DrawImage(img, 0, 0);
  42. delete img;
  43. ((MyBmpButton2*)m_picarray.ElementAt(5))->EnableWindow(0);
  44. ((MyBmpButton2*)m_picarray.ElementAt(6))->EnableWindow(0);
  45. ((MyBmpButton2*)m_picarray.ElementAt(7))->EnableWindow(0);
  46. }
  47. else
  48. {
  49. Graphics graph(m_pBk);
  50. Image *img = NULL;
  51. if (m_mode == 0)
  52. ::LoadImageFromBuf(&img, g_mainpath + "\\skin\\标题-选片.jpg");
  53. else
  54. ::LoadImageFromBuf(&img, g_mainpath + "\\skin\\标题-看设计.jpg");
  55. graph.SetSmoothingMode(SmoothingModeHighQuality);
  56. graph.DrawImage(img, 0, 0);
  57. delete img; ((MyBmpButton2*)m_picarray.ElementAt(5))->ShowWindow(SW_HIDE);
  58. }
  59. m_combobox.Create(WS_VSCROLL | WS_CHILD | CBS_DROPDOWN, m_rcarray.ElementAt(2), this, 100);
  60. m_combobox.ShowWindow(SW_SHOW);
  61. CRect rc = m_rcarray.ElementAt(2);
  62. rc.bottom += 200;
  63. m_combobox.MoveWindow(rc);
  64. m_combobox.GetWindowRect(rc);
  65. int hei = rc.Height();
  66. rc = m_rcarray.ElementAt(3);
  67. rc.bottom = rc.top + hei + 5;
  68. m_edit.Create(ES_AUTOHSCROLL | WS_CHILD | ES_LEFT | WS_BORDER | ES_PASSWORD | WS_EX_WINDOWEDGE, rc, this, 200);
  69. m_edit.ShowWindow(SW_SHOW);
  70. rc = m_rcarray.ElementAt(4);
  71. rc.bottom = rc.top + 13;
  72. rc.right = rc.left + 13;
  73. m_button.Create("", WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | BS_FLAT, rc, this, 300);
  74. tpFont.CreatePointFont(180, _T("黑体"));
  75. m_edit.SetFont(&tpFont);
  76. m_combobox.SetFont(&tpFont);
  77. /////////////////////////
  78. #if JEFF_TEST_ON
  79. g_sendhead.bsql = 0;
  80. g_sendhead.code[0] = 24;
  81. g_sendhead.code[1] = 29;
  82. g_sendhead.code[2] = 5;
  83. g_sendhead.code[3] = 1;
  84. if (g_branchname == "")
  85. {
  86. g_sendhead.code[4] = 152;
  87. g_sendhead.tabcount = 5;
  88. }
  89. else
  90. g_sendhead.tabcount = 4;
  91. int g_nYearposTemp = g_nYearpos;
  92. g_nYearpos = -1;
  93. g_pMainWnd->ProcessChatMessageRequest2(";;;;;");
  94. g_nYearpos = g_nYearposTemp;
  95. if (g_bSendOK == 0)
  96. {
  97. CDialog::OnCancel();
  98. return;
  99. }
  100. CArray<CStringArray, CStringArray>patharray;
  101. CArray<CStringArray, CStringArray>userarray;
  102. if (g_branchname == "")
  103. DataToArray( &g_cominfoarray, &patharray, &userarray, &g_hisyeararray, &g_brancharray);
  104. else
  105. DataToArray( &g_cominfoarray, &patharray, &userarray, &g_hisyeararray);
  106. #else
  107. g_sendhead.bsql = 0;
  108. g_sendhead.code[0] = 23;
  109. g_sendhead.code[1] = 24;
  110. g_sendhead.code[2] = 29;
  111. g_sendhead.code[3] = 5;
  112. g_sendhead.code[4] = 1;
  113. if (g_branchname == "")
  114. {
  115. g_sendhead.code[5] = 152;
  116. g_sendhead.tabcount = 6;
  117. }
  118. else
  119. g_sendhead.tabcount = 5;
  120. int g_nYearposTemp = g_nYearpos;
  121. g_nYearpos = -1;
  122. g_pMainWnd->ProcessChatMessageRequest2("[dimission]<>'离职' or [dimission] is null;;;;;;");
  123. g_nYearpos = g_nYearposTemp;
  124. if (g_bSendOK == 0)
  125. {
  126. CDialog::OnCancel();
  127. return;
  128. }
  129. CArray<CStringArray, CStringArray>patharray;
  130. CArray<CStringArray, CStringArray>userarray;
  131. if (g_branchname == "")
  132. DataToArray(&m_List1array, &g_cominfoarray, &patharray, &userarray, &g_hisyeararray, &g_brancharray);
  133. else
  134. DataToArray(&m_List1array, &g_cominfoarray, &patharray, &userarray, &g_hisyeararray);
  135. #endif
  136. if (g_branchname == "")
  137. {
  138. g_cominfoarraylocal.SetSize(1, 1);
  139. g_cominfoarraylocal.ElementAt(0).Copy(g_cominfoarray.ElementAt(0));
  140. }
  141. if (g_branchname == "")
  142. {
  143. g_domain = patharray.ElementAt(0).ElementAt(0);
  144. if (g_domain.Find(".ly.com") == -1)g_domain.Empty();
  145. g_bSaveUploadTask1 = atoi(g_cominfoarray.ElementAt(0).ElementAt(67));
  146. g_bSaveUploadTask2 = atoi(g_cominfoarray.ElementAt(0).ElementAt(68));
  147. g_bSaveUploadTask3 = atoi(g_cominfoarray.ElementAt(0).ElementAt(69));
  148. g_bSaveUploadTask4 = atoi(g_cominfoarray.ElementAt(0).ElementAt(70));
  149. }
  150. CString version = _T("Version 1.0");
  151. BOOL bHide = atoi(g_cominfoarray.ElementAt(0).ElementAt(58));
  152. AfxGetApp()->WriteProfileInt(version, "hidewindow2", bHide);
  153. g_userarray.SetSize(userarray.GetSize(), 1);
  154. int count = 0;
  155. for (int ii = 0; ii < userarray.GetSize(); ii++)
  156. {
  157. if (userarray.ElementAt(ii).ElementAt(10) == "在职")
  158. g_userarray.ElementAt(count++).Copy(userarray.ElementAt(ii));
  159. }
  160. g_userarray.SetSize(count, 1);
  161. // 设置版本号;
  162. CString strVersion;
  163. strVersion.Format("%02d%02d", g_arrFileVersion[2], g_arrFileVersion[3]);
  164. if (g_cominfoarray.ElementAt(0).ElementAt(0) != strVersion)
  165. {
  166. AfxMessageBox("您必须更新软件才能继续使用, 请与系统管理员联系!", MB_ICONINFORMATION);
  167. CDialog::OnCancel();
  168. g_pMainWnd->AutoUpdate();
  169. return;
  170. }
  171. #ifndef ENTERPRISE_VERSION
  172. {
  173. #ifndef CHILD_VERSION
  174. #ifdef BASIC_VERSION
  175. if(g_cominfoarray.ElementAt(0).ElementAt( 46)!="0")
  176. {
  177. AfxMessageBox("软件客户端与服务器版本不匹配, 请与系统管理员联系!", MB_ICONSTOP);
  178. exit(0);return;
  179. }
  180. #else
  181. if(g_cominfoarray.ElementAt(0).ElementAt(46)!="1")
  182. {
  183. AfxMessageBox("软件客户端与服务器版本不匹配, 请与系统管理员联系!", MB_ICONSTOP);
  184. exit(0);return;
  185. }
  186. #endif
  187. #else
  188. #ifdef BASIC_VERSION
  189. if(g_cominfoarray.ElementAt(0).ElementAt( 46)!="2")
  190. {
  191. AfxMessageBox("软件客户端与服务器版本不匹配, 请与系统管理员联系!", MB_ICONSTOP);
  192. exit(0);return;
  193. }
  194. #else
  195. if(g_cominfoarray.ElementAt(0).ElementAt(46)!="3")
  196. {
  197. AfxMessageBox("软件客户端与服务器版本不匹配, 请与系统管理员联系!", MB_ICONSTOP);
  198. exit(0);return;
  199. }
  200. #endif
  201. #endif
  202. }
  203. #else
  204. {
  205. #ifndef CHILD_VERSION
  206. #ifdef BASIC_VERSION
  207. if(g_cominfoarray.ElementAt(0).ElementAt( 46)!="4")
  208. {
  209. AfxMessageBox("软件客户端与服务器版本不匹配, 请与系统管理员联系!", MB_ICONSTOP);
  210. exit(0);return;
  211. }
  212. #else
  213. if(g_cominfoarray.ElementAt(0).ElementAt(46)!="5")
  214. {
  215. AfxMessageBox("软件客户端与服务器版本不匹配, 请与系统管理员联系!", MB_ICONSTOP);
  216. exit(0);return;
  217. }
  218. #endif
  219. #else
  220. #ifdef BASIC_VERSION
  221. if(g_cominfoarray.ElementAt(0).ElementAt( 46)!="6")
  222. {
  223. AfxMessageBox("软件客户端与服务器版本不匹配, 请与系统管理员联系!", MB_ICONSTOP);
  224. exit(0);return;
  225. }
  226. #else
  227. if (g_cominfoarray.ElementAt(0).ElementAt(46) != "7")
  228. {
  229. AfxMessageBox("软件客户端与服务器版本不匹配, 请与系统管理员联系!", MB_ICONSTOP);
  230. exit(0); return;
  231. }
  232. #endif
  233. #endif
  234. }
  235. #endif
  236. g_title = g_cominfoarray.ElementAt(0).ElementAt(10);
  237. WriteTitle(g_cominfoarray.ElementAt(0).ElementAt(10));
  238. g_date = g_cominfoarray.ElementAt(0).ElementAt(1);
  239. if (g_hisyeararray.GetSize())
  240. {
  241. g_pMainWnd->AddHistoryMenu(&g_hisyeararray);
  242. }
  243. if (g_brancharray.GetSize() && g_branchname == "")
  244. {
  245. g_pMainWnd->AddBranchMenu(&g_brancharray);
  246. }
  247. if (g_branchname == "")
  248. {
  249. if (g_server == "127.0.0.1")
  250. {
  251. g_sendhead.bsql = 0;
  252. g_sendhead.code[0] = 63;
  253. g_sendhead.tabcount = 1;
  254. g_pMainWnd->ProcessChatMessageRequest2(1);
  255. if (g_bSendOK == 0)
  256. {
  257. CDialog::OnCancel();
  258. return;
  259. }
  260. DataToArray(&g_List1array);
  261. g_path1 = g_List1array.ElementAt(0).ElementAt(0) + "\\客户原片(管理软件)$";
  262. g_path2 = g_List1array.ElementAt(0).ElementAt(0) + "\\修好的片(管理软件)$";
  263. g_path3 = g_List1array.ElementAt(0).ElementAt(0) + "\\设计好的片(管理软件)$";
  264. g_path4 = g_List1array.ElementAt(0).ElementAt(0) + "\\精修好的片(管理软件)$";
  265. g_path5 = g_List1array.ElementAt(0).ElementAt(0) + "\\礼服图片(管理软件)$";
  266. g_path6 = g_List1array.ElementAt(0).ElementAt(0) + "\\电话录音(管理软件)$";
  267. g_path7 = g_path1 + "\\效果图";
  268. }
  269. else if (patharray.GetSize())
  270. {
  271. g_path1 = g_path2 = g_path3 = g_path4 = g_path5 = g_path6 = g_path7 = g_serverbak;
  272. g_path1 = "\\\\" + g_path1 + "\\客户原片(管理软件)$";
  273. g_path2 = "\\\\" + g_path2 + "\\修好的片(管理软件)$";
  274. g_path3 = "\\\\" + g_path3 + "\\设计好的片(管理软件)$";
  275. g_path4 = "\\\\" + g_path4 + "\\精修好的片(管理软件)$";
  276. g_path5 = "\\\\" + g_path5 + "\\礼服图片(管理软件)$";
  277. g_path6 = "\\\\" + g_path6 + "\\电话录音(管理软件)$";
  278. g_path7 = g_path1 + "\\效果图";
  279. }
  280. g_path1bak = g_path1;
  281. g_path2bak = g_path2;
  282. g_path3bak = g_path3;
  283. g_path4bak = g_path4;
  284. g_path5bak = g_path5;
  285. g_path6bak = g_path6;
  286. g_path7bak = g_path7;
  287. }
  288. try
  289. {
  290. CFile fp;
  291. if (fp.Open(g_mainpath + "\\loginuser.dat", CFile::modeRead))
  292. {
  293. DWORD length = fp.GetLength();
  294. if (!length)return;
  295. CArchive ar(&fp, CArchive::load);
  296. m_userarray.Serialize(ar);
  297. fp.Close();
  298. for (int i = 0; i < m_userarray.GetSize(); i++)
  299. {
  300. m_combobox.AddString(m_userarray.ElementAt(i));
  301. }
  302. if (m_combobox.GetCount()>0)
  303. {
  304. m_combobox.SetCurSel(0);
  305. m_combobox.GetLBText(0, m_account);
  306. }
  307. if (!m_account.IsEmpty())
  308. {
  309. CString version = _T("Version 1.0");
  310. m_psw = AfxGetApp()->GetProfileString(version, _T(m_account));
  311. if (!m_psw.IsEmpty())
  312. m_bsave = TRUE;
  313. }
  314. // SetDlgItemText(100, m_account);
  315. SetDlgItemText(200, m_psw);
  316. m_button.SetCheck(m_bsave);
  317. }
  318. }
  319. catch (...)
  320. {
  321. }
  322. }
  323. void ChoosePhotoSkin::Destory()
  324. {
  325. }
  326. void ChoosePhotoSkin::BtnClick(WPARAM wParam, LPARAM lParam)
  327. {
  328. int id = lParam;
  329. id -= 99;
  330. switch (id)
  331. {
  332. case 1:
  333. {
  334. #if JEFF_TEST_ON
  335. m_combobox.GetWindowText(m_account);
  336. // GetDlgItemText(100, m_account);
  337. GetDlgItemText(200, m_psw);
  338. m_bsave = m_button.GetCheck();
  339. if (m_account.IsEmpty())
  340. {
  341. AfxMessageBox("资料不全!", MB_ICONINFORMATION);
  342. return;
  343. }
  344. CString strSQL;
  345. BYTE byPsw[50] = {0};
  346. #ifndef UNICODE
  347. memcpy(byPsw, (LPCSTR)m_psw, m_psw.GetLength());
  348. #endif
  349. CMD5 md5;
  350. md5.SetBYTEText(byPsw, strlen((char*)byPsw));
  351. strSQL.Format(_T("account='%s' and psw='%s'"), m_account, md5.GetMD5Digest());
  352. g_sendhead.bsql = 0;
  353. g_sendhead.code[0] = 23;
  354. g_sendhead.tabcount = 1;
  355. g_pMainWnd->ProcessChatMessageRequest2(strSQL);
  356. //CArray<CStringArray, CStringArray> arryOfAccountInfo;
  357. if (!g_bSendOK)
  358. {
  359. MessageBox(_T("提示"),_T("连接服务器失败"),MB_OK | MB_TOPMOST);
  360. }
  361. m_List1array.RemoveAll();
  362. DataToArray(&m_List1array);
  363. if (m_List1array.GetSize() == 0)
  364. {
  365. //AfxMessageBox("账号或密码错误");
  366. MessageBox(_T("提示"),_T("账号或密码错误"),MB_OK | MB_TOPMOST);
  367. return;
  368. }
  369. else
  370. {
  371. g_user.bLongin = 1;
  372. g_user.account = m_account;
  373. g_user.name = m_List1array.ElementAt(0).ElementAt(1);
  374. g_user.rights = m_List1array.ElementAt(0).ElementAt(3);
  375. g_user.rights2 = m_List1array.ElementAt(0).ElementAt(4);
  376. g_user.m_discount = m_List1array.ElementAt(0).ElementAt(5);
  377. g_user.m_discount2 = m_List1array.ElementAt(0).ElementAt(6);
  378. g_user.level = m_List1array.ElementAt(0).ElementAt(7);
  379. SaveLongin();
  380. g_pMainWnd2->RefreshOutlookBar();
  381. CString str;
  382. str = "当前用户:" + g_user.name;
  383. #ifndef NEW_SKIN
  384. g_pMainWnd->m_wndStatusBar.SetPaneText(1,str,TRUE);
  385. #endif
  386. SearchClient dlg;
  387. dlg.m_mode = m_mode;
  388. dlg.SetLiaPath("2.lia");
  389. if (dlg.DoModal() != IDOK)
  390. return;
  391. m_exitcode = dlg.m_exitcode;
  392. CDialog::OnOK();
  393. return;
  394. }
  395. #else
  396. m_combobox.GetWindowText(m_account);
  397. // GetDlgItemText(100, m_account);
  398. GetDlgItemText(200, m_psw);
  399. m_bsave = m_button.GetCheck();
  400. if (m_account.IsEmpty())
  401. {
  402. AfxMessageBox("资料不全!", MB_ICONINFORMATION);
  403. return;
  404. }
  405. for (int i = 0; i < m_List1array.GetSize(); i++)
  406. {
  407. if (m_account == m_List1array.ElementAt(i).ElementAt(0))
  408. {
  409. if (m_psw != m_List1array.ElementAt(i).ElementAt(2))
  410. {
  411. AfxMessageBox("密码错误, 请重新输入!", MB_ICONINFORMATION); return;
  412. }
  413. else
  414. {
  415. g_user.bLongin = 1;
  416. g_user.account = m_account;
  417. g_user.name = m_List1array.ElementAt(i).ElementAt(1);
  418. g_user.rights = m_List1array.ElementAt(i).ElementAt(3);
  419. g_user.rights2 = m_List1array.ElementAt(i).ElementAt(4);
  420. g_user.m_discount = m_List1array.ElementAt(i).ElementAt(5);
  421. g_user.m_discount2 = m_List1array.ElementAt(i).ElementAt(6);
  422. g_user.level = m_List1array.ElementAt(i).ElementAt(7);
  423. // g_user.bm=GetBm(g_user.name,g_userarray);
  424. SaveLongin();
  425. g_pMainWnd2->RefreshOutlookBar();
  426. CString str;
  427. str = "当前用户:" + g_user.name;
  428. #ifndef NEW_SKIN
  429. g_pMainWnd->m_wndStatusBar.SetPaneText(1,str,TRUE);
  430. #endif
  431. SearchClient dlg;
  432. dlg.m_mode = m_mode;
  433. dlg.SetLiaPath("2.lia");
  434. if (dlg.DoModal() != IDOK)
  435. return;
  436. m_exitcode = dlg.m_exitcode;
  437. CDialog::OnOK();
  438. return;
  439. }
  440. }
  441. }
  442. AfxMessageBox("没有这个账号, 请重新输入!", MB_ICONINFORMATION);
  443. #endif
  444. }
  445. break;
  446. case 2:
  447. CDialog::OnCancel();
  448. break;
  449. }
  450. }
  451. BOOL ChoosePhotoSkin::PreTransMsg(MSG* pMsg)
  452. {
  453. if (pMsg->message == WM_KEYDOWN)
  454. {
  455. switch (pMsg->wParam)
  456. {
  457. case VK_F2:
  458. if (g_pMainWnd->m_bCheckF2F3 && (g_pMainWnd->IsShiftDown() == 0 || g_pMainWnd->IsCtrlDown() == 0))return 1;
  459. if (m_mode)
  460. m_exitcode = 2;
  461. CDialog::OnOK();
  462. return 1;
  463. case VK_F3:
  464. if (g_pMainWnd->m_bCheckF2F3 && (g_pMainWnd->IsShiftDown() == 0 || g_pMainWnd->IsCtrlDown() == 0))return 1;
  465. if (m_mode == 0)
  466. m_exitcode = 3;
  467. CDialog::OnOK();
  468. return 1;
  469. case VK_RETURN:
  470. BtnClick(0, 100);
  471. return 1;
  472. }
  473. }
  474. else if (pMsg->message == WM_LBUTTONDOWN)
  475. {
  476. g_bNeedDrawParent = 1;
  477. CPoint pt;
  478. ::GetCursorPos(&pt);
  479. ScreenToClient(&pt);
  480. CRect rc;
  481. m_button.GetWindowRect(rc);
  482. ScreenToClient(rc);
  483. if (rc.PtInRect(pt))return CDialog::PreTranslateMessage(pMsg);
  484. if (m_rcarray.ElementAt(4).PtInRect(pt))
  485. {
  486. m_button.SetCheck(!m_button.GetCheck());
  487. }
  488. }
  489. return CDialog::PreTranslateMessage(pMsg);
  490. }
  491. void ChoosePhotoSkin::SaveLongin()
  492. {
  493. CString version = _T("Version 1.0");
  494. if (m_bsave)
  495. {
  496. AfxGetApp()->WriteProfileString(version, _T(m_account), m_psw);
  497. }
  498. else
  499. {
  500. AfxGetApp()->WriteProfileString(version, _T(m_account), "");
  501. }
  502. if (m_userarray.GetSize())
  503. {
  504. if (m_userarray.ElementAt(0) != m_account)
  505. {
  506. RemoveExist(m_account);
  507. m_userarray.InsertAt(0, m_account);
  508. if (m_userarray.GetSize() > 30)
  509. m_userarray.SetSize(30);
  510. }
  511. }
  512. else
  513. {
  514. m_userarray.Add(m_account);
  515. }
  516. CFile f;
  517. if (!f.Open(g_mainpath + "\\loginuser.dat", CFile::modeWrite | CFile::modeCreate))return;
  518. CArchive ar(&f, CArchive::store);
  519. m_userarray.Serialize(ar);
  520. ar.Close();
  521. f.Close();
  522. }
  523. void ChoosePhotoSkin::RemoveExist(CString str)
  524. {
  525. for (int i = 0; i < m_userarray.GetSize(); i++)
  526. {
  527. if (str == m_userarray.ElementAt(i))
  528. {
  529. m_userarray.RemoveAt(i);
  530. return;
  531. }
  532. }
  533. }