EventViewModel.cs 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608
  1. using Aitex.Core.RT.Event;
  2. using Aitex.Core.RT.Log;
  3. using Aitex.Core.WCF;
  4. using MECF.Framework.Common.DataCenter;
  5. using Prism.Commands;
  6. using Prism.Mvvm;
  7. using System;
  8. using System.Collections.Generic;
  9. using System.Collections.ObjectModel;
  10. using System.Linq;
  11. using System.Text;
  12. using System.Threading.Tasks;
  13. using System.Windows;
  14. using System.Windows.Media.Imaging;
  15. using Venus_Core;
  16. using Venus_MainPages.Unity;
  17. using Venus_MainPages.Views;
  18. namespace Venus_MainPages.ViewModels
  19. {
  20. public class EventViewModel : BindableBase
  21. {
  22. #region 私有字段
  23. //private int MenuPermission;
  24. private bool m_IsAuto;
  25. private int m_Total;
  26. private int m_PageCount;
  27. private int m_CurrentPage=1;
  28. private int m_onePageCounts = 30;
  29. private bool m_FirstFlag = true;
  30. #endregion
  31. #region 属性
  32. public bool SearchAlarmEvent { get; set; }
  33. public bool SearchWarningEvent { get; set; }
  34. public bool SearchInfoEvent { get; set; }
  35. public bool SearchOpeLog { get; set; }
  36. public bool SearchPMA { get; set; }
  37. public bool SearchPMB { get; set; }
  38. public bool SearchPMC { get; set; }
  39. public bool SearchPMD { get; set; }
  40. //public bool SearchCoolDown { get; set; }
  41. public bool SearchTM { get; set; }
  42. public bool SearchLL { get; set; }
  43. //public bool SearchBuf1 { get; set; }
  44. public bool SearchSystem { get; set; }
  45. public string SearchKeyWords { get; set; }
  46. public bool IsAuto
  47. {
  48. get { return m_IsAuto; }
  49. set
  50. {
  51. if (value == true)
  52. {
  53. //EventClient.Instance.Start();
  54. GlobalEvents.Instance.EventItemRaiseChangedEvent += Instance_OnEvent;
  55. }
  56. else
  57. {
  58. GlobalEvents.Instance.EventItemRaiseChangedEvent -= Instance_OnEvent;
  59. }
  60. SetProperty(ref m_IsAuto, value);
  61. }
  62. }
  63. public int Total
  64. {
  65. get { return m_Total; }
  66. set
  67. {
  68. SetProperty(ref m_Total, value);
  69. }
  70. }
  71. public int PageCount
  72. {
  73. get { return m_PageCount; }
  74. set
  75. {
  76. SetProperty(ref m_PageCount, value);
  77. }
  78. }
  79. public int CurrentPage
  80. {
  81. get { return m_CurrentPage; }
  82. set
  83. {
  84. SetProperty(ref m_CurrentPage, value);
  85. }
  86. }
  87. public DateTime SearchBeginTime { get; set; }
  88. public DateTime SearchEndTime { get; set; }
  89. public string Keywords { get; set; }
  90. public ObservableCollection<string> EventList { get; set; }
  91. public string SelectedEvent { get; set; }
  92. public ObservableCollection<string> UserList { get; set; }
  93. public string SelectedUser { get; set; }
  94. public ObservableCollection<Aitex.Core.UI.View.Common.SystemLogItem> SearchedResult { get; set; } = new ObservableCollection<Aitex.Core.UI.View.Common.SystemLogItem>();
  95. public Func<string, List<EventItem>> QueryDBEventFunc { get; set; }
  96. public Func<List<string>> QueryEventList { get; set; }
  97. #endregion
  98. #region 命令
  99. private DelegateCommand _SearchCommand;
  100. public DelegateCommand SearchCommand =>
  101. _SearchCommand ?? (_SearchCommand = new DelegateCommand(Search));
  102. private DelegateCommand _ExportCommand;
  103. public DelegateCommand ExportCommand =>
  104. _ExportCommand ?? (_ExportCommand = new DelegateCommand(Export));
  105. private DelegateCommand<object> _LoadCommand;
  106. public DelegateCommand<object> LoadCommand =>
  107. _LoadCommand ?? (_LoadCommand = new DelegateCommand<object>(OnLoad));
  108. #endregion
  109. public EventViewModel()
  110. {
  111. this.QueryDBEventFunc = (sql) => QueryDataClient.Instance.Service.QueryDBEvent(sql);
  112. this.QueryEventList = () =>
  113. {
  114. List<string> result = new List<string>();
  115. foreach (var eventName in Enum.GetNames(typeof(EventEnum)))
  116. result.Add(eventName);
  117. return result;
  118. };
  119. var now = DateTime.Today;
  120. SearchBeginTime = now;// -new TimeSpan(1, 0, 0, 0);
  121. SearchEndTime = new DateTime(now.Year, now.Month, now.Day, 23, 59, 59, 999);
  122. SelectedUser = "All";
  123. SearchKeyWords = string.Empty;
  124. SearchAlarmEvent = true;
  125. SearchWarningEvent = true;
  126. SearchInfoEvent = true;
  127. SearchOpeLog = false;
  128. SearchPMA = false;
  129. SearchPMB = false;
  130. SearchPMC = false;
  131. SearchPMD = false;
  132. //SearchCoolDown = false;
  133. SearchTM = false;
  134. SearchLL = false;
  135. //SearchBuf1 = false;
  136. SearchSystem = false;
  137. //EventClient.Instance.OnEvent += Instance_OnEvent;
  138. }
  139. private void Instance_OnEvent(EventItem eventItem)
  140. {
  141. switch (eventItem.Type)
  142. {
  143. case EventType.EventUI_Notify:
  144. Application.Current.Dispatcher.Invoke(delegate
  145. {
  146. SearchedResult.Insert(0,new Aitex.Core.UI.View.Common.SystemLogItem()
  147. {
  148. ID=eventItem.Id.ToString(),
  149. LogType=eventItem.Level.ToString(),
  150. Time=eventItem.OccuringTime.ToString(),
  151. TargetChamber=eventItem.Source,
  152. Detail=eventItem.Description,
  153. Icon = new BitmapImage(new Uri(string.Format("pack://application:,,,/MECF.Framework.Common;component/Resources/SystemLog/{0}.png", eventItem.Level.ToString()), UriKind.Absolute))
  154. }
  155. );
  156. });
  157. break;
  158. case EventType.Dialog_Nofity:
  159. //PopDialog(obj);
  160. break;
  161. case EventType.KickOut_Notify:
  162. break;
  163. case EventType.Sound_Notify:
  164. break;
  165. case EventType.UIMessage_Notify:
  166. //PopUIMessage(obj);
  167. break;
  168. }
  169. }
  170. #region 方法
  171. private void OnLoad(Object eventView)
  172. {
  173. if (m_FirstFlag)
  174. {
  175. m_FirstFlag = false;
  176. this.view = (EventView)eventView;
  177. this.view.wfTimeFrom.Value = this.SearchBeginTime;
  178. this.view.wfTimeTo.Value = this.SearchEndTime;
  179. this.Preload();
  180. this.view.pageControl.CurrentPageChanged += PageControl_CurrentPageChanged;
  181. }
  182. }
  183. private void PageControl_CurrentPageChanged(int currentPage)
  184. {
  185. PageChanged(currentPage);
  186. }
  187. /// <summary>
  188. /// 预先载入数据
  189. /// </summary>
  190. public void Preload()
  191. {
  192. //初始化所有的枚举事件类型
  193. EventList = new ObservableCollection<string>();
  194. EventList.Add("All");
  195. if (QueryEventList != null)
  196. {
  197. List<string> evList = QueryEventList();
  198. foreach (string ev in evList)
  199. EventList.Add(ev);
  200. }
  201. SelectedEvent = "All";
  202. //初始化所有的用户
  203. //PreloadUsers();
  204. //所有属性更新
  205. //NotifyOfPropertyChange();
  206. //第一次默认查询
  207. //if (SearchedResult == null)
  208. //Search();
  209. }
  210. /// <summary>
  211. /// 导出
  212. /// </summary>
  213. public void Export()
  214. {
  215. try
  216. {
  217. Microsoft.Win32.SaveFileDialog dlg = new Microsoft.Win32.SaveFileDialog();
  218. dlg.DefaultExt = ".xls"; // Default file extension
  219. dlg.Filter = "Excel数据表格文件(*.xls)|*.xls"; // Filter files by extension
  220. Nullable<bool> result = dlg.ShowDialog();// Show open file dialog box
  221. if (result == true) // Process open file dialog box results
  222. {
  223. System.Data.DataSet ds = new System.Data.DataSet();
  224. ds.Tables.Add(new System.Data.DataTable("系统运行日志"));
  225. ds.Tables[0].Columns.Add("类型");
  226. ds.Tables[0].Columns.Add("时间");
  227. ds.Tables[0].Columns.Add("腔体");
  228. ds.Tables[0].Columns.Add("发起源");
  229. ds.Tables[0].Columns.Add("内容描述");
  230. foreach (var item in SearchedResult)
  231. {
  232. var row = ds.Tables[0].NewRow();
  233. row[0] = item.LogType;
  234. row[1] = item.Time;
  235. row[2] = item.TargetChamber;
  236. row[3] = item.Initiator;
  237. row[4] = item.Detail;
  238. ds.Tables[0].Rows.Add(row);
  239. }
  240. ds.WriteXml(dlg.FileName);
  241. }
  242. }
  243. catch (Exception ex)
  244. {
  245. //LOG.Write(ex);
  246. LOG.WriteExeption(ex);
  247. MessageBox.Show("导出系统日志发生错误", "导出失败", MessageBoxButton.OK, MessageBoxImage.Warning);
  248. }
  249. }
  250. private string GetSourceWhere()
  251. {
  252. //if (!SearchPMA) sqlEvent += string.Format(" and \"Source\"<>'{0}' ", ChamberSet.ReactorA);
  253. //if (!SearchPMB) sqlEvent += string.Format(" and \"Source\"<>'{0}' ", ChamberSet.ReactorB);
  254. //if (!SearchPMC) sqlEvent += string.Format(" and \"Source\"<>'{0}' ", ChamberSet.ReactorC);
  255. //if (!SearchPMD) sqlEvent += string.Format(" and \"Source\"<>'{0}' ", ChamberSet.ReactorD);
  256. //if (!SearchSystem) sqlEvent += string.Format(" and \"Source\"<>'{0}' ", ChamberSet.System);
  257. //if (!SearchLL) sqlEvent += string.Format(" and \"Source\"<>'{0}' ", ChamberSet.Loadlock);
  258. //if (!SearchTM) sqlEvent += string.Format(" and \"Source\"<>'{0}' and \"Source\"<>'{1}' and \"Source\"<>'{2}' ",
  259. // ChamberSet.Loadlock, ChamberSet.Buffer1, ChamberSet.Cooldown);
  260. return "";
  261. }
  262. /*
  263. *gid integer NOT NULL DEFAULT nextval('event_data_gid_seq'::regclass),
  264. event_id integer,
  265. event_enum text,
  266. type text,
  267. source text,
  268. description text,
  269. level text,
  270. occur_time timestamp without time zone,
  271. CONSTRAINT event_data_pkey PRIMARY KEY (gid)
  272. */
  273. /// <summary>
  274. /// 查询
  275. /// </summary>
  276. public void Search()
  277. {
  278. Task.Factory.StartNew(() =>
  279. {
  280. this.view.Dispatcher.Invoke(() =>
  281. {
  282. try
  283. {
  284. this.SearchBeginTime = this.view.wfTimeFrom.Value;
  285. this.SearchEndTime = this.view.wfTimeTo.Value;
  286. string test = $"SELECT COUNT(*) FROM \"event_data\" where \"occur_time\" >='{SearchBeginTime.ToString("yyyy/MM/dd HH:mm:ss")}' and \"occur_time\" <='{SearchEndTime.ToString("yyyyMMdd HHmmss")}'";
  287. test += " and (FALSE ";
  288. if (SearchAlarmEvent) test += " OR \"level\"='Alarm' ";
  289. if (SearchWarningEvent) test += " OR \"level\"='Warning' ";
  290. if (SearchInfoEvent) test += " OR \"level\"='Information' ";
  291. test += " ) ";
  292. Total = QueryDataClient.Instance.Service.GetDBEventAllCount(test);
  293. PageCount = (Total / m_onePageCounts) + 1;
  294. SearchedResult = new ObservableCollection<Aitex.Core.UI.View.Common.SystemLogItem>();
  295. //this.view.pageControl.CurrentPage = 1;
  296. string sqlEvent = "";
  297. string sqlOperationLog = "";
  298. string sql = "";
  299. if (SearchAlarmEvent || SearchWarningEvent || SearchInfoEvent)
  300. {
  301. sqlEvent = string.Format("SELECT \"event_id\", \"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"));
  302. sqlEvent += GetSourceWhere();
  303. sqlEvent += " and (FALSE ";
  304. if (SearchAlarmEvent) sqlEvent += " OR \"level\"='Alarm' ";
  305. if (SearchWarningEvent) sqlEvent += " OR \"level\"='Warning' ";
  306. if (SearchInfoEvent) sqlEvent += " OR \"level\"='Information' ";
  307. sqlEvent += " ) ";
  308. if (!string.IsNullOrWhiteSpace(SelectedEvent) && SelectedEvent != "All") sqlEvent += string.Format(" and lower(\"event_enum\")='{0}' ", SelectedEvent.ToLower());
  309. //if (!string.IsNullOrWhiteSpace(SearchKeyWords)) sqlEvent += string.Format(" and lower(\"description\") like '%{0}%' ", SearchKeyWords.ToLower());
  310. if (!string.IsNullOrWhiteSpace(SearchKeyWords)) sqlEvent += string.Format(" and lower(\"description\") like '%{0}%' or lower(\"type\") like '%{1}%'", SearchKeyWords.ToLower(), SearchKeyWords.ToLower());
  311. }
  312. if (SearchOpeLog)
  313. {
  314. //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"));
  315. //if (!SearchPMA) sqlOperationLog += string.Format(" and \"ChamberId\"<>'{0}' ", ChamberSet.ReactorA);
  316. //if (!SearchPMB) sqlOperationLog += string.Format(" and \"ChamberId\"<>'{0}' ", ChamberSet.ReactorB);
  317. //if (!SearchPMC) sqlOperationLog += string.Format(" and \"ChamberId\"<>'{0}' ", ChamberSet.ReactorC);
  318. //if (!SearchPMD) sqlOperationLog += string.Format(" and \"ChamberId\"<>'{0}' ", ChamberSet.ReactorD);
  319. //if (!SearchSystem) sqlOperationLog += string.Format(" and \"ChamberId\"<>'{0}' ", ChamberSet.System);
  320. //if (!SearchLL) sqlOperationLog += string.Format(" and \"ChamberId\"<>'{0}' ", ChamberSet.Loadlock);
  321. //if (!SearchTM) sqlOperationLog += string.Format(" and \"ChamberId\"<>'{0}' and \"ChamberId\"<>'{1}' and \"ChamberId\"<>'{2}' ",
  322. // ChamberSet.Loadlock, ChamberSet.Buffer1, ChamberSet.Cooldown);
  323. //if (!string.IsNullOrWhiteSpace(SelectedUser) && SelectedUser != "不限") sqlOperationLog += string.Format(" and lower(\"UserName\")='{0}' ", SelectedUser.ToLower());
  324. //if (!string.IsNullOrWhiteSpace(SearchKeyWords)) sqlOperationLog += string.Format(" and lower(\"Content\") like '%{0}%' ", SearchKeyWords.ToLower());
  325. }
  326. sql = sqlEvent;
  327. if (!string.IsNullOrEmpty(sqlOperationLog))
  328. {
  329. if (string.IsNullOrEmpty(sql))
  330. {
  331. sql = sqlOperationLog;
  332. }
  333. else
  334. {
  335. sql += " UNION ALL " + sqlOperationLog;
  336. }
  337. }
  338. if (!string.IsNullOrEmpty(sql) && QueryDBEventFunc != null)
  339. {
  340. sql += $" order by \"occur_time\" DESC limit {m_onePageCounts};";
  341. List<EventItem> lstEvent = QueryDBEventFunc(sql);
  342. if (lstEvent == null)
  343. return;
  344. Application.Current.Dispatcher.BeginInvoke(new Action(() =>
  345. {
  346. string logTypeStr;
  347. foreach (EventItem ev in lstEvent)
  348. {
  349. switch (ev.Level)
  350. {
  351. case EventLevel.Information: logTypeStr = "Info"; break;
  352. case EventLevel.Warning: logTypeStr = "Warning"; break;
  353. case EventLevel.Alarm: logTypeStr = "Alarm"; break;
  354. default: logTypeStr = "Undefine"; break;
  355. }
  356. SearchedResult.Add(new Aitex.Core.UI.View.Common.SystemLogItem()
  357. {
  358. ID = ev.Id.ToString(),
  359. Time = ((DateTime)ev.OccuringTime).ToString("yyyy/MM/dd HH:mm:ss.fff"),
  360. LogType = logTypeStr,
  361. Detail = ev.Description,
  362. TargetChamber = ev.Source,
  363. Initiator = "",
  364. Icon = new BitmapImage(new Uri(string.Format("pack://application:,,,/MECF.Framework.Common;component/Resources/SystemLog/{0}.png", ev.Level.ToString()), UriKind.Absolute))
  365. }); ;
  366. }
  367. RaisePropertyChanged("SearchedResult");
  368. if (SearchedResult.Count >= 2000)
  369. {
  370. //MessageBox.Show("Only display max 2000 items,reset the query condition", "query too many result", MessageBoxButton.OK, MessageBoxImage.Warning);
  371. }
  372. }));
  373. }
  374. else
  375. {
  376. Application.Current.Dispatcher.BeginInvoke(new Action(() =>
  377. {
  378. SearchedResult = new ObservableCollection<Aitex.Core.UI.View.Common.SystemLogItem>();
  379. RaisePropertyChanged("SearchedResult");
  380. }));
  381. }
  382. }
  383. catch (Exception ex)
  384. {
  385. //LOG.Write(ex);
  386. LOG.WriteExeption(ex);
  387. }
  388. });
  389. });
  390. }
  391. public void PageChanged(int CurrentPage)
  392. {
  393. Task.Factory.StartNew(() =>
  394. {
  395. try
  396. {
  397. string test = $"SELECT COUNT(*) FROM \"event_data\" where \"occur_time\" >='{SearchBeginTime.ToString("yyyy/MM/dd HH:mm:ss")}' and \"occur_time\" <='{SearchEndTime.ToString("yyyyMMdd HHmmss")}';";
  398. SearchedResult = new ObservableCollection<Aitex.Core.UI.View.Common.SystemLogItem>();
  399. this.SearchBeginTime = this.view.wfTimeFrom.Value;
  400. this.SearchEndTime = this.view.wfTimeTo.Value;
  401. string sqlEvent = "";
  402. string sqlOperationLog = "";
  403. string sql = "";
  404. if (SearchAlarmEvent || SearchWarningEvent || SearchInfoEvent)
  405. {
  406. sqlEvent = string.Format("SELECT \"event_id\", \"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"));
  407. sqlEvent += GetSourceWhere();
  408. sqlEvent += " and (FALSE ";
  409. if (SearchAlarmEvent) sqlEvent += " OR \"level\"='Alarm' ";
  410. if (SearchWarningEvent) sqlEvent += " OR \"level\"='Warning' ";
  411. if (SearchInfoEvent) sqlEvent += " OR \"level\"='Information' ";
  412. sqlEvent += " ) ";
  413. if (!string.IsNullOrWhiteSpace(SelectedEvent) && SelectedEvent != "All") sqlEvent += string.Format(" and lower(\"event_enum\")='{0}' ", SelectedEvent.ToLower());
  414. //if (!string.IsNullOrWhiteSpace(SearchKeyWords)) sqlEvent += string.Format(" and lower(\"description\") like '%{0}%' ", SearchKeyWords.ToLower());
  415. if (!string.IsNullOrWhiteSpace(SearchKeyWords)) sqlEvent += string.Format(" and lower(\"description\") like '%{0}%' or lower(\"type\") like '%{1}%'", SearchKeyWords.ToLower(), SearchKeyWords.ToLower());
  416. }
  417. sql = sqlEvent;
  418. if (!string.IsNullOrEmpty(sqlOperationLog))
  419. {
  420. if (string.IsNullOrEmpty(sql))
  421. {
  422. sql = sqlOperationLog;
  423. }
  424. else
  425. {
  426. sql += " UNION ALL " + sqlOperationLog;
  427. }
  428. }
  429. if (!string.IsNullOrEmpty(sql) && QueryDBEventFunc != null)
  430. {
  431. sql += $" order by \"occur_time\" DESC limit {m_onePageCounts} offset {(CurrentPage-1) * m_onePageCounts};";
  432. List<EventItem> lstEvent = QueryDBEventFunc(sql);
  433. if (lstEvent == null)
  434. return;
  435. Application.Current.Dispatcher.BeginInvoke(new Action(() =>
  436. {
  437. string logTypeStr;
  438. foreach (EventItem ev in lstEvent)
  439. {
  440. switch (ev.Level)
  441. {
  442. case EventLevel.Information: logTypeStr = "Info"; break;
  443. case EventLevel.Warning: logTypeStr = "Warning"; break;
  444. case EventLevel.Alarm: logTypeStr = "Alarm"; break;
  445. default: logTypeStr = "Undefine"; break;
  446. }
  447. SearchedResult.Add(new Aitex.Core.UI.View.Common.SystemLogItem()
  448. {
  449. ID = ev.Id.ToString() ,
  450. Time = ((DateTime)ev.OccuringTime).ToString("yyyy/MM/dd HH:mm:ss.fff"),
  451. LogType = logTypeStr,
  452. Detail = ev.Description,
  453. TargetChamber = ev.Source,
  454. Initiator = "",
  455. Icon = new BitmapImage(new Uri(string.Format("pack://application:,,,/MECF.Framework.Common;component/Resources/SystemLog/{0}.png", ev.Level.ToString()), UriKind.Absolute))
  456. }); ;
  457. }
  458. RaisePropertyChanged("SearchedResult");
  459. }));
  460. }
  461. else
  462. {
  463. Application.Current.Dispatcher.BeginInvoke(new Action(() =>
  464. {
  465. SearchedResult = new ObservableCollection<Aitex.Core.UI.View.Common.SystemLogItem>();
  466. RaisePropertyChanged("SearchedResult");
  467. }));
  468. }
  469. }
  470. catch (Exception ex)
  471. {
  472. LOG.WriteExeption(ex);
  473. }
  474. });
  475. }
  476. private EventView view;
  477. #endregion
  478. }
  479. public class SystemLogItem
  480. {
  481. /// <summary>
  482. /// 时间
  483. /// </summary>
  484. public string Time { get; set; }
  485. /// <summary>
  486. /// ICON
  487. /// </summary>
  488. public object Icon { get; set; }
  489. /// <summary>
  490. /// 类型:操作日志|事件|其他
  491. /// </summary>
  492. public string LogType { get; set; }
  493. /// <summary>
  494. /// 针对腔体
  495. /// </summary>
  496. public string TargetChamber { get; set; }
  497. /// <summary>
  498. /// 发起方
  499. /// </summary>
  500. public string Initiator { get; set; }
  501. /// <summary>
  502. /// 详情
  503. /// </summary>
  504. public string Detail { get; set; }
  505. }
  506. }