Exemplo n.º 1
0
 /// <summary>
 /// 認証完了
 /// </summary>
 public void CompletionAuth()
 {
     try
     {
         OAuthAccessToken access = Service.GetAccessToken(RequestToken, PinCode);
         Service.AuthenticateWith(access.Token, access.TokenSecret);
         // トークン情報保存(次回起動時に認証済みのままにするため)
         ClsAuth.AuthInfoSet(access);
         MessageBox.Show("認証が完了しました。");
         // 認証情報をメインウインドウで使うため。
         MainModel.SetServiceProp(Service);
         ButtonEnabled = true;
         // 完了したら自動で画面閉じる?
         //this.Close();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ClsConst.ErrorMessage);
         ClsLogWrite.LogWrite(ex.Message, ex);
     }
 }