예제 #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);
        }