Esempio n. 1
0
 protected void _work()
 {
     if (Work != null)
     {
         WorkEventArgs e = new WorkEventArgs(this.Status, this._userID, this._userList);
         Work(this, e);
         Status = e.status;
     }
 }
Esempio n. 2
0
 public void Run()
 {
     lock (this)
     {
         if (Status == WorkThreadStatus.Stop)
         {
             Status = WorkThreadStatus.Starting;
             System.Threading.Thread thread = new System.Threading.Thread(new System.Threading.ThreadStart(_work));
             //thread.Name = "work";
             thread.Start();
         }
     }
 }
Esempio n. 3
0
 public WorkEventArgs(WorkThreadStatus status, int userId, List <Pair> userList)
 {
     this.status   = status;
     this.userId   = userId;
     this.userList = userList;
 }