public void OnSearchLogRequested(LogReqInfo logReqPara) { if (m_ucLogResultList.IsDisposed) { return; } if (this.m_ucLogResultList.InvokeRequired) { try { Action <LogReqInfo> action = new Action <LogReqInfo>(this.OnSearchLogRequested); this.m_ucLogResultList.BeginInvoke(action, new object[] { logReqPara }); } catch (Exception ex) { Framework.Container.Instance.Log.Error("Invoke or BeginInvoke error: ", ex); Debug.Assert(false, ex.Message); } return; } m_ucLogResultList.Clear(); if (m_Summary != null) { m_Summary.SelectedPageNumberChanged -= new EventHandler(Summary_SelectedPageNumberChanged); m_Summary.SortFieldChanged -= new EventHandler(Summary_SortFieldChanged); } SwitchSearch(logReqPara); }
private void SwitchSearch(LogReqInfo reqPara) { lock (m_SyncObjSwitchSearch) { bool stopSearchResult = m_SearchTaskRunner.StopAndClear(); m_reqPara = reqPara; AddSearchTask(reqPara); } }
private void AddSearchTask(LogReqInfo reqPara) { Service.TaskItem <LogReqInfo, LogSearchResultSummary> item = new Service.TaskItem <LogReqInfo, LogSearchResultSummary>(); item.FuncToRun = new Func <LogReqInfo, LogSearchResultSummary>(this.Search); item.Callback = new Action <LogSearchResultSummary>(this.OnSearchCompleted); item.Para = reqPara; m_SearchTaskRunner.AddTask(item); Framework.Container.Instance.Log.Debug("m_SearchTaskRunner.AddTask "); }
public LogSearchResultSummary(LogReqInfo searchPara, LogResInfoSum pageInfo) { m_SearchPara = searchPara; m_PageInfo = pageInfo; }
private LogSearchResultSummary Search(LogReqInfo reqPara) { LogSearchResultSummary summary = Framework.Container.Instance.ServerLogService.SearchLogRecord(reqPara); return(summary); }