示例#1
0
 private void ConnectionCompleted(object sender, RunWorkerCompletedEventArgs eventArgs)
 {
     if (!eventArgs.Cancelled && eventArgs.Error == null)
     {
         bool Connected = (bool)eventArgs.Result;
         if (!Connected)
         {
             Status = 0;
             Win.AuthFailed();
             Console.WriteLine("Non connesso");
         }
         else
         {
             Status = 1;
         }
     }
     else
     {
         Console.WriteLine(eventArgs.Error.Message);
         Status = 0;
     }
 }