Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
 private void SwitchSearch(LogReqInfo reqPara)
 {
     lock (m_SyncObjSwitchSearch)
     {
         bool stopSearchResult = m_SearchTaskRunner.StopAndClear();
         m_reqPara = reqPara;
         AddSearchTask(reqPara);
     }
 }
Exemplo n.º 3
0
        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 ");
        }
Exemplo n.º 4
0
 public LogSearchResultSummary(LogReqInfo searchPara, LogResInfoSum pageInfo)
 {
     m_SearchPara = searchPara;
     m_PageInfo   = pageInfo;
 }
Exemplo n.º 5
0
        private LogSearchResultSummary Search(LogReqInfo reqPara)
        {
            LogSearchResultSummary summary = Framework.Container.Instance.ServerLogService.SearchLogRecord(reqPara);

            return(summary);
        }