示例#1
0
 protected virtual void OnBgProccess(BgTask t)
 {
     switch (t.eType)
     {
     case BgTask.bgTaskType.DP_BG_SEARCH:
         var tsk = (srchTsk)t.data;
         m_dataContent.Search(tsk.m_exprs, tsk.m_srchParams);
         break;
     }
 }
示例#2
0
        public void qryBgTask(BgTask task, bool bResume = false)
        {
            Debug.WriteLine("[qryBgTask] {0}", task.eType.ToString());
            m_msgQueue.Enqueue(task);
#if none_stop
#else
            if (bResume && !m_WorkerIsRunning)
            {
                m_worker.RunWorkerAsync();
            }
#endif
        }
示例#3
0
        protected virtual void OnBgProcess(BgTask task)
        {
            Debug.WriteLine("OnBgProcess " + task.eType.ToString());
            if (task.eType == BgTask.bgTaskType.NOOP)
            {
                //sleep
                sleep((int)task.data);
                return;
            }

            if (mBgProcess != null)
            {
                mBgProcess.Invoke(this, task);
            }
        }
示例#4
0
        private void M_wkr_BgProcess(object sender, myTask e)
        {
            BgTask t = (BgTask)e;

            if (t == null)
            {
                return;
            }
            if (t.receiver != ("DP," + m_tblName))
            {
                return;
            }

            OnBgProccess(t);
        }