示例#1
0
 void checkLogin(string site, PictureBox PB)
 {
     PB.Image = Properties.Resources.LoginStandby;
     if (worker.checkLogin(site))
     {
         PB.Image = Properties.Resources.LoginOK;
     }
     else
     {
         PB.Image = Properties.Resources.LoginFailed;
     }
 }
示例#2
0
 async void checkLogin(string site, PictureBox PB)
 {
     try {
         PB.Image = Properties.Resources.LoginStandby;
         if (await worker.checkLogin(site))
         {
             PB.Image = Properties.Resources.LoginOK;
         }
         else
         {
             PB.Image = Properties.Resources.LoginFailed;
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(this, "An error occured: " + ex.Message, ex.GetType().Name);
     }
 }