예제 #1
0
 void OnUserIdleChanged(object sender, UserIdleEventArgs e)
 {
     if (e.IsIdle)
     {
         if (client.Me.Status == UserStatus.Available)
         {
             oldStatus = client.Me.Status;
             client.ChangeStatus(UserStatus.Away, null);
         }
     }
     else
     {
         if (oldStatus.HasValue)
         {
             client.ChangeStatus(oldStatus.Value, null);
         }
         oldStatus = null;
     }
 }
 void OnUserIdleChanged(object sender, UserIdleEventArgs e)
 {
     if (e.IsIdle)
     {
         if (client.Me.Status == UserStatus.Available)
         {
             oldStatus = client.Me.Status;
             client.ChangeStatus(UserStatus.Away, null);
         }
     }
     else
     {
         if (oldStatus.HasValue)
             client.ChangeStatus(oldStatus.Value, null);
         oldStatus = null;
     }
 }