ChoosePhotoSkin.cpp 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564
  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. BOOL bHide = atoi(g_cominfoarray.ElementAt(0).ElementAt(58));
  151. AfxGetApp()->WriteProfileInt(LYFZVERSION, "hidewindow2", bHide);
  152. g_userarray.SetSize(userarray.GetSize(), 1);
  153. int count = 0;
  154. for (int ii = 0; ii < userarray.GetSize(); ii++)
  155. {
  156. if (userarray.ElementAt(ii).ElementAt(10) == "在职")
  157. g_userarray.ElementAt(count++).Copy(userarray.ElementAt(ii));
  158. }
  159. g_userarray.SetSize(count, 1);
  160. // 设置版本号;
  161. CString strVersion;
  162. strVersion.Format("%02d%02d", g_arrFileVersion[2], g_arrFileVersion[3]);
  163. if (g_cominfoarray.ElementAt(0).ElementAt(0) != strVersion)
  164. {
  165. AfxMessageBox("您必须更新软件才能继续使用, 请与系统管理员联系!", MB_ICONINFORMATION);
  166. CDialog::OnCancel();
  167. g_pMainWnd->AutoUpdate();
  168. return;
  169. }
  170. #ifndef ENTERPRISE_VERSION
  171. {
  172. #ifndef CHILD_VERSION
  173. #ifdef BASIC_VERSION
  174. if(g_cominfoarray.ElementAt(0).ElementAt( 46)!="0")
  175. {
  176. AfxMessageBox("软件客户端与服务器版本不匹配, 请与系统管理员联系!", MB_ICONSTOP);
  177. exit(0);return;
  178. }
  179. #else
  180. if(g_cominfoarray.ElementAt(0).ElementAt(46)!="1")
  181. {
  182. AfxMessageBox("软件客户端与服务器版本不匹配, 请与系统管理员联系!", MB_ICONSTOP);
  183. exit(0);return;
  184. }
  185. #endif
  186. #else
  187. #ifdef BASIC_VERSION
  188. if(g_cominfoarray.ElementAt(0).ElementAt( 46)!="2")
  189. {
  190. AfxMessageBox("软件客户端与服务器版本不匹配, 请与系统管理员联系!", MB_ICONSTOP);
  191. exit(0);return;
  192. }
  193. #else
  194. if(g_cominfoarray.ElementAt(0).ElementAt(46)!="3")
  195. {
  196. AfxMessageBox("软件客户端与服务器版本不匹配, 请与系统管理员联系!", MB_ICONSTOP);
  197. exit(0);return;
  198. }
  199. #endif
  200. #endif
  201. }
  202. #else
  203. {
  204. #ifndef CHILD_VERSION
  205. #ifdef BASIC_VERSION
  206. if(g_cominfoarray.ElementAt(0).ElementAt( 46)!="4")
  207. {
  208. AfxMessageBox("软件客户端与服务器版本不匹配, 请与系统管理员联系!", MB_ICONSTOP);
  209. exit(0);return;
  210. }
  211. #else
  212. if(g_cominfoarray.ElementAt(0).ElementAt(46)!="5")
  213. {
  214. AfxMessageBox("软件客户端与服务器版本不匹配, 请与系统管理员联系!", MB_ICONSTOP);
  215. exit(0);return;
  216. }
  217. #endif
  218. #else
  219. #ifdef BASIC_VERSION
  220. if(g_cominfoarray.ElementAt(0).ElementAt( 46)!="6")
  221. {
  222. AfxMessageBox("软件客户端与服务器版本不匹配, 请与系统管理员联系!", MB_ICONSTOP);
  223. exit(0);return;
  224. }
  225. #else
  226. if (g_cominfoarray.ElementAt(0).ElementAt(46) != "7")
  227. {
  228. AfxMessageBox("软件客户端与服务器版本不匹配, 请与系统管理员联系!", MB_ICONSTOP);
  229. exit(0); return;
  230. }
  231. #endif
  232. #endif
  233. }
  234. #endif
  235. g_title = g_cominfoarray.ElementAt(0).ElementAt(10);
  236. WriteTitle(g_cominfoarray.ElementAt(0).ElementAt(10));
  237. g_date = g_cominfoarray.ElementAt(0).ElementAt(1);
  238. if (g_hisyeararray.GetSize())
  239. {
  240. g_pMainWnd->AddHistoryMenu(&g_hisyeararray);
  241. }
  242. if (g_brancharray.GetSize() && g_branchname == "")
  243. {
  244. g_pMainWnd->AddBranchMenu(&g_brancharray);
  245. }
  246. if (g_branchname == "")
  247. {
  248. if (g_server == "127.0.0.1")
  249. {
  250. g_sendhead.bsql = 0;
  251. g_sendhead.code[0] = 63;
  252. g_sendhead.tabcount = 1;
  253. g_pMainWnd->ProcessChatMessageRequest2(1);
  254. if (g_bSendOK == 0)
  255. {
  256. CDialog::OnCancel();
  257. return;
  258. }
  259. DataToArray(&g_List1array);
  260. g_path1 = g_List1array.ElementAt(0).ElementAt(0) + "\\客户原片(管理软件)$";
  261. g_path2 = g_List1array.ElementAt(0).ElementAt(0) + "\\修好的片(管理软件)$";
  262. g_path3 = g_List1array.ElementAt(0).ElementAt(0) + "\\设计好的片(管理软件)$";
  263. g_path4 = g_List1array.ElementAt(0).ElementAt(0) + "\\精修好的片(管理软件)$";
  264. g_path5 = g_List1array.ElementAt(0).ElementAt(0) + "\\礼服图片(管理软件)$";
  265. g_path6 = g_List1array.ElementAt(0).ElementAt(0) + "\\电话录音(管理软件)$";
  266. g_path7 = g_path1 + "\\效果图";
  267. }
  268. else if (patharray.GetSize())
  269. {
  270. g_path1 = g_path2 = g_path3 = g_path4 = g_path5 = g_path6 = g_path7 = g_serverbak;
  271. g_path1 = "\\\\" + g_path1 + "\\客户原片(管理软件)$";
  272. g_path2 = "\\\\" + g_path2 + "\\修好的片(管理软件)$";
  273. g_path3 = "\\\\" + g_path3 + "\\设计好的片(管理软件)$";
  274. g_path4 = "\\\\" + g_path4 + "\\精修好的片(管理软件)$";
  275. g_path5 = "\\\\" + g_path5 + "\\礼服图片(管理软件)$";
  276. g_path6 = "\\\\" + g_path6 + "\\电话录音(管理软件)$";
  277. g_path7 = g_path1 + "\\效果图";
  278. }
  279. g_path1bak = g_path1;
  280. g_path2bak = g_path2;
  281. g_path3bak = g_path3;
  282. g_path4bak = g_path4;
  283. g_path5bak = g_path5;
  284. g_path6bak = g_path6;
  285. g_path7bak = g_path7;
  286. }
  287. try
  288. {
  289. CFile fp;
  290. if (fp.Open(g_mainpath + "\\loginuser.dat", CFile::modeRead))
  291. {
  292. DWORD length = fp.GetLength();
  293. if (!length)return;
  294. CArchive ar(&fp, CArchive::load);
  295. m_userarray.Serialize(ar);
  296. fp.Close();
  297. for (int i = 0; i < m_userarray.GetSize(); i++)
  298. {
  299. m_combobox.AddString(m_userarray.ElementAt(i));
  300. }
  301. if (m_combobox.GetCount()>0)
  302. {
  303. m_combobox.SetCurSel(0);
  304. m_combobox.GetLBText(0, m_account);
  305. }
  306. if (!m_account.IsEmpty())
  307. {
  308. m_psw = AfxGetApp()->GetProfileString(LYFZVERSION, _T(m_account));
  309. if (!m_psw.IsEmpty())
  310. m_bsave = TRUE;
  311. }
  312. // SetDlgItemText(100, m_account);
  313. SetDlgItemText(200, m_psw);
  314. m_button.SetCheck(m_bsave);
  315. }
  316. }
  317. catch (...)
  318. {
  319. }
  320. }
  321. void ChoosePhotoSkin::Destory()
  322. {
  323. }
  324. void ChoosePhotoSkin::BtnClick(WPARAM wParam, LPARAM lParam)
  325. {
  326. int id = lParam;
  327. id -= 99;
  328. switch (id)
  329. {
  330. case 1:
  331. {
  332. #if JEFF_TEST_ON
  333. m_combobox.GetWindowText(m_account);
  334. // GetDlgItemText(100, m_account);
  335. GetDlgItemText(200, m_psw);
  336. m_bsave = m_button.GetCheck();
  337. if (m_account.IsEmpty())
  338. {
  339. AfxMessageBox("资料不全!", MB_ICONINFORMATION);
  340. return;
  341. }
  342. CString strSQL;
  343. BYTE byPsw[50] = {0};
  344. #ifndef UNICODE
  345. memcpy(byPsw, (LPCSTR)m_psw, m_psw.GetLength());
  346. #endif
  347. CMD5 md5;
  348. md5.SetBYTEText(byPsw, strlen((char*)byPsw));
  349. strSQL.Format(_T("account='%s' and psw='%s'"), m_account, md5.GetMD5Digest());
  350. g_sendhead.bsql = 0;
  351. g_sendhead.code[0] = 23;
  352. g_sendhead.tabcount = 1;
  353. g_pMainWnd->ProcessChatMessageRequest2(strSQL);
  354. //CArray<CStringArray, CStringArray> arryOfAccountInfo;
  355. if (!g_bSendOK)
  356. {
  357. MessageBox(_T("提示"),_T("连接服务器失败"),MB_OK | MB_TOPMOST);
  358. }
  359. m_List1array.RemoveAll();
  360. DataToArray(&m_List1array);
  361. if (m_List1array.GetSize() == 0)
  362. {
  363. //AfxMessageBox("账号或密码错误");
  364. MessageBox(_T("提示"),_T("账号或密码错误"),MB_OK | MB_TOPMOST);
  365. return;
  366. }
  367. else
  368. {
  369. g_user.bLongin = 1;
  370. g_user.account = m_account;
  371. g_user.name = m_List1array.ElementAt(0).ElementAt(1);
  372. g_user.rights = m_List1array.ElementAt(0).ElementAt(3);
  373. g_user.rights2 = m_List1array.ElementAt(0).ElementAt(4);
  374. g_user.m_discount = m_List1array.ElementAt(0).ElementAt(5);
  375. g_user.m_discount2 = m_List1array.ElementAt(0).ElementAt(6);
  376. g_user.level = m_List1array.ElementAt(0).ElementAt(7);
  377. SaveLongin();
  378. g_pMainWnd2->RefreshOutlookBar();
  379. CString str;
  380. str = "当前用户:" + g_user.name;
  381. #ifndef NEW_SKIN
  382. g_pMainWnd->m_wndStatusBar.SetPaneText(1,str,TRUE);
  383. #endif
  384. SearchClient dlg;
  385. dlg.m_mode = m_mode;
  386. dlg.SetLiaPath("2.lia");
  387. if (dlg.DoModal() != IDOK)
  388. return;
  389. m_exitcode = dlg.m_exitcode;
  390. CDialog::OnOK();
  391. return;
  392. }
  393. #else
  394. m_combobox.GetWindowText(m_account);
  395. // GetDlgItemText(100, m_account);
  396. GetDlgItemText(200, m_psw);
  397. m_bsave = m_button.GetCheck();
  398. if (m_account.IsEmpty())
  399. {
  400. AfxMessageBox("资料不全!", MB_ICONINFORMATION);
  401. return;
  402. }
  403. for (int i = 0; i < m_List1array.GetSize(); i++)
  404. {
  405. if (m_account == m_List1array.ElementAt(i).ElementAt(0))
  406. {
  407. if (m_psw != m_List1array.ElementAt(i).ElementAt(2))
  408. {
  409. AfxMessageBox("密码错误, 请重新输入!", MB_ICONINFORMATION); return;
  410. }
  411. else
  412. {
  413. g_user.bLongin = 1;
  414. g_user.account = m_account;
  415. g_user.name = m_List1array.ElementAt(i).ElementAt(1);
  416. g_user.rights = m_List1array.ElementAt(i).ElementAt(3);
  417. g_user.rights2 = m_List1array.ElementAt(i).ElementAt(4);
  418. g_user.m_discount = m_List1array.ElementAt(i).ElementAt(5);
  419. g_user.m_discount2 = m_List1array.ElementAt(i).ElementAt(6);
  420. g_user.level = m_List1array.ElementAt(i).ElementAt(7);
  421. // g_user.bm=GetBm(g_user.name,g_userarray);
  422. SaveLongin();
  423. g_pMainWnd2->RefreshOutlookBar();
  424. CString str;
  425. str = "当前用户:" + g_user.name;
  426. #ifndef NEW_SKIN
  427. g_pMainWnd->m_wndStatusBar.SetPaneText(1,str,TRUE);
  428. #endif
  429. SearchClient dlg;
  430. dlg.m_mode = m_mode;
  431. dlg.SetLiaPath("2.lia");
  432. if (dlg.DoModal() != IDOK)
  433. return;
  434. m_exitcode = dlg.m_exitcode;
  435. CDialog::OnOK();
  436. return;
  437. }
  438. }
  439. }
  440. AfxMessageBox("没有这个账号, 请重新输入!", MB_ICONINFORMATION);
  441. #endif
  442. }
  443. break;
  444. case 2:
  445. CDialog::OnCancel();
  446. break;
  447. }
  448. }
  449. BOOL ChoosePhotoSkin::PreTransMsg(MSG* pMsg)
  450. {
  451. if (pMsg->message == WM_KEYDOWN)
  452. {
  453. switch (pMsg->wParam)
  454. {
  455. case VK_F2:
  456. if (g_pMainWnd->m_bCheckF2F3 && (g_pMainWnd->IsShiftDown() == 0 || g_pMainWnd->IsCtrlDown() == 0))return 1;
  457. if (m_mode)
  458. m_exitcode = 2;
  459. CDialog::OnOK();
  460. return 1;
  461. case VK_F3:
  462. if (g_pMainWnd->m_bCheckF2F3 && (g_pMainWnd->IsShiftDown() == 0 || g_pMainWnd->IsCtrlDown() == 0))return 1;
  463. if (m_mode == 0)
  464. m_exitcode = 3;
  465. CDialog::OnOK();
  466. return 1;
  467. case VK_RETURN:
  468. BtnClick(0, 100);
  469. return 1;
  470. }
  471. }
  472. else if (pMsg->message == WM_LBUTTONDOWN)
  473. {
  474. g_bNeedDrawParent = 1;
  475. CPoint pt;
  476. ::GetCursorPos(&pt);
  477. ScreenToClient(&pt);
  478. CRect rc;
  479. m_button.GetWindowRect(rc);
  480. ScreenToClient(rc);
  481. if (rc.PtInRect(pt))return CDialog::PreTranslateMessage(pMsg);
  482. if (m_rcarray.ElementAt(4).PtInRect(pt))
  483. {
  484. m_button.SetCheck(!m_button.GetCheck());
  485. }
  486. }
  487. return CDialog::PreTranslateMessage(pMsg);
  488. }
  489. void ChoosePhotoSkin::SaveLongin()
  490. {
  491. if (m_bsave)
  492. {
  493. AfxGetApp()->WriteProfileString(LYFZVERSION, _T(m_account), m_psw);
  494. }
  495. else
  496. {
  497. AfxGetApp()->WriteProfileString(LYFZVERSION, _T(m_account), "");
  498. }
  499. if (m_userarray.GetSize())
  500. {
  501. if (m_userarray.ElementAt(0) != m_account)
  502. {
  503. RemoveExist(m_account);
  504. m_userarray.InsertAt(0, m_account);
  505. if (m_userarray.GetSize() > 30)
  506. m_userarray.SetSize(30);
  507. }
  508. }
  509. else
  510. {
  511. m_userarray.Add(m_account);
  512. }
  513. CFile f;
  514. if (!f.Open(g_mainpath + "\\loginuser.dat", CFile::modeWrite | CFile::modeCreate))return;
  515. CArchive ar(&f, CArchive::store);
  516. m_userarray.Serialize(ar);
  517. ar.Close();
  518. f.Close();
  519. }
  520. void ChoosePhotoSkin::RemoveExist(CString str)
  521. {
  522. for (int i = 0; i < m_userarray.GetSize(); i++)
  523. {
  524. if (str == m_userarray.ElementAt(i))
  525. {
  526. m_userarray.RemoveAt(i);
  527. return;
  528. }
  529. }
  530. }