Example #1
0
 /// <summary>
 /// 调试方法
 /// </summary>
 public void Main1()
 {
     BussinessHelper.AppInitDataAndStarRun();
     new OnlineUserManager().Start();
     new RemotingManager().RegChannel();
     RecordTimer          = new System.Timers.Timer(1000.0);
     RecordTimer.Enabled  = true;
     RecordTimer.Elapsed += new ElapsedEventHandler(Service.onRecordTimerMain);
     Thread.Sleep(-1);
 }
Example #2
0
 /// <summary>
 /// 服务启动后台线程
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void bgw_DoWork(object sender, DoWorkEventArgs e)
 {
     try
     {
         BussinessHelper.AppInitDataAndStarRun();
         new OnlineUserManager().Start();
         new RemotingManager().RegChannel();
         RecordTimer          = new System.Timers.Timer(1000.0);
         RecordTimer.Elapsed += new ElapsedEventHandler(Service.onRecordTimerMain);
         RecordTimer.Enabled  = true;
     }
     catch (Exception exception3)
     {
         this.WriteLog("bgw_DoWork", exception3.Message);
     }
 }