コード例 #1
0
 /// <summary>
 /// Multithreading Login
 /// </summary>
 private void GoogleButton_Click()
 {
     GoogleButton.Invoke(new Action(() => GoogleButton.BackColor = Color.Transparent));
     if (userCreator.GoogleLogin())
     {
         GoogleButton.Invoke(new Action(() => GoogleButton.BackColor             = Color.LightGreen));
         CreateNewUserButton.Invoke(new Action(() => CreateNewUserButton.Enabled = true));
         CalendarsBox.Invoke(new Action(() => CalendarsBox.Enabled     = true));
         NewCalendarBox.Invoke(new Action(() => NewCalendarBox.Enabled = true));
     }
     else
     {
         GoogleButton.Invoke(new Action(() => GoogleButton.BackColor = Color.OrangeRed));
     }
 }