コード例 #1
0
        public int CfLoad()
        {
            CtkThreadingUtil.RunWorkerAsyn(delegate(object sender, DoWorkEventArgs e)
            {
                for (int idx = 0; !this.disposed; idx++)
                {
                    try
                    {
                        hsmsConnector.ConnectIfNo();
                    }
                    catch (Exception ex)
                    {
                        CtkLog.Write(ex);
                        System.Threading.Thread.Sleep(5000);//無法連線等待5秒
                    }


                    try
                    {
                        hsmsConnector.ReceiveRepeat();
                    }
                    catch (Exception ex)
                    {
                        CtkLog.Write(ex);
                        System.Threading.Thread.Sleep(5000);//無法連線等待5秒
                    }
                    finally { System.Threading.Thread.Sleep(1000); }
                }
            });
            return(0);
        }
コード例 #2
0
 public int CfRunLoopStart()
 {
     this.CfIsRunning = true;
     CtkThreadingUtil.RunWorkerAsyn(delegate(object sender, DoWorkEventArgs e)
     {
         this.CfRunLoop();
     });
     return(0);
 }