private void BtnTwitterPINAuth_Click(object sender, RoutedEventArgs e) { string errMsg1 = "PIN 번호가 잘못 입력되었습니다."; string errMsg2 = "PIN 번호는 비어있을 수 없습니다."; if (tbTwitterPIN.Text.IsNullOrEmpty()) { tbTwitterPINMsg.Text = errMsg2; tbTwitterPINMsg.Visibility = Visibility.Visible; return; } string pinNumber = tbTwitterPIN.Text; credentials.InputPIN(pinNumber); try { tokenizer.CredentialsCertification(credentials); SettingManager.RaiseTwitterCredentialChanged(); tbTwitterPINMsg.Visibility = Visibility.Hidden; wbTwitter.Visibility = Visibility.Hidden; tcTwitterAuth.SelectedIndex = 2; tbTwitterPIN.Clear(); runTwitterKey.Text = tbTwitterKey.Text; runTwitterSecret.Text = _hiddenText; } catch (CredentialsTypeException) { tbTwitterPINMsg.Text = errMsg1; tbTwitterPINMsg.Visibility = Visibility.Visible; string url = GetTwitterURL(); wbTwitter.Navigate(url); } }