//Disconnect Button private void button_disconnect_Click(object sender, RoutedEventArgs e) { setConnectionStatusDISCONNECT(); HideLabels(); userInfo = null; label_Followers.Content = ""; image_profilePic.Visibility = Visibility.Hidden; label_login.Content = ""; label_location.Content = ""; label_following.Content = ""; textBox_username.Text = "Github Username"; }
//On 'Connect' Click private void button_Click(object sender, RoutedEventArgs e) { if(textBox_username.Text =="") { MessageBox.Show("Please enter a username to continue"); return; } userInfo = GithubService.GetGithubUser(textBox_username.Text); if (userInfo != null) { setConnectionStatusOK(); PopulateUserInfo(); } else { setConnectionStatusDISCONNECT(); } }