EventViewModel.cs 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Collections.ObjectModel;
  4. using System.Linq;
  5. using System.Threading.Tasks;
  6. using System.Windows;
  7. using System.Windows.Input;
  8. using System.Windows.Media.Imaging;
  9. using Aitex.Core.RT.Event;
  10. using Aitex.Core.RT.Log;
  11. using Aitex.Core.RT.SCCore;
  12. using MECF.Framework.Common.DataCenter;
  13. using MECF.Framework.Common.Utilities;
  14. using MECF.Framework.UI.Client.ClientBase;
  15. using OpenSEMI.ClientBase;
  16. using OpenSEMI.ClientBase.Command;
  17. namespace MECF.Framework.UI.Client.CenterViews.DataLogs.Event
  18. {
  19. public class SystemLogItem
  20. {
  21. /// <summary>
  22. /// 时间
  23. /// </summary>
  24. public string Time { get; set; }
  25. /// <summary>
  26. /// ICON
  27. /// </summary>
  28. public object Icon { get; set; }
  29. /// <summary>
  30. /// 类型:操作日志|事件|其他
  31. /// </summary>
  32. public string LogType { get; set; }
  33. /// <summary>
  34. /// 针对腔体
  35. /// </summary>
  36. public string TargetChamber { get; set; }
  37. /// <summary>
  38. /// 发起方
  39. /// </summary>
  40. public string Initiator { get; set; }
  41. /// <summary>
  42. /// 详情
  43. /// </summary>
  44. public string Detail { get; set; }
  45. }
  46. public class EventViewModel : BaseModel
  47. {
  48. public int AlarmCount { get; set; }
  49. public int WarningCount { get; set; }
  50. public int InformationCount { get; set; }
  51. public bool IsPermission { get => this.Permission == 3; }
  52. private EventView view;
  53. public ObservableCollection<string> SourceLP { get; set; }
  54. public ObservableCollection<string> sourcelp { get; set; }
  55. //public ObservableCollection<string> sourceLP { get; set; }
  56. private string _selectedValueLP;
  57. public string SelectedValueLP
  58. {
  59. get
  60. {
  61. return _selectedValueLP;
  62. }
  63. set
  64. {
  65. _selectedValueLP = value;
  66. NotifyOfPropertyChange("SelectedValueLP");
  67. }
  68. }
  69. public ObservableCollection<string> ToolTipValueLP { get; set; }
  70. public ObservableCollection<string> SourceDS { get; set; }
  71. public ObservableCollection<string> sourceDS { get; set; }
  72. public string SelectedValueDS { get; set; }
  73. public ICommand tbLoadPort1SelectionChangedCommand { get; set; }
  74. //public ICommand tbLoadPort2SelectionChangedCommand { get; set; }
  75. public EventViewModel()
  76. {
  77. this.DisplayName = "Event";
  78. this.QueryDBEventFunc = (sql) => QueryDataClient.Instance.Service.QueryDBEvent(sql);
  79. this.QueryEventList = () =>
  80. {
  81. List<string> result = new List<string>();
  82. foreach (var eventName in Enum.GetNames(typeof(EventEnum)))
  83. result.Add(eventName);
  84. return result;
  85. };
  86. var now = DateTime.Today;
  87. SearchBeginTime = new DateTime(now.Year, now.Month, now.Day, 00, 00, 00); ;// -new TimeSpan(1, 0, 0, 0);
  88. SearchEndTime = new DateTime(now.Year, now.Month, now.Day, 23, 59, 59);
  89. SelectedUser = "All";
  90. SearchKeyWords = string.Empty;
  91. SearchAlarmEvent = true;
  92. SearchWarningEvent = true;
  93. SearchInfoEvent = true;
  94. SearchOpeLog = false;
  95. SearchPMA = false;
  96. SearchPMB = false;
  97. SearchPMC = false;
  98. SearchPMD = false;
  99. //SearchCoolDown = false;
  100. SearchTM = false;
  101. SearchLL = false;
  102. //SearchBuf1 = false;
  103. SearchSystem = false;
  104. SourceLP = new ObservableCollection<string>();
  105. //sourceLP = new ObservableCollection<string>();
  106. //SourceLP = new ObservableCollection<string>(new[] { "LP1", "LP2", "LP3","lp4" });
  107. //SourceDS = new ObservableCollection<string>();
  108. //sourceDS = new ObservableCollection<string>();
  109. //ToolTipValueLP = new ObservableCollection<string>();
  110. tbLoadPort1SelectionChangedCommand = new BaseCommand<object>(tbLoadPort1Selection);
  111. searchedResult = new ObservableCollection<SystemLogItem>();
  112. sourcelp = new ObservableCollection<string>();
  113. //tbLoadPort2SelectionChangedCommand = new BaseCommand<object>(tbLoadPort2Selection);
  114. }
  115. protected override void OnInitialize()
  116. {
  117. base.OnInitialize();
  118. }
  119. protected override void OnViewLoaded(object _view)
  120. {
  121. base.OnViewLoaded(_view);
  122. this.view = (EventView)_view;
  123. this.view.wfTimeFrom.Content =SearchBeginTime.ToString("yyyy-MM-dd HH:mm:ss");
  124. this.view.wfTimeTo.Content = SearchEndTime.ToString("yyyy-MM-dd HH:mm:ss");
  125. this.Preload();
  126. }
  127. private bool _SearchAlarmEvent;
  128. public bool SearchAlarmEvent
  129. {
  130. get => _SearchAlarmEvent;
  131. set
  132. {
  133. _SearchAlarmEvent = value;
  134. NotifyOfPropertyChange("SearchAlarmEvent");
  135. }
  136. }
  137. private bool _SearchWarningEvent;
  138. public bool SearchWarningEvent
  139. {
  140. get => _SearchWarningEvent;
  141. set
  142. {
  143. _SearchWarningEvent = value;
  144. NotifyOfPropertyChange("SearchWarningEvent");
  145. }
  146. }
  147. private bool _SearchInfoEvent;
  148. public bool SearchInfoEvent
  149. {
  150. get => _SearchInfoEvent;
  151. set
  152. {
  153. _SearchInfoEvent = value;
  154. NotifyOfPropertyChange("SearchInfoEvent");
  155. }
  156. }
  157. public bool SearchOpeLog { get; set; }
  158. public bool SearchPMA { get; set; }
  159. public bool SearchPMB { get; set; }
  160. public bool SearchPMC { get; set; }
  161. public bool SearchPMD { get; set; }
  162. //public bool SearchCoolDown { get; set; }
  163. public bool SearchTM { get; set; }
  164. public bool SearchLL { get; set; }
  165. //public bool SearchBuf1 { get; set; }
  166. public bool SearchSystem { get; set; }
  167. public string SearchKeyWords { get; set; }
  168. public string SearchDSKeyWords { get; set; }
  169. public DateTime SearchBeginTime { get; set; }
  170. public DateTime SearchEndTime { get; set; }
  171. public string Keywords { get; set; }
  172. public ObservableCollection<string> EventList { get; set; }
  173. public string SelectedEvent { get; set; }
  174. public ObservableCollection<string> UserList { get; set; }
  175. public string SelectedUser { get; set; }
  176. public ObservableCollection<SystemLogItem> SearchedResult { get; set; }
  177. public ObservableCollection<SystemLogItem> searchedResult { get; set; }
  178. public Func<string, List<EventItem>> QueryDBEventFunc { get; set; }
  179. public Func<List<string>> QueryEventList { get; set; }
  180. /// <summary>
  181. /// 预先载入数据
  182. /// </summary>
  183. public void Preload()
  184. {
  185. //初始化所有的枚举事件类型
  186. EventList = new ObservableCollection<string>();
  187. EventList.Add("All");
  188. if (QueryEventList != null)
  189. {
  190. List<string> evList = QueryEventList();
  191. foreach (string ev in evList)
  192. EventList.Add(ev);
  193. }
  194. SelectedEvent = "All";
  195. //初始化所有的用户
  196. //PreloadUsers();
  197. //所有属性更新
  198. //NotifyOfPropertyChange();
  199. //第一次默认查询
  200. if (SearchedResult == null)
  201. Search();
  202. }
  203. public void GetFormSearchedResult()
  204. {
  205. try
  206. {
  207. if (SearchedResult != null)
  208. {
  209. SourceLP.Clear();
  210. searchedResult.Clear();
  211. SearchedResult.ToList().ForEach(i => searchedResult.Add(i));
  212. SourceLP.Add("ALL");
  213. sourcelp.Add("ALL");
  214. foreach (var result in SearchedResult)
  215. {
  216. if (!SourceLP.Contains(result.TargetChamber))
  217. {
  218. SourceLP.Add(result.TargetChamber);
  219. sourcelp.Add(result.TargetChamber);
  220. }
  221. }
  222. }
  223. }
  224. catch (Exception ex)
  225. {
  226. LOG.Write(ex);
  227. }
  228. }
  229. public void SelectDate(string SelectType)
  230. {
  231. var windowManager = Caliburn.Micro.Core.IoC.Get<Caliburn.Micro.IWindowManager>();
  232. if (SelectType=="Start")
  233. {
  234. this.SearchBeginTime = Convert.ToDateTime(this.view.wfTimeFrom.Content);
  235. SelectDateViewModel selectdateViewModel = new SelectDateViewModel(SearchBeginTime);
  236. var result = (windowManager as Caliburn.Micro.WindowManager)?.ShowDialogWithTitle(selectdateViewModel, null, "Start Time");
  237. if (result==true)
  238. {
  239. this.view.wfTimeFrom.Content = selectdateViewModel.SearchDate;
  240. }
  241. }
  242. else
  243. {
  244. this.SearchEndTime = Convert.ToDateTime(this.view.wfTimeTo.Content);
  245. SelectDateViewModel selectdateViewModel = new SelectDateViewModel(SearchEndTime);
  246. var result = (windowManager as Caliburn.Micro.WindowManager)?.ShowDialogWithTitle(selectdateViewModel, null, "End Time");
  247. if (result==true)
  248. {
  249. this.view.wfTimeTo.Content = selectdateViewModel.SearchDate;
  250. }
  251. }
  252. }
  253. /// <summary>
  254. /// 筛选信息
  255. /// </summary>
  256. public void Filter()
  257. {
  258. try
  259. {
  260. if (SelectedValueLP != ""&& SearchedResult != null&& SearchedResult.Count>0)
  261. {
  262. SearchedResult.Clear();
  263. searchedResult.ToList().ForEach(i => SearchedResult.Add(i));
  264. string[] lsvp = SelectedValueLP.Split(',');
  265. SourceLP.ToList().ForEach(i => { if (!lsvp.Contains(i) && i != "ALL") SearchedResult.ToList().ForEach(m => { if (m.TargetChamber == i) SearchedResult.Remove(m); }); });// sourceLP.Add(i); });
  266. }
  267. else SearchedResult.Clear();
  268. if (SearchedResult != null && !string.IsNullOrWhiteSpace(SearchDSKeyWords))
  269. {
  270. SearchedResult.ToList().ForEach(m => { if (!m.Detail.Contains(SearchDSKeyWords)) SearchedResult.Remove(m); });
  271. }
  272. NotifyOfPropertyChange("SearchedResult");
  273. }
  274. catch (Exception ex)
  275. {
  276. LOG.Write(ex);
  277. MessageBox.Show("筛选信息失败", "筛选失败", MessageBoxButton.OK, MessageBoxImage.Warning);
  278. }
  279. }
  280. /// <summary>
  281. /// 命令
  282. /// </summary>
  283. /// <param name="o"></param>
  284. public void tbLoadPort1Selection(object o)
  285. {
  286. if (o != null)
  287. {
  288. var Item = o as ItemSelectionData;
  289. if (Item.SelectItem == "ALL")
  290. {
  291. if (Item.IsSelect)
  292. {
  293. SourceLP.ToList().ForEach(sp => { if (!sourcelp.Contains(sp)) sourcelp.Add(sp); });
  294. }
  295. else
  296. {
  297. sourcelp.Clear();
  298. }
  299. }
  300. }
  301. }
  302. public void SelectValueLP()
  303. {
  304. var windowManager =Caliburn.Micro.Core.IoC.Get<Caliburn.Micro.IWindowManager>();
  305. SelectFilterConditionViewModel selectFilterViewModel = new SelectFilterConditionViewModel();
  306. (windowManager as Caliburn.Micro.WindowManager)?.ShowDialogWithTitle(selectFilterViewModel, null, "Select Condition");
  307. SelectedValueLP = selectFilterViewModel.FilterConditions;
  308. }
  309. /// <summary>
  310. /// 导出
  311. /// </summary>
  312. public void Export()
  313. {
  314. try
  315. {
  316. Microsoft.Win32.SaveFileDialog dlg = new Microsoft.Win32.SaveFileDialog();
  317. dlg.DefaultExt = ".xlsx"; // Default file extension
  318. dlg.FileName = $"Operation Log_{DateTime.Now:yyyyMMdd_HHmmss}";
  319. dlg.Filter = "Excel数据表格文件(*.xlsx)|*.xlsx"; // Filter files by extension
  320. Nullable<bool> result = dlg.ShowDialog();// Show open file dialog box
  321. if (result == true) // Process open file dialog box results
  322. {
  323. System.Data.DataSet ds = new System.Data.DataSet();
  324. ds.Tables.Add(new System.Data.DataTable("系统运行日志"));
  325. ds.Tables[0].Columns.Add("Type");
  326. ds.Tables[0].Columns.Add("Time");
  327. ds.Tables[0].Columns.Add("System");
  328. ds.Tables[0].Columns.Add("Content");
  329. foreach (var item in SearchedResult)
  330. {
  331. var row = ds.Tables[0].NewRow();
  332. row[0] = item.LogType;
  333. row[1] = item.Time;
  334. row[2] = item.TargetChamber;
  335. row[3] = item.Detail;
  336. ds.Tables[0].Rows.Add(row);
  337. }
  338. if (!ExcelHelper.ExportToExcel(dlg.FileName, ds, out string reason))
  339. {
  340. MessageBox.Show($"Export failed, {reason}", "Export", MessageBoxButton.OK, MessageBoxImage.Warning);
  341. return;
  342. }
  343. MessageBox.Show($"Export succeed, file save as {dlg.FileName}", "Export", MessageBoxButton.OK, MessageBoxImage.Information);
  344. }
  345. }
  346. catch (Exception ex)
  347. {
  348. LOG.Write(ex);
  349. MessageBox.Show("导出系统日志发生错误", "导出失败", MessageBoxButton.OK, MessageBoxImage.Warning);
  350. }
  351. }
  352. private string GetSourceWhere()
  353. {
  354. //if (!SearchPMA) sqlEvent += string.Format(" and \"Source\"<>'{0}' ", ChamberSet.ReactorA);
  355. //if (!SearchPMB) sqlEvent += string.Format(" and \"Source\"<>'{0}' ", ChamberSet.ReactorB);
  356. //if (!SearchPMC) sqlEvent += string.Format(" and \"Source\"<>'{0}' ", ChamberSet.ReactorC);
  357. //if (!SearchPMD) sqlEvent += string.Format(" and \"Source\"<>'{0}' ", ChamberSet.ReactorD);
  358. //if (!SearchSystem) sqlEvent += string.Format(" and \"Source\"<>'{0}' ", ChamberSet.System);
  359. //if (!SearchLL) sqlEvent += string.Format(" and \"Source\"<>'{0}' ", ChamberSet.Loadlock);
  360. //if (!SearchTM) sqlEvent += string.Format(" and \"Source\"<>'{0}' and \"Source\"<>'{1}' and \"Source\"<>'{2}' ",
  361. // ChamberSet.Loadlock, ChamberSet.Buffer1, ChamberSet.Cooldown);
  362. return "";
  363. }
  364. /*
  365. *gid integer NOT NULL DEFAULT nextval('event_data_gid_seq'::regclass),
  366. event_id integer,
  367. event_enum text,
  368. type text,
  369. source text,
  370. description text,
  371. level text,
  372. occur_time timestamp without time zone,
  373. CONSTRAINT event_data_pkey PRIMARY KEY (gid)
  374. */
  375. /// <summary>
  376. /// 查询
  377. /// </summary>
  378. public void Search()
  379. {
  380. this.SearchBeginTime = Convert.ToDateTime(this.view.wfTimeFrom.Content);
  381. this.SearchEndTime = Convert.ToDateTime(this.view.wfTimeTo.Content);
  382. Task.Factory.StartNew(() =>
  383. {
  384. try
  385. {
  386. if (SearchBeginTime > SearchEndTime)
  387. {
  388. MessageBox.Show("Time range invalid, start time should be early than end time");
  389. return;
  390. }
  391. string sqlEvent = "";
  392. string sqlOperationLog = "";
  393. string sql = "";
  394. int logCount = 2000;
  395. if (SearchAlarmEvent || SearchWarningEvent || SearchInfoEvent)
  396. {
  397. sqlEvent = string.Format("SELECT \"event_id\", \"role_id\", \"user_name\", \"event_enum\", \"type\", \"occur_time\", \"level\",\"source\" , \"description\" FROM \"event_data\" where \"occur_time\" >='{0}' and \"occur_time\" <='{1}' ", SearchBeginTime.ToString("yyyyMMdd HHmmss"), SearchEndTime.ToString("yyyyMMdd HHmmss"));
  398. sqlEvent += GetSourceWhere();
  399. sqlEvent += " and (FALSE ";
  400. if (SearchAlarmEvent) sqlEvent += " OR \"level\"='Alarm' ";
  401. if (SearchWarningEvent) sqlEvent += " OR \"level\"='Warning' ";
  402. if (SearchInfoEvent) sqlEvent += " OR \"level\"='Information' ";
  403. sqlEvent += " ) ";
  404. if (!string.IsNullOrWhiteSpace(SelectedEvent) && SelectedEvent != "All") sqlEvent += string.Format(" and lower(\"event_enum\")='{0}' ", SelectedEvent.ToLower());
  405. if (!string.IsNullOrWhiteSpace(SearchKeyWords)) sqlEvent += string.Format(" and lower(\"description\") like '%{0}%' ", SearchKeyWords.ToLower());
  406. }
  407. if (SearchOpeLog)
  408. {
  409. //sqlOperationLog = string.Format(" SELECT \"UserName\" as \"Initiator\", 'UserOperation' as \"LogType\", \"Time\", \"ChamberId\" as \"TargetChamber\", \"Content\" as \"Description\" FROM \"OperationLog\" where \"Time\" >='{0}' and \"Time\" <='{1}' ", SearchBeginTime.ToString("yyyy/MM/dd HH:mm:ss"), SearchEndTime.ToString("yyyy/MM/dd HH:mm:ss"));
  410. //if (!SearchPMA) sqlOperationLog += string.Format(" and \"ChamberId\"<>'{0}' ", ChamberSet.ReactorA);
  411. //if (!SearchPMB) sqlOperationLog += string.Format(" and \"ChamberId\"<>'{0}' ", ChamberSet.ReactorB);
  412. //if (!SearchPMC) sqlOperationLog += string.Format(" and \"ChamberId\"<>'{0}' ", ChamberSet.ReactorC);
  413. //if (!SearchPMD) sqlOperationLog += string.Format(" and \"ChamberId\"<>'{0}' ", ChamberSet.ReactorD);
  414. //if (!SearchSystem) sqlOperationLog += string.Format(" and \"ChamberId\"<>'{0}' ", ChamberSet.System);
  415. //if (!SearchLL) sqlOperationLog += string.Format(" and \"ChamberId\"<>'{0}' ", ChamberSet.Loadlock);
  416. //if (!SearchTM) sqlOperationLog += string.Format(" and \"ChamberId\"<>'{0}' and \"ChamberId\"<>'{1}' and \"ChamberId\"<>'{2}' ",
  417. // ChamberSet.Loadlock, ChamberSet.Buffer1, ChamberSet.Cooldown);
  418. //if (!string.IsNullOrWhiteSpace(SelectedUser) && SelectedUser != "不限") sqlOperationLog += string.Format(" and lower(\"UserName\")='{0}' ", SelectedUser.ToLower());
  419. //if (!string.IsNullOrWhiteSpace(SearchKeyWords)) sqlOperationLog += string.Format(" and lower(\"Content\") like '%{0}%' ", SearchKeyWords.ToLower());
  420. }
  421. sql = sqlEvent;
  422. if (!string.IsNullOrEmpty(sqlOperationLog))
  423. {
  424. if (string.IsNullOrEmpty(sql))
  425. {
  426. sql = sqlOperationLog;
  427. }
  428. else
  429. {
  430. sql += " UNION ALL " + sqlOperationLog;
  431. }
  432. }
  433. var config = QueryDataClient.Instance.Service.GetConfig("System.LogCount");
  434. if (config != null)
  435. {
  436. logCount = (int)config;
  437. }
  438. if (!string.IsNullOrEmpty(sql) && QueryDBEventFunc != null)
  439. {
  440. sql += $" order by \"occur_time\" desc limit {logCount};";
  441. List<EventItem> lstEvent = QueryDBEventFunc(sql);
  442. if (lstEvent == null)
  443. return;
  444. Application.Current.Dispatcher.BeginInvoke(new Action(() =>
  445. {
  446. SearchedResult = new ObservableCollection<SystemLogItem>();
  447. string logTypeStr;
  448. foreach (EventItem ev in lstEvent)
  449. {
  450. switch (ev.Level)
  451. {
  452. case EventLevel.Information: logTypeStr = "Info"; break;
  453. case EventLevel.Warning: logTypeStr = "Warning"; break;
  454. case EventLevel.Alarm: logTypeStr = "Alarm"; break;
  455. default: logTypeStr = "Undefine"; break;
  456. }
  457. SearchedResult.Add(new SystemLogItem()
  458. {
  459. Time = ((DateTime)ev.OccuringTime).ToString("yyyy/MM/dd HH:mm:ss.fff"),
  460. LogType = logTypeStr,
  461. Detail = ev.Description,
  462. TargetChamber = ev.Source,
  463. Initiator = "",
  464. Icon = new BitmapImage(new Uri(string.Format("pack://application:,,,/MECF.Framework.Common;component/Resources/SystemLog/{0}.png", ev.Level.ToString()), UriKind.Absolute))
  465. });
  466. }
  467. NotifyOfPropertyChange("SearchedResult");
  468. if (SearchedResult.Count >= 2000)
  469. {
  470. //MessageBox.Show("Only display max 2000 items,reset the query condition", "query too many result", MessageBoxButton.OK, MessageBoxImage.Warning);
  471. }
  472. GetFormSearchedResult();
  473. }));
  474. }
  475. else
  476. {
  477. Application.Current.Dispatcher.BeginInvoke(new Action(() =>
  478. {
  479. SearchedResult = new ObservableCollection<SystemLogItem>();
  480. NotifyOfPropertyChange("SearchedResult");
  481. }));
  482. }
  483. }
  484. catch (Exception ex)
  485. {
  486. LOG.Write(ex);
  487. }
  488. });
  489. }
  490. public void QueryOptionCmd(string value)
  491. {
  492. switch (value)
  493. {
  494. case "Alarm":
  495. AlarmCount++;
  496. if (AlarmCount % 2 == 0)
  497. SearchAlarmEvent = true;
  498. else
  499. SearchAlarmEvent = false;
  500. break;
  501. case "Warning":
  502. WarningCount++;
  503. if (WarningCount % 2 == 0)
  504. SearchWarningEvent = true;
  505. else
  506. SearchWarningEvent = false;
  507. break;
  508. case "Information":
  509. InformationCount++;
  510. if (InformationCount % 2 == 0)
  511. SearchInfoEvent = true;
  512. else
  513. SearchInfoEvent = false;
  514. break;
  515. default:
  516. break;
  517. }
  518. }
  519. }
  520. }